mirror of
https://github.com/nix-community/nixvim.git
synced 2025-07-04 14:24:29 +02:00
plugins/lsp: add vls language server
This commit is contained in:
parent
bacdae2c50
commit
abb10f097e
3 changed files with 37 additions and 0 deletions
|
@ -510,6 +510,13 @@ with lib; let
|
||||||
description = "Enable typst-lsp for typst";
|
description = "Enable typst-lsp for typst";
|
||||||
package = pkgs.typst-lsp;
|
package = pkgs.typst-lsp;
|
||||||
}
|
}
|
||||||
|
{
|
||||||
|
name = "vls";
|
||||||
|
description = "Enable vls for v";
|
||||||
|
# The v language server has to be installed from v and thus is not packaged "as is" in
|
||||||
|
# nixpkgs.
|
||||||
|
package = null;
|
||||||
|
}
|
||||||
{
|
{
|
||||||
name = "vuels";
|
name = "vuels";
|
||||||
description = "Enable vuels, for Vue";
|
description = "Enable vuels, for Vue";
|
||||||
|
@ -540,5 +547,6 @@ in {
|
||||||
./pylsp.nix
|
./pylsp.nix
|
||||||
./rust-analyzer.nix
|
./rust-analyzer.nix
|
||||||
./svelte.nix
|
./svelte.nix
|
||||||
|
./vls.nix
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
|
|
28
plugins/lsp/language-servers/vls.nix
Normal file
28
plugins/lsp/language-servers/vls.nix
Normal file
|
@ -0,0 +1,28 @@
|
||||||
|
{
|
||||||
|
lib,
|
||||||
|
config,
|
||||||
|
...
|
||||||
|
}:
|
||||||
|
with lib; let
|
||||||
|
cfg = config.plugins.lsp.servers.vls;
|
||||||
|
in {
|
||||||
|
options.plugins.lsp.servers.vls = {
|
||||||
|
autoSetFiletype = mkOption {
|
||||||
|
type = types.bool;
|
||||||
|
description = ''
|
||||||
|
Files with the `.v` extension are not automatically detected as vlang files.
|
||||||
|
If this option is enabled, Nixvim will automatically set the filetype accordingly.
|
||||||
|
'';
|
||||||
|
default = true;
|
||||||
|
example = false;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
config =
|
||||||
|
mkIf cfg.enable
|
||||||
|
{
|
||||||
|
filetype.extension =
|
||||||
|
mkIf cfg.autoSetFiletype
|
||||||
|
{v = "vlang";};
|
||||||
|
};
|
||||||
|
}
|
|
@ -131,6 +131,7 @@
|
||||||
texlab.enable = true;
|
texlab.enable = true;
|
||||||
tsserver.enable = true;
|
tsserver.enable = true;
|
||||||
typst-lsp.enable = true;
|
typst-lsp.enable = true;
|
||||||
|
vls.enable = true;
|
||||||
vuels.enable = true;
|
vuels.enable = true;
|
||||||
yamlls.enable = true;
|
yamlls.enable = true;
|
||||||
zls.enable = true;
|
zls.enable = true;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue