nix-community.nixvim/plugins/lsp/language-servers/vls.nix

21 lines
543 B
Nix
Raw Normal View History

2024-05-05 19:39:35 +02:00
{ lib, config, ... }:
with lib;
let
2023-11-27 13:20:12 +01:00
cfg = config.plugins.lsp.servers.vls;
2024-05-05 19:39:35 +02:00
in
{
2023-11-27 13:20:12 +01:00
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;
};
};
2024-05-05 19:39:35 +02:00
config = mkIf cfg.enable { filetype.extension = mkIf cfg.autoSetFiletype { v = "vlang"; }; };
2023-11-27 13:20:12 +01:00
}