Repository navigation
v0.2.0
Breaking
-
Flattened settings structure.
Previously
crates-lspconfiguration settings all lived in a nestedlspobject within the initialization parameters:vim.lsp.config['crates'] = { cmd = { 'crates-lsp' }, filetypes = { 'toml' }, root_markers = { 'Cargo.toml', '.git' }, init_options = { lsp = { inlay_hints = false } } }
Since all settings are necessarily LSP settings, this didn't really make sense.
All settings now live in the root initialization parameters object:
vim.lsp.config['crates'] = { cmd = { 'crates-lsp' }, filetypes = { 'toml' }, root_markers = { 'Cargo.toml', '.git' }, init_options = { inlay_hints = false } }
Added
-
filesconfiguration option, allowing you to limit the filescrates-lspshould activate for, without relying on the lsp client which might not be able to filter. Solves #20.Note:
- If not specified, this option defaults to
Cargo.toml. - Uses exact matching on the entire filename. Partial matches, patterns, globbing, regex is not supported.
Example (nvim):
vim.lsp.config['crates'] = { cmd = { 'crates-lsp' }, filetypes = { 'toml' }, root_markers = { 'Cargo.toml', '.git' }, init_options = { files = { 'Cargo.toml', 'AlternativeCargoFilename.toml'] } }
- If not specified, this option defaults to