mirror of
https://github.com/swarm-game/swarm.git
synced 2024-09-17 18:38:44 +03:00
eb205e61a9
Add new special syntactic forms `require <string literal>` to require a device to be installed, and `require <int literal> <string literal>` to require a certain number of a given entity in the inventory. - Replace `Set Capability` with a new `Requirements` type which records various types of requirement. - Refactor requirements checking into a new function `checkRequirements` which also does device set minimization (#508). - `reprogram` will now install extra devices or transfer extra inventory as necessary. - Add a bunch of tests. - Add new `installed` command, similar to `has`, which checks whether a given device is installed. Closes #201. Closes #508. |
||
---|---|---|
.. | ||
emacs | ||
vscode | ||
README.md |
Text Editor Configuration
Validate a swarm-lang file using: swarm format ./file.sw
Swarm comes with a language server protocol (LSP) server.
Make sure the swarm
program is present in your PATH, then
configure your editor.
EMACS
The current LSP implementation features the following extensions:
- error diagnostic on load/save
Using lsp-mode:
Load the swarm-mode.el and start
the M-x lsp
service in a swarm-mode buffer.
VS Code and VS Codium
The swarm-lang extension provides highlighting and an
LSP client. That is if you have swarm
executable in PATH, then
the executable will be used as LSP server to show errors as you type.
You can get it by:
- installing from MS marketplace (link)
- building from source in the vscode folder
- TBD get the VSIX from GitHub releases
- TBD installing from the VS codium free marketplace
Vim and Neovim
Currently there is neither highlighting nor LSP support for Vim, but we would be happy to accept a contribution.