Compare commits

..

1 commit

Author SHA1 Message Date
34240ddad0
neovim: try to fix tsserver ls 2024-08-10 06:19:49 +03:00
4 changed files with 16 additions and 21 deletions

View file

@ -1,4 +1,4 @@
{ config, lib, ... }:
{ config, lib, pkgs, ... }:
let inherit (lib.nix2lua) call; in
{
@ -25,12 +25,22 @@ let inherit (lib.nix2lua) call; in
"cargo.autoreload" = true;
};
};
tsserver = rec {
filetypes = [ "javascript" "javascriptreact" "typescript" "typescriptreact" "vue" ];
cmd = "${pkgs.nodePackages.typescript-language-server}/bin/typescript-language-server --stdio";
init_options = {
plugins = [
{
name = "@vue/typescript-plugin";
location = "./node_modules/@vue/typescript-plugin";
languages = filetypes;
}
];
tsserver.fallbackPath = "${pkgs.nodePackages.typescript}/lib/node_modules/typescript/lib";
};
};
eslint = {
on_attach = config.fn.lspconfig-eslint-on-attach.lambda;
flags = {
allow_incremental_sync = false;
debounce_text_changes = 1000;
};
};
volar = {
init_options = {
@ -46,6 +56,6 @@ let inherit (lib.nix2lua) call; in
root_dir = call "${config.plugin.nvim-lspconfig.varName}.util.root_pattern" [ "deno.json" "deno.jsonc" ];
};
jdtls = { cmd = [ "jdtls" ]; };
jsonls = { };
jsonls = {};
};
}

View file

@ -29,7 +29,6 @@ in
d2 = "*.d2";
nickel = "*.ncl";
psql = "*.psql";
sql = "*.pgsql";
};
# Enable fast navigation between windows

View file

@ -1,6 +1,5 @@
{
imports = [
./ollama.nix
./typescript-tools.nix
];
}

View file

@ -1,13 +0,0 @@
{
plugin.typescript-tools-nvim = {
enable = true;
name = "typescript-tools";
setupSettings = {
filetypes = [ "javascript" "javascriptreact" "typescript" "typescriptreact" "vue" ];
settings = {
tsserver_max_memory = "auto";
tsserver_plugins = [ "@vue/typescript-plugin" ];
};
};
};
}