Files
Aaron Gorodetzky 486a77f123 Rewrite LSP plugin spec to use language modules
Replace monolithic 187-line lsp.lua with slim 35-line version that:
- Delegates server config to per-language modules via the orchestrator
- Uses vim.lsp.config() (Neovim 0.11+ API) instead of deprecated lspconfig setup
- Uses mason-org repos (mason.nvim moved from williamboman to mason-org)
- Relies on LspAttach autocmd in _shared.lua instead of per-server on_attach
- Lets mason-lspconfig auto-enable installed servers
2026-09-14 10:18:06 -04:00

45 lines
940 B
Lua

-- Language module: Rust
local shared = require('languages._shared')
return {
servers = {
rust_analyzer = {
capabilities = shared.make_capabilities(false),
settings = {
['rust-analyzer'] = {
check = {
command = "clippy",
},
completion = {
autoimport = {
enable = false,
},
snippets = {
custom = nil,
},
},
},
},
},
},
parsers = { "rust", "toml" },
-- Use the rust-analyzer provided by the system package manager.
mason_packages = {},
plugins = {},
cmp_filetypes = {
rust = {
sources = {
{name = 'path',},
{name = 'nvim_lsp', keyword_length = 2,},
{name = 'nvim_lsp_signature_help',},
{name = 'buffer', keyword_length = 3,},
-- No snippet sources — prevents completion clutter
},
},
},
}