An LSP implementation for the MADX scripting language.
- Semantic highlighting (in progress, most commands are done)
- Hover
- defined macros
- built-in commands
- variables in scope
- Errors
- syntax errors
- command usage
- Hints
- Jump to definition
- Install the rust toolchain
- Install with cargo
cargo install --git https://github.com/awegsche/madxls.git
- Maybe you then have to add the cargo bin dir to PATH (todo: some hints on how to do that).
- Use it with your code editor. If your code editor supports the LSP, this is just a matter of adding a corresponding entry in your configuration file. Some examples are listed below:
Add the following to your configuration (todo: simplify this):
function StartMadx()
vim.lsp.start({
name = "madx",
cmd = {"madxls"},
})
end
vim.api.nvim_create_autocmd({"BufEnter", "BufWinEnter"}, {
pattern = {"*.madx"},
callback = StartMadx,
})
Wait for a madxls plugin
cf. emacs LSP configuration