diff --git a/chezmoi/dot_config/nvim/lua/aleidk/plugins/init.lua b/chezmoi/dot_config/nvim/lua/aleidk/plugins/init.lua index fcac693..a8e2d50 100644 --- a/chezmoi/dot_config/nvim/lua/aleidk/plugins/init.lua +++ b/chezmoi/dot_config/nvim/lua/aleidk/plugins/init.lua @@ -66,4 +66,22 @@ return { vim.keymap.set("n", "fz", telescope.extensions.chezmoi.find_files, { desc = "Find dotfile" }) end, }, + { + "pmizio/typescript-tools.nvim", + dependencies = { "nvim-lua/plenary.nvim", "neovim/nvim-lspconfig" }, + opts = { + init_options = { + preferences = { + disableSuggestions = true, + }, + }, + settings = { + -- array of strings("fix_all"|"add_missing_imports"|"remove_unused"| + -- "remove_unused_imports"|"organize_imports") -- or string "all" + -- to include all supported code actions + -- specify commands exposed as code_actions + expose_as_code_action = "all", + }, + }, + }, } diff --git a/chezmoi/dot_config/nvim/lua/aleidk/plugins/lsp.lua b/chezmoi/dot_config/nvim/lua/aleidk/plugins/lsp.lua index 1590b17..3c40245 100644 --- a/chezmoi/dot_config/nvim/lua/aleidk/plugins/lsp.lua +++ b/chezmoi/dot_config/nvim/lua/aleidk/plugins/lsp.lua @@ -22,7 +22,8 @@ return { end nmap("lr", vim.lsp.buf.rename, "Rename") - nmap("la", vim.lsp.buf.code_action, "Code Action") + -- stylua: ignore + vim.keymap.set({ "n", "x", "v" }, "la", vim.lsp.buf.code_action, { buffer = bufnr, desc = "Code Action" }) nmap("ld", vim.lsp.buf.type_definition, "Go to type definition") nmap("lf", function() vim.lsp.buf.format() @@ -61,13 +62,6 @@ return { rust_analyzer = {}, sqlls = {}, nimlsp = {}, - tsserver = { - init_options = { - preferences = { - disableSuggestions = true, - }, - }, - }, yamlls = {}, lua_ls = { settings = { diff --git a/chezmoi/dot_config/nvim/original_lazy-lock.json b/chezmoi/dot_config/nvim/original_lazy-lock.json index 1f0ce0b..1283bfa 100644 --- a/chezmoi/dot_config/nvim/original_lazy-lock.json +++ b/chezmoi/dot_config/nvim/original_lazy-lock.json @@ -62,6 +62,7 @@ "trouble.nvim": { "branch": "main", "commit": "f1168feada93c0154ede4d1fe9183bf69bac54ea" }, "ts-node-action": { "branch": "master", "commit": "f266409809555d7604b1ba894ffad8958670d04f" }, "twilight.nvim": { "branch": "main", "commit": "8b7b50c0cb2dc781b2f4262a5ddd57571556d1e4" }, + "typescript-tools.nvim": { "branch": "master", "commit": "c43d9580c3ff5999a1eabca849f807ab33787ea7" }, "undotree": { "branch": "master", "commit": "aa93a7e5890dbbebbc064cd22260721a6db1a196" }, "vim-dadbod": { "branch": "master", "commit": "fecf5a3ecfb1869f34252c7c27351de99f01ab0e" }, "vim-dadbod-completion": { "branch": "master", "commit": "bcdf3ff768cc7e544a0f78b0383d8719c2116569" },