feat(nvim): add Rust LSP support
This commit was merged in pull request #32.
This commit is contained in:
@@ -142,6 +142,54 @@ in
|
||||
];
|
||||
|
||||
plugins = {
|
||||
blink-cmp = {
|
||||
enable = true;
|
||||
setupLspCapabilities = true;
|
||||
settings = {
|
||||
keymap = {
|
||||
preset = "default";
|
||||
"<M-Space>" = [
|
||||
"show"
|
||||
"show_documentation"
|
||||
"hide_documentation"
|
||||
];
|
||||
};
|
||||
completion.documentation.auto_show = true;
|
||||
signature.enabled = true;
|
||||
sources.default = [
|
||||
"lsp"
|
||||
"path"
|
||||
"snippets"
|
||||
"buffer"
|
||||
];
|
||||
};
|
||||
};
|
||||
|
||||
lsp = {
|
||||
enable = true;
|
||||
inlayHints = true;
|
||||
keymaps = {
|
||||
silent = true;
|
||||
diagnostic = {
|
||||
"[d" = "goto_prev";
|
||||
"]d" = "goto_next";
|
||||
};
|
||||
lspBuf = {
|
||||
gd = "definition";
|
||||
gD = "references";
|
||||
K = "hover";
|
||||
"<leader>ca" = "code_action";
|
||||
"<leader>rn" = "rename";
|
||||
};
|
||||
};
|
||||
servers.rust_analyzer = lib.mkIf config.modules.shell.rust.enable {
|
||||
enable = true;
|
||||
installCargo = false;
|
||||
installRustc = false;
|
||||
installRustfmt = false;
|
||||
};
|
||||
};
|
||||
|
||||
gitsigns = {
|
||||
enable = true;
|
||||
settings.current_line_blame = false;
|
||||
|
||||
Reference in New Issue
Block a user