diff --git a/home/editor/neovim/default.nix b/home/editor/neovim/default.nix index 44c58be..e382622 100644 --- a/home/editor/neovim/default.nix +++ b/home/editor/neovim/default.nix @@ -49,6 +49,7 @@ gopls nodePackages.pyright nodePackages.typescript-language-server + nodePackages.typescript nil yaml-language-server lua-language-server diff --git a/home/editor/neovim/plugins.lua b/home/editor/neovim/plugins.lua index e1b4454..f852fdf 100644 --- a/home/editor/neovim/plugins.lua +++ b/home/editor/neovim/plugins.lua @@ -4,7 +4,7 @@ local lsp_zero = require('lsp-zero') -lsp_zero.on_attach(function(client, bufnr) +lsp_zero.on_attach(function(_, bufnr) lsp_zero.default_keymaps({ buffer = bufnr }) end) @@ -17,6 +17,7 @@ lsp_zero.format_on_save({ ['gopls'] = { 'go' }, ['nil_ls'] = { 'nix' }, ['lua_ls'] = { 'lua' }, + ['tsserver'] = { 'typescript', 'javascript' }, }, }) @@ -84,6 +85,17 @@ lspconfig.lua_ls.setup({ } }) +lspconfig.tsserver.setup({ + init_options = { + plugins = { + }, + }, + filetypes = { + "typescript", + "javascript", + }, +}) + -- Telescope require('telescope').setup({