- Goto definition
- Completion
- Diagnostics
- Hover
- Document highlight
- Document symbol
- Formatting
- Signature help
- Code action
Build:
cargo build
Test:
cargo test
Lint:
cargo clippy
# or to fix lints
cargo clippy --fix --bin "lets_ls"
cargo build --release
Add new filetype:
vim.filetype.add({
filename = {
["lets.yaml"] = "yaml.lets",
},
})
In your neovim/nvim-lspconfig
servers configuration:
In order for nvim-lspconfig
to recognize lets_ls we must define config for lets_ls
require("lspconfig.configs").lets_ls = {
default_config = {
cmd = {
"/Users/max/code/projects/lets_ls/target/debug/lets_ls",
},
filetypes = { "yaml.lets" },
root_dir = util.root_pattern("lets.yaml"),
settings = {},
},
}
And then enable lets_ls
in then servers
section:
return {
"neovim/nvim-lspconfig",
opts = {
servers = {
lets_ls = {},
pyright = {}, -- just to show an example how we enable lsp servers
},
},
}
Extension can be found here.