Compare commits

..

5 commits

4 changed files with 21 additions and 16 deletions

View file

@ -1,4 +1,4 @@
{ config, lib, pkgs, ... }: { config, lib, ... }:
let inherit (lib.nix2lua) call; in let inherit (lib.nix2lua) call; in
{ {
@ -25,22 +25,12 @@ let inherit (lib.nix2lua) call; in
"cargo.autoreload" = true; "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 = { eslint = {
on_attach = config.fn.lspconfig-eslint-on-attach.lambda; on_attach = config.fn.lspconfig-eslint-on-attach.lambda;
flags = {
allow_incremental_sync = false;
debounce_text_changes = 1000;
};
}; };
volar = { volar = {
init_options = { init_options = {

View file

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

View file

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

View file

@ -0,0 +1,13 @@
{
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" ];
};
};
};
}