mirror of
https://github.com/pratiktri/dotfiles.git
synced 2026-02-04 08:41:43 +05:30
NVIM
- Git worktree plugin config - Better keymaps <Alt>1,2,3,4 for Harpoon
This commit is contained in:
@@ -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", "<leader>glw", "<cmd> lua require('telescope').extensions.git_worktree.git_worktrees()<CR>")
|
||||
end,
|
||||
},
|
||||
|
||||
-- Adds git related signs to the gutter, as well as utilities for managing changes
|
||||
{
|
||||
|
||||
@@ -86,6 +86,39 @@ return {
|
||||
pyright = {},
|
||||
rust_analyzer = {},
|
||||
tsserver = {
|
||||
-- keys = {
|
||||
-- {
|
||||
-- "<leader>co",
|
||||
-- function()
|
||||
-- vim.lsp.buf.code_action({
|
||||
-- apply = true,
|
||||
-- context = {
|
||||
-- only = { "source.organizeImports.ts" },
|
||||
-- diagnostics = {},
|
||||
-- },
|
||||
-- })
|
||||
-- end,
|
||||
-- desc = "Typescript: Organize Imports",
|
||||
-- },
|
||||
-- {
|
||||
-- "<leader>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',
|
||||
|
||||
@@ -31,28 +31,28 @@ return {
|
||||
desc = "Show harpoon list",
|
||||
},
|
||||
{
|
||||
"<C-1>",
|
||||
"<M-1>",
|
||||
function()
|
||||
require("harpoon"):list():select(1)
|
||||
end,
|
||||
desc = "Switch to the 1st file in harpoon-list",
|
||||
},
|
||||
{
|
||||
"<C-2>",
|
||||
"<M-2>",
|
||||
function()
|
||||
require("harpoon"):list():select(2)
|
||||
end,
|
||||
desc = "Switch to the 2nd file in harpoon-list",
|
||||
},
|
||||
{
|
||||
"<C-3>",
|
||||
"<M-3>",
|
||||
function()
|
||||
require("harpoon"):list():select(3)
|
||||
end,
|
||||
desc = "Switch to the 3rd file in harpoon-list",
|
||||
},
|
||||
{
|
||||
"<C-4>",
|
||||
"<M-4>",
|
||||
function()
|
||||
require("harpoon"):list():select(4)
|
||||
end,
|
||||
@@ -115,7 +115,7 @@ return {
|
||||
"nvim-neo-tree/neo-tree.nvim",
|
||||
branch = "v3.x",
|
||||
keys = {
|
||||
{ "<leader>e", ":Neotree filesystem toggle<CR>", desc = "Open NeoTree Explorer at Git root", remap = true },
|
||||
{ "<leader>e", "<CMD>Neotree filesystem toggle<CR>", desc = "Open NeoTree Explorer at Git root", remap = true },
|
||||
|
||||
{
|
||||
"<leader>be",
|
||||
|
||||
Reference in New Issue
Block a user