mirror of
https://github.com/harivansh-afk/nvim.git
synced 2026-04-17 14:01:24 +00:00
fix diffs
This commit is contained in:
parent
c86c905c58
commit
cbd29817fb
8 changed files with 54 additions and 33 deletions
4
.gitignore
vendored
4
.gitignore
vendored
|
|
@ -1,3 +1,7 @@
|
||||||
/undodir
|
/undodir
|
||||||
|
/tmp
|
||||||
.DS_Store
|
.DS_Store
|
||||||
.nvimlog
|
.nvimlog
|
||||||
|
*.swp
|
||||||
|
*.swo
|
||||||
|
*~
|
||||||
|
|
|
||||||
1
after/ftplugin/fugitive.lua
Normal file
1
after/ftplugin/fugitive.lua
Normal file
|
|
@ -0,0 +1 @@
|
||||||
|
vim.keymap.set("n", "<Tab>", "=", { buffer = true, remap = true })
|
||||||
1
init.lua
1
init.lua
|
|
@ -50,6 +50,7 @@ vim.opt.shortmess:append("S") -- Disable native search count display
|
||||||
vim.opt.ruler = false -- Disable native ruler (NvChad statusline shows position)
|
vim.opt.ruler = false -- Disable native ruler (NvChad statusline shows position)
|
||||||
vim.opt.cmdheight = 0 -- Hide command line when not in use
|
vim.opt.cmdheight = 0 -- Hide command line when not in use
|
||||||
vim.opt.laststatus = 3 -- Global statusline at the very bottom
|
vim.opt.laststatus = 3 -- Global statusline at the very bottom
|
||||||
|
vim.opt.fillchars = { vert = "│", fold = "─", foldsep = "│", diff = "─" }
|
||||||
|
|
||||||
-- Keymaps
|
-- Keymaps
|
||||||
vim.keymap.set("n", "<leader>q", ":q<CR>", { desc = "Quit" })
|
vim.keymap.set("n", "<leader>q", ":q<CR>", { desc = "Quit" })
|
||||||
|
|
|
||||||
|
|
@ -3,17 +3,17 @@
|
||||||
"arrow.nvim": { "branch": "master", "commit": "6e0f726f55f99332dd726a53effd6813786b6d49" },
|
"arrow.nvim": { "branch": "master", "commit": "6e0f726f55f99332dd726a53effd6813786b6d49" },
|
||||||
"base46": { "branch": "v3.0", "commit": "884b990dcdbe07520a0892da6ba3e8d202b46337" },
|
"base46": { "branch": "v3.0", "commit": "884b990dcdbe07520a0892da6ba3e8d202b46337" },
|
||||||
"dashboard-nvim": { "branch": "master", "commit": "0775e567b6c0be96d01a61795f7b64c1758262f6" },
|
"dashboard-nvim": { "branch": "master", "commit": "0775e567b6c0be96d01a61795f7b64c1758262f6" },
|
||||||
|
"diffs.nvim": { "branch": "main", "commit": "75a6bf184ca70358d2fde93df5b5c4da79d9a2e5" },
|
||||||
"diffview.nvim": { "branch": "main", "commit": "4516612fe98ff56ae0415a259ff6361a89419b0a" },
|
"diffview.nvim": { "branch": "main", "commit": "4516612fe98ff56ae0415a259ff6361a89419b0a" },
|
||||||
"flash.nvim": { "branch": "main", "commit": "fcea7ff883235d9024dc41e638f164a450c14ca2" },
|
"flash.nvim": { "branch": "main", "commit": "fcea7ff883235d9024dc41e638f164a450c14ca2" },
|
||||||
"gitsigns.nvim": { "branch": "main", "commit": "abf82a65f185bd54adc0679f74b7d6e1ada690c9" },
|
"gitsigns.nvim": { "branch": "main", "commit": "abf82a65f185bd54adc0679f74b7d6e1ada690c9" },
|
||||||
"lazy.nvim": { "branch": "main", "commit": "306a05526ada86a7b30af95c5cc81ffba93fef97" },
|
"lazy.nvim": { "branch": "main", "commit": "306a05526ada86a7b30af95c5cc81ffba93fef97" },
|
||||||
"mason-lspconfig.nvim": { "branch": "main", "commit": "fb179adb7161b53ec998b1139002473434586c3f" },
|
"mason-lspconfig.nvim": { "branch": "main", "commit": "3d89e7c92fbd96c5e10e0298fc2b006f21cf9428" },
|
||||||
"mason.nvim": { "branch": "main", "commit": "44d1e90e1f66e077268191e3ee9d2ac97cc18e65" },
|
"mason.nvim": { "branch": "main", "commit": "44d1e90e1f66e077268191e3ee9d2ac97cc18e65" },
|
||||||
"neo-tree.nvim": { "branch": "v3.x", "commit": "f3df514fff2bdd4318127c40470984137f87b62e" },
|
"neo-tree.nvim": { "branch": "v3.x", "commit": "f3df514fff2bdd4318127c40470984137f87b62e" },
|
||||||
"neogit": { "branch": "master", "commit": "73870229977fdd8747025820e15e98cfde787b9c" },
|
|
||||||
"nui.nvim": { "branch": "main", "commit": "de740991c12411b663994b2860f1a4fd0937c130" },
|
"nui.nvim": { "branch": "main", "commit": "de740991c12411b663994b2860f1a4fd0937c130" },
|
||||||
"nvim-autopairs": { "branch": "master", "commit": "c2a0dd0d931d0fb07665e1fedb1ea688da3b80b4" },
|
"nvim-autopairs": { "branch": "master", "commit": "007047febaa3681a8d2f3dd5126fdb9c6e81f393" },
|
||||||
"nvim-lspconfig": { "branch": "master", "commit": "ff9c0af8f9b2097fdd2695058db7e04c193908aa" },
|
"nvim-lspconfig": { "branch": "master", "commit": "238583bb00770b079c68c69a860d65e5d1d8acf9" },
|
||||||
"nvim-treesitter": { "branch": "master", "commit": "42fc28ba918343ebfd5565147a42a26580579482" },
|
"nvim-treesitter": { "branch": "master", "commit": "42fc28ba918343ebfd5565147a42a26580579482" },
|
||||||
"nvim-web-devicons": { "branch": "master", "commit": "803353450c374192393f5387b6a0176d0972b848" },
|
"nvim-web-devicons": { "branch": "master", "commit": "803353450c374192393f5387b6a0176d0972b848" },
|
||||||
"oil.nvim": { "branch": "master", "commit": "f55b25e493a7df76371cfadd0ded5004cb9cd48a" },
|
"oil.nvim": { "branch": "master", "commit": "f55b25e493a7df76371cfadd0ded5004cb9cd48a" },
|
||||||
|
|
@ -21,6 +21,7 @@
|
||||||
"supermaven-nvim": { "branch": "main", "commit": "07d20fce48a5629686aefb0a7cd4b25e33947d50" },
|
"supermaven-nvim": { "branch": "main", "commit": "07d20fce48a5629686aefb0a7cd4b25e33947d50" },
|
||||||
"telescope.nvim": { "branch": "master", "commit": "d90956833d7c27e73c621a61f20b29fdb7122709" },
|
"telescope.nvim": { "branch": "master", "commit": "d90956833d7c27e73c621a61f20b29fdb7122709" },
|
||||||
"ui": { "branch": "v3.0", "commit": "cb75908a86720172594b30de147272c1b3a7f452" },
|
"ui": { "branch": "v3.0", "commit": "cb75908a86720172594b30de147272c1b3a7f452" },
|
||||||
|
"vim-fugitive": { "branch": "master", "commit": "61b51c09b7c9ce04e821f6cf76ea4f6f903e3cf4" },
|
||||||
"vim-gutentags": { "branch": "master", "commit": "aa47c5e29c37c52176c44e61c780032dfacef3dd" },
|
"vim-gutentags": { "branch": "master", "commit": "aa47c5e29c37c52176c44e61c780032dfacef3dd" },
|
||||||
"which-key.nvim": { "branch": "main", "commit": "3aab2147e74890957785941f0c1ad87d0a44c15a" }
|
"which-key.nvim": { "branch": "main", "commit": "3aab2147e74890957785941f0c1ad87d0a44c15a" }
|
||||||
}
|
}
|
||||||
|
|
|
||||||
10
lua/plugins/diffs.lua
Normal file
10
lua/plugins/diffs.lua
Normal file
|
|
@ -0,0 +1,10 @@
|
||||||
|
return {
|
||||||
|
"barrettruth/diffs.nvim",
|
||||||
|
ft = { "git", "fugitive", "diff" },
|
||||||
|
opts = {
|
||||||
|
hide_prefix = true,
|
||||||
|
highlights = {
|
||||||
|
gutter = true,
|
||||||
|
},
|
||||||
|
},
|
||||||
|
}
|
||||||
|
|
@ -66,4 +66,13 @@ return {
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
|
||||||
|
-- Fugitive: Additional Git commands
|
||||||
|
{
|
||||||
|
'tpope/vim-fugitive',
|
||||||
|
cmd = { 'Git', 'Gblame', 'Gdiff', 'Gread', 'Gwrite', 'Ggrep' },
|
||||||
|
keys = {
|
||||||
|
{ '<leader>gb', '<cmd>Git blame<cr>', desc = 'Git Blame' },
|
||||||
|
{ '<leader>gd', '<cmd>Gdiff<cr>', desc = 'Git Diff (Fugitive)' },
|
||||||
|
}
|
||||||
|
},
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -3,39 +3,34 @@ return {
|
||||||
event = { "BufReadPre", "BufNewFile" },
|
event = { "BufReadPre", "BufNewFile" },
|
||||||
config = function()
|
config = function()
|
||||||
require("gitsigns").setup({
|
require("gitsigns").setup({
|
||||||
-- Disable sign column indicators
|
signcolumn = true,
|
||||||
signcolumn = false,
|
numhl = false,
|
||||||
-- Show colors on line numbers
|
|
||||||
numhl = true,
|
|
||||||
-- Highlight the entire line for changed lines (Cursor-style)
|
|
||||||
linehl = true,
|
linehl = true,
|
||||||
-- Highlight the word that changed within a line
|
word_diff = false,
|
||||||
word_diff = true,
|
signs = {
|
||||||
-- Show git blame at end of current line (optional, can be distracting)
|
add = { text = "│" },
|
||||||
current_line_blame = false,
|
change = { text = "│" },
|
||||||
current_line_blame_opts = {
|
delete = { text = "_" },
|
||||||
virt_text = true,
|
topdelete = { text = "‾" },
|
||||||
virt_text_pos = 'eol',
|
changedelete = { text = "~" },
|
||||||
delay = 1000,
|
|
||||||
ignore_whitespace = false,
|
|
||||||
},
|
},
|
||||||
-- Preview window configuration
|
signs_staged = {
|
||||||
preview_config = {
|
add = { text = "┃" },
|
||||||
border = 'rounded',
|
change = { text = "┃" },
|
||||||
style = 'minimal',
|
delete = { text = "_" },
|
||||||
|
topdelete = { text = "‾" },
|
||||||
|
changedelete = { text = "~" },
|
||||||
},
|
},
|
||||||
|
signs_staged_enable = true,
|
||||||
on_attach = function(bufnr)
|
on_attach = function(bufnr)
|
||||||
-- Set up Cursor-style line highlights (subtle background colors)
|
-- Unstaged changes - line highlighting
|
||||||
-- Green tint for added lines
|
|
||||||
vim.api.nvim_set_hl(0, "GitSignsAddLn", { bg = "#2a3a2a" })
|
vim.api.nvim_set_hl(0, "GitSignsAddLn", { bg = "#2a3a2a" })
|
||||||
-- Red tint for removed/changed lines
|
vim.api.nvim_set_hl(0, "GitSignsChangeLn", { bg = "#3a3a2a" })
|
||||||
vim.api.nvim_set_hl(0, "GitSignsChangeLn", { bg = "#3a2a2a" })
|
|
||||||
vim.api.nvim_set_hl(0, "GitSignsDeleteLn", { bg = "#3a2a2a" })
|
vim.api.nvim_set_hl(0, "GitSignsDeleteLn", { bg = "#3a2a2a" })
|
||||||
vim.api.nvim_set_hl(0, "GitSignsChangedeleteLn", { bg = "#3a2a2a" })
|
-- Staged changes - NO line highlighting (gutter only)
|
||||||
-- Word diff highlights (more prominent)
|
vim.api.nvim_set_hl(0, "GitSignsStagedAddLn", {})
|
||||||
vim.api.nvim_set_hl(0, "GitSignsAddLnInline", { bg = "#3d5a3d" })
|
vim.api.nvim_set_hl(0, "GitSignsStagedChangeLn", {})
|
||||||
vim.api.nvim_set_hl(0, "GitSignsChangeLnInline", { bg = "#5a3d3d" })
|
vim.api.nvim_set_hl(0, "GitSignsStagedDeleteLn", {})
|
||||||
vim.api.nvim_set_hl(0, "GitSignsDeleteLnInline", { bg = "#5a3d3d" })
|
|
||||||
end,
|
end,
|
||||||
})
|
})
|
||||||
end,
|
end,
|
||||||
|
|
|
||||||
|
|
@ -7,7 +7,7 @@ return {
|
||||||
ensure_installed = { "lua", "vim", "vimdoc", "query", "javascript", "typescript", "python", "html", "css", "json", "yaml", "markdown" },
|
ensure_installed = { "lua", "vim", "vimdoc", "query", "javascript", "typescript", "python", "html", "css", "json", "yaml", "markdown" },
|
||||||
auto_install = true,
|
auto_install = true,
|
||||||
highlight = {
|
highlight = {
|
||||||
enable = true,
|
enable = false,
|
||||||
},
|
},
|
||||||
indent = {
|
indent = {
|
||||||
enable = true,
|
enable = true,
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue