mirror of
https://github.com/nix-community/nixvim.git
synced 2025-07-13 18:54:30 +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
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";};
|
||||
};
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue