Skip to content

Commit

Permalink
rust: fix unused lsp settings option
Browse files Browse the repository at this point in the history
  • Loading branch information
horriblename committed Feb 21, 2025
1 parent 54476b5 commit 8891fa4
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions modules/plugins/languages/rust.nix
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,15 @@ in {
description = "Options to pass to rust analyzer";
type = str;
default = "";
example = ''
['rust-analyzer'] = {
cargo = {allFeature = true},
checkOnSave = true,
procMacro = {
enable = true,
},
},
'';
};
};

Expand Down Expand Up @@ -142,6 +151,9 @@ in {
then expToLua cfg.lsp.package
else ''{"${cfg.lsp.package}/bin/rust-analyzer"}''
},
default_settings = {
${cfg.lsp.opts}
},
on_attach = function(client, bufnr)
default_on_attach(client, bufnr)
local opts = { noremap=true, silent=true, buffer = bufnr }
Expand Down

0 comments on commit 8891fa4

Please sign in to comment.