- Syntax highlighting (automatically checks for updates if you have internet)
- Language server support (e.g., code completion, go to definition, hover, error reporting)
- Jump to
swim.toml
with:Spade openSwim
(#2) - Autoformatting with spadefmt (#3)
- Keybinds (#7)
- 💤 Lazy loading by default
Note
This section assumes a Unix-like operating system.
First, you'll want to grab the Spade LSP (you might need to install Rust):
cargo install --locked --git https://gitlab.com/spade-lang/spade-language-server
You should also have nvim-treesitter.
Then, install the plugin with your preferred package manager.
{ "ethanuppal/spade.nvim" }
You can supply configuration with the optional opts
field, as in
{
"ethanuppal/spade.nvim",
opts = {
lsp_command = "spade-language-server",
}
}
Note that lazy.nvim will automatically call require("spade").setup(opts)
for you lazily as well as install the required dependencies.
If you want to disable lazy loading, set lazy = false
in the plugin spec as
well in opts
.
Manually install the query files, then add:
use {
"ethanuppal/spade.nvim",
config = function()
require("spade").setup()
end,
requires = {{ "nvim-treesitter/nvim-treesitter" }}
}
Make sure you have a swim.toml
somewhere up your tree -- the LSP will activate in that directory.