diff --git a/common/.config/nvim/lua/plugins/code-git.lua b/common/.config/nvim/lua/plugins/code-git.lua index d443d25..5260973 100644 --- a/common/.config/nvim/lua/plugins/code-git.lua +++ b/common/.config/nvim/lua/plugins/code-git.lua @@ -1,6 +1,17 @@ return { + -- Fugitive { "tpope/vim-fugitive" }, - --{ "tpope/vim-rhubarb" }, --If fugitive.vim is the Git, rhubarb.vim is the Hub. + + -- Git worktree + { + "ThePrimeagen/git-worktree.nvim", + config = function() + -- FIX: Open files do NOT get replaced with the changed branch + require("telescope").load_extension("git_worktree") + + vim.keymap.set("n", "glw", " lua require('telescope').extensions.git_worktree.git_worktrees()") + end, + }, -- Adds git related signs to the gutter, as well as utilities for managing changes { diff --git a/common/.config/nvim/lua/plugins/code-lsp.lua b/common/.config/nvim/lua/plugins/code-lsp.lua index d50b9a7..58683da 100644 --- a/common/.config/nvim/lua/plugins/code-lsp.lua +++ b/common/.config/nvim/lua/plugins/code-lsp.lua @@ -86,6 +86,39 @@ return { pyright = {}, rust_analyzer = {}, tsserver = { + -- keys = { + -- { + -- "co", + -- function() + -- vim.lsp.buf.code_action({ + -- apply = true, + -- context = { + -- only = { "source.organizeImports.ts" }, + -- diagnostics = {}, + -- }, + -- }) + -- end, + -- desc = "Typescript: Organize Imports", + -- }, + -- { + -- "cO", + -- function() + -- vim.lsp.buf.code_action({ + -- apply = true, + -- context = { + -- only = { "source.removeUnused.ts" }, + -- diagnostics = {}, + -- }, + -- }) + -- end, + -- desc = "Typescript: Remove Unused Imports", + -- }, + -- }, + settings = { + completions = { + completeFunctionCalls = true, + }, + }, typescript = { inlayHints = { -- includeInlayParameterNameHints = 'all', diff --git a/common/.config/nvim/lua/plugins/navigate-files.lua b/common/.config/nvim/lua/plugins/navigate-files.lua index b218452..31c2438 100644 --- a/common/.config/nvim/lua/plugins/navigate-files.lua +++ b/common/.config/nvim/lua/plugins/navigate-files.lua @@ -31,28 +31,28 @@ return { desc = "Show harpoon list", }, { - "", + "", function() require("harpoon"):list():select(1) end, desc = "Switch to the 1st file in harpoon-list", }, { - "", + "", function() require("harpoon"):list():select(2) end, desc = "Switch to the 2nd file in harpoon-list", }, { - "", + "", function() require("harpoon"):list():select(3) end, desc = "Switch to the 3rd file in harpoon-list", }, { - "", + "", function() require("harpoon"):list():select(4) end, @@ -115,7 +115,7 @@ return { "nvim-neo-tree/neo-tree.nvim", branch = "v3.x", keys = { - { "e", ":Neotree filesystem toggle", desc = "Open NeoTree Explorer at Git root", remap = true }, + { "e", "Neotree filesystem toggle", desc = "Open NeoTree Explorer at Git root", remap = true }, { "be",