mirror of
https://github.com/NotAShelf/nvf.git
synced 2025-11-12 16:35:30 +00:00
rust: fix unused lsp settings option
This commit is contained in:
parent
5fbc72d697
commit
fd3bdbfe6d
1 changed files with 12 additions and 0 deletions
|
|
@ -62,6 +62,15 @@ in {
|
||||||
description = "Options to pass to rust analyzer";
|
description = "Options to pass to rust analyzer";
|
||||||
type = str;
|
type = str;
|
||||||
default = "";
|
default = "";
|
||||||
|
example = ''
|
||||||
|
['rust-analyzer'] = {
|
||||||
|
cargo = {allFeature = true},
|
||||||
|
checkOnSave = true,
|
||||||
|
procMacro = {
|
||||||
|
enable = true,
|
||||||
|
},
|
||||||
|
},
|
||||||
|
'';
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
@ -142,6 +151,9 @@ in {
|
||||||
then expToLua cfg.lsp.package
|
then expToLua cfg.lsp.package
|
||||||
else ''{"${cfg.lsp.package}/bin/rust-analyzer"}''
|
else ''{"${cfg.lsp.package}/bin/rust-analyzer"}''
|
||||||
},
|
},
|
||||||
|
default_settings = {
|
||||||
|
${cfg.lsp.opts}
|
||||||
|
},
|
||||||
on_attach = function(client, bufnr)
|
on_attach = function(client, bufnr)
|
||||||
default_on_attach(client, bufnr)
|
default_on_attach(client, bufnr)
|
||||||
local opts = { noremap=true, silent=true, buffer = bufnr }
|
local opts = { noremap=true, silent=true, buffer = bufnr }
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue