nixos/pkgsets/nvim/lsp/ltex.nix

25 lines
458 B
Nix
Raw Permalink Normal View History

{
lib,
config,
pkgs,
...
}:
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" }
)
''