mirror of
https://github.com/nix-community/nixvim.git
synced 2025-06-24 09:48:42 +02:00
modules/lsp/servers/vls: do not add filetype extension if not enabled
This commit is contained in:
parent
8eb5763bbb
commit
06261fc472
2 changed files with 32 additions and 1 deletions
29
tests/test-sources/plugins/lsp/language-servers/vls.nix
Normal file
29
tests/test-sources/plugins/lsp/language-servers/vls.nix
Normal file
|
@ -0,0 +1,29 @@
|
|||
{
|
||||
default = {
|
||||
plugins.lsp = {
|
||||
enable = true;
|
||||
servers.vls.enable = true;
|
||||
};
|
||||
|
||||
extraConfigLuaPost = ''
|
||||
-- V files are recognized by default
|
||||
assert(vim.filetype.match({ filename = "test.v" }) == "vlang", "V filetype is not recognized")
|
||||
'';
|
||||
};
|
||||
|
||||
extra-options = {
|
||||
plugins.lsp = {
|
||||
enable = true;
|
||||
|
||||
servers.vls = {
|
||||
enable = true;
|
||||
autoSetFiletype = true;
|
||||
};
|
||||
};
|
||||
|
||||
extraConfigLuaPost = ''
|
||||
-- autoSetFiletype
|
||||
assert(vim.filetype.match({ filename = "test.v" }) == "vlang", "V filetype is not recognized")
|
||||
'';
|
||||
};
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue