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 {
|
return {
|
||||||
|
-- Fugitive
|
||||||
{ "tpope/vim-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
|
-- Adds git related signs to the gutter, as well as utilities for managing changes
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -86,6 +86,39 @@ return {
|
|||||||
pyright = {},
|
pyright = {},
|
||||||
rust_analyzer = {},
|
rust_analyzer = {},
|
||||||
tsserver = {
|
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 = {
|
typescript = {
|
||||||
inlayHints = {
|
inlayHints = {
|
||||||
-- includeInlayParameterNameHints = 'all',
|
-- includeInlayParameterNameHints = 'all',
|
||||||
|
|||||||
@@ -31,28 +31,28 @@ return {
|
|||||||
desc = "Show harpoon list",
|
desc = "Show harpoon list",
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"<C-1>",
|
"<M-1>",
|
||||||
function()
|
function()
|
||||||
require("harpoon"):list():select(1)
|
require("harpoon"):list():select(1)
|
||||||
end,
|
end,
|
||||||
desc = "Switch to the 1st file in harpoon-list",
|
desc = "Switch to the 1st file in harpoon-list",
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"<C-2>",
|
"<M-2>",
|
||||||
function()
|
function()
|
||||||
require("harpoon"):list():select(2)
|
require("harpoon"):list():select(2)
|
||||||
end,
|
end,
|
||||||
desc = "Switch to the 2nd file in harpoon-list",
|
desc = "Switch to the 2nd file in harpoon-list",
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"<C-3>",
|
"<M-3>",
|
||||||
function()
|
function()
|
||||||
require("harpoon"):list():select(3)
|
require("harpoon"):list():select(3)
|
||||||
end,
|
end,
|
||||||
desc = "Switch to the 3rd file in harpoon-list",
|
desc = "Switch to the 3rd file in harpoon-list",
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"<C-4>",
|
"<M-4>",
|
||||||
function()
|
function()
|
||||||
require("harpoon"):list():select(4)
|
require("harpoon"):list():select(4)
|
||||||
end,
|
end,
|
||||||
@@ -115,7 +115,7 @@ return {
|
|||||||
"nvim-neo-tree/neo-tree.nvim",
|
"nvim-neo-tree/neo-tree.nvim",
|
||||||
branch = "v3.x",
|
branch = "v3.x",
|
||||||
keys = {
|
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",
|
"<leader>be",
|
||||||
|
|||||||
Reference in New Issue
Block a user