pkgsets/nvim: update lsp config to use opts
This commit is contained in:
parent
d8f29e12b5
commit
378da9479f
17 changed files with 355 additions and 339 deletions
|
@ -5,20 +5,23 @@
|
|||
...
|
||||
}:
|
||||
|
||||
lib.optionalString (lib.elem "nvim::lsp::ltex" config.machine.pkgs) # lua
|
||||
''
|
||||
lspconfig.ltex.setup({
|
||||
cmd = { "${pkgs.ltex-ls}/bin/ltex-ls" },
|
||||
settings = {
|
||||
ltex = {
|
||||
language = "de-DE",
|
||||
},
|
||||
},
|
||||
})
|
||||
|
||||
vim.api.nvim_create_user_command(
|
||||
"LtexLang",
|
||||
"lua SetLtexLang(<q-args>)",
|
||||
{ nargs = 1, desc = "Set ltex-ls language" }
|
||||
)
|
||||
''
|
||||
lib.optionalAttrs (lib.elem "nvim::lsp::ltex" config.machine.pkgs) {
|
||||
ltex = {
|
||||
cmd = [ "${pkgs.ltex-ls}/bin/ltex-ls" ];
|
||||
settings = {
|
||||
ltex = {
|
||||
language = "de-DE";
|
||||
};
|
||||
};
|
||||
on_attach =
|
||||
_: # lua
|
||||
''
|
||||
function(client, bufnr)
|
||||
vim.api.nvim_create_user_command(
|
||||
"LtexLang",
|
||||
"lua SetLtexLang(<q-args>)",
|
||||
{ nargs = 1, desc = "Set ltex-ls language" }
|
||||
)
|
||||
end'';
|
||||
};
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue