Language Server for the Vector Remap Language
This is just a PoC implementation and thus not very pretty.
Installation
Either compile locally with
cargo build --release
And run ./target/release/vrl-ls
Or install to ~/.cargo/bin with
cargo install --path .
Known Bugs
- “.” Assignments also complete the stdlib
Features
It is just a very small ls with only a few features
- Complete variables
- Show diagnostics (errors and warnings)
- Complete the standard library
- Goto definition
- Find references
- Rename
Changelog
[unreleased]
Setup
Nix
Just add vrl-ls.url = github:koskev/vrl-ls as an input to your flake and use inputs.vrl-ls.defaultPackage.${pkgs.system} as a package.
Run nix develop github:koskev/vrl-ls to try it out temporarily.
To test a pre-configured neovim instance use nix develop github:koskev/vrl-ls?dir=docs&ref=main
Using Cargo
cargo install --git https://github.com/koskev/vrl-ls
Editors
Neovim
Add the following to your config
vim.filetype.add({
extension = {
vrl = "vrl",
}
})
vim.lsp.config['vrl-ls'] = {
cmd = { "vrl-ls" },
filetypes = { 'vrl' },
root_markers = { '.git' },
}
vim.lsp.enable('vrl-ls')
(Evil-)Helix
VSCodium
IntelliJ
Just don’t. IntelliJ is probably nice for Java development, but for other languages it just seems rather bad and does not have native support LSP, DAP, or Treesitter.
To get basic support you can use lsp4ij. However, you either need to separately install syntax highlighting or use the slow Treesitter bridge of the language server.