From 9f3b37bc10706598ea586a63806bae259681697f Mon Sep 17 00:00:00 2001 From: Krzysiek Wyka Date: Sat, 1 Mar 2025 19:48:40 +0100 Subject: [PATCH] Switch to better typescript language server --- init.lua | 11 ++++++----- lua/custom/plugins/neoclip.lua | 13 ------------- lua/custom/plugins/session.lua | 4 +--- lua/custom/plugins/typescript.lua | 5 +++++ lua/custom/plugins/workspace.lua | 2 +- 5 files changed, 13 insertions(+), 22 deletions(-) delete mode 100644 lua/custom/plugins/neoclip.lua create mode 100644 lua/custom/plugins/typescript.lua diff --git a/init.lua b/init.lua index a40ce11c..8b1fa4af 100644 --- a/init.lua +++ b/init.lua @@ -601,7 +601,7 @@ require('lazy').setup({ -- https://github.com/pmizio/typescript-tools.nvim -- -- But for many setups, the LSP (`ts_ls`) will work just fine - ts_ls = {}, + -- ts_ls = {}, -- lua_ls = { @@ -618,6 +618,8 @@ require('lazy').setup({ }, }, }, + + eslint = {}, } -- Ensure the servers and tools above are installed @@ -693,10 +695,9 @@ require('lazy').setup({ -- -- You can use 'stop_after_first' to run the first available formatter from the list -- javascript = { "prettierd", "prettier", stop_after_first = true }, - json = { { 'prettier' } }, - javascript = { { 'prettier' } }, - typescript = { { 'prettier' } }, - nix = { { 'nixfmt' } }, + json = { 'prettier', stop_after_first = true }, + javascript = { 'prettier', stop_after_first = true }, + typescript = { 'prettier', stop_after_first = true }, }, }, }, diff --git a/lua/custom/plugins/neoclip.lua b/lua/custom/plugins/neoclip.lua deleted file mode 100644 index dcdeccb9..00000000 --- a/lua/custom/plugins/neoclip.lua +++ /dev/null @@ -1,13 +0,0 @@ -return { - { - 'AckslD/nvim-neoclip.lua', - dependencies = { - { 'nvim-telescope/telescope.nvim' }, - }, - config = function() - require('neoclip').setup() - - vim.keymap.set('n', 'sv', ':Telescope neoclip', { desc = 'Yank history' }) - end, - }, -} diff --git a/lua/custom/plugins/session.lua b/lua/custom/plugins/session.lua index dc08add1..e87d0431 100644 --- a/lua/custom/plugins/session.lua +++ b/lua/custom/plugins/session.lua @@ -6,8 +6,6 @@ return { ---@module "auto-session" ---@type AutoSession.Config opts = { - -- suppressed_dirs = { '~/', '~/Projects', '~/Downloads', '/' }, - allowed_dirs = { '~/development/nodejs/work' }, - -- log_level = 'debug', + allowed_dirs = { '~/nodejs/work/*', '~/nodejs/private/*', '~/nodejs/playground/', '~/metadata/work/*', '~/golang/*' }, }, } diff --git a/lua/custom/plugins/typescript.lua b/lua/custom/plugins/typescript.lua new file mode 100644 index 00000000..ba7fb204 --- /dev/null +++ b/lua/custom/plugins/typescript.lua @@ -0,0 +1,5 @@ +return { + 'pmizio/typescript-tools.nvim', + dependencies = { 'nvim-lua/plenary.nvim', 'neovim/nvim-lspconfig' }, + opts = {}, +} diff --git a/lua/custom/plugins/workspace.lua b/lua/custom/plugins/workspace.lua index 72515c36..e5f73cb0 100644 --- a/lua/custom/plugins/workspace.lua +++ b/lua/custom/plugins/workspace.lua @@ -5,7 +5,7 @@ return { config = function() require('workspace').setup { workspaces = { - { name = 'Work', path = '~/development/nodejs/work', keymap = { 'w' } }, + { name = 'Work', path = '~/nodejs/work', keymap = { 'w' } }, }, }