plugins/lsp: add vls language server

This commit is contained in:
Gaetan Lepage 2023-11-27 13:20:12 +01:00 committed by Gaétan Lepage
parent bacdae2c50
commit abb10f097e
3 changed files with 37 additions and 0 deletions

View 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";};
};
}