Files
nvim-config/lua/languages/rust.lua
T
Aaron Gorodetzky 30df5e2fc0 Add per-language modules
Each module defines its LSP servers, treesitter parsers, mason packages,
optional plugins, and per-filetype cmp source overrides.

Modules: rust (with snippet-free cmp config), csharp, c (clangd), nix
(nil_ls), python, web (ts_ls + html + tailwindcss), defaults (lua_ls +
bashls + common parsers).

Not yet wired into the plugin system ??? the orchestrator does that next.
2026-09-14 10:10:02 -04:00

44 lines
890 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" },
mason_packages = { "rust-analyzer" },
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
},
},
},
}