mirror of
https://github.com/nix-community/nixvim.git
synced 2025-06-28 03:20:08 +02:00
plugins/lsp/volar: add ts-ls integration
This commit is contained in:
parent
384f97cf50
commit
a8ab73432a
2 changed files with 89 additions and 1 deletions
|
@ -691,6 +691,32 @@ let
|
|||
"nodePackages"
|
||||
"@volar/vue-language-server"
|
||||
];
|
||||
extraOptions = {
|
||||
tslsIntegration = mkOption {
|
||||
type = types.bool;
|
||||
description = ''
|
||||
Enable integration with TypeScript language server.
|
||||
'';
|
||||
default = true;
|
||||
example = false;
|
||||
};
|
||||
};
|
||||
extraConfig = cfg: {
|
||||
plugins.lsp.servers.ts-ls = lib.mkIf (cfg.enable && cfg.tslsIntegration) {
|
||||
filetypes = [ "vue" ];
|
||||
extraOptions = {
|
||||
init_options = {
|
||||
plugins = [
|
||||
{
|
||||
name = "@vue/typescript-plugin";
|
||||
location = "${lib.getBin cfg.package}/lib/node_modules/@vue/language-server";
|
||||
languages = [ "vue" ];
|
||||
}
|
||||
];
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
{
|
||||
name = "yamlls";
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue