diff --git a/.gitignore b/.gitignore index 1bfeacb..70a3cb3 100644 --- a/.gitignore +++ b/.gitignore @@ -1,3 +1,7 @@ /undodir +/tmp .DS_Store .nvimlog +*.swp +*.swo +*~ diff --git a/after/ftplugin/fugitive.lua b/after/ftplugin/fugitive.lua new file mode 100644 index 0000000..06af016 --- /dev/null +++ b/after/ftplugin/fugitive.lua @@ -0,0 +1 @@ +vim.keymap.set("n", "", "=", { buffer = true, remap = true }) diff --git a/init.lua b/init.lua index a04e72f..af708e9 100644 --- a/init.lua +++ b/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.cmdheight = 0 -- Hide command line when not in use vim.opt.laststatus = 3 -- Global statusline at the very bottom +vim.opt.fillchars = { vert = "│", fold = "─", foldsep = "│", diff = "─" } -- Keymaps vim.keymap.set("n", "q", ":q", { desc = "Quit" }) diff --git a/lazy-lock.json b/lazy-lock.json index d40063f..647406c 100644 --- a/lazy-lock.json +++ b/lazy-lock.json @@ -3,17 +3,17 @@ "arrow.nvim": { "branch": "master", "commit": "6e0f726f55f99332dd726a53effd6813786b6d49" }, "base46": { "branch": "v3.0", "commit": "884b990dcdbe07520a0892da6ba3e8d202b46337" }, "dashboard-nvim": { "branch": "master", "commit": "0775e567b6c0be96d01a61795f7b64c1758262f6" }, + "diffs.nvim": { "branch": "main", "commit": "75a6bf184ca70358d2fde93df5b5c4da79d9a2e5" }, "diffview.nvim": { "branch": "main", "commit": "4516612fe98ff56ae0415a259ff6361a89419b0a" }, "flash.nvim": { "branch": "main", "commit": "fcea7ff883235d9024dc41e638f164a450c14ca2" }, "gitsigns.nvim": { "branch": "main", "commit": "abf82a65f185bd54adc0679f74b7d6e1ada690c9" }, "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" }, "neo-tree.nvim": { "branch": "v3.x", "commit": "f3df514fff2bdd4318127c40470984137f87b62e" }, - "neogit": { "branch": "master", "commit": "73870229977fdd8747025820e15e98cfde787b9c" }, "nui.nvim": { "branch": "main", "commit": "de740991c12411b663994b2860f1a4fd0937c130" }, - "nvim-autopairs": { "branch": "master", "commit": "c2a0dd0d931d0fb07665e1fedb1ea688da3b80b4" }, - "nvim-lspconfig": { "branch": "master", "commit": "ff9c0af8f9b2097fdd2695058db7e04c193908aa" }, + "nvim-autopairs": { "branch": "master", "commit": "007047febaa3681a8d2f3dd5126fdb9c6e81f393" }, + "nvim-lspconfig": { "branch": "master", "commit": "238583bb00770b079c68c69a860d65e5d1d8acf9" }, "nvim-treesitter": { "branch": "master", "commit": "42fc28ba918343ebfd5565147a42a26580579482" }, "nvim-web-devicons": { "branch": "master", "commit": "803353450c374192393f5387b6a0176d0972b848" }, "oil.nvim": { "branch": "master", "commit": "f55b25e493a7df76371cfadd0ded5004cb9cd48a" }, @@ -21,6 +21,7 @@ "supermaven-nvim": { "branch": "main", "commit": "07d20fce48a5629686aefb0a7cd4b25e33947d50" }, "telescope.nvim": { "branch": "master", "commit": "d90956833d7c27e73c621a61f20b29fdb7122709" }, "ui": { "branch": "v3.0", "commit": "cb75908a86720172594b30de147272c1b3a7f452" }, + "vim-fugitive": { "branch": "master", "commit": "61b51c09b7c9ce04e821f6cf76ea4f6f903e3cf4" }, "vim-gutentags": { "branch": "master", "commit": "aa47c5e29c37c52176c44e61c780032dfacef3dd" }, "which-key.nvim": { "branch": "main", "commit": "3aab2147e74890957785941f0c1ad87d0a44c15a" } } diff --git a/lua/plugins/diffs.lua b/lua/plugins/diffs.lua new file mode 100644 index 0000000..5b51867 --- /dev/null +++ b/lua/plugins/diffs.lua @@ -0,0 +1,10 @@ +return { + "barrettruth/diffs.nvim", + ft = { "git", "fugitive", "diff" }, + opts = { + hide_prefix = true, + highlights = { + gutter = true, + }, + }, +} diff --git a/lua/plugins/git.lua b/lua/plugins/git.lua index d9e9815..37a7e28 100644 --- a/lua/plugins/git.lua +++ b/lua/plugins/git.lua @@ -66,4 +66,13 @@ return { }, }, + -- Fugitive: Additional Git commands + { + 'tpope/vim-fugitive', + cmd = { 'Git', 'Gblame', 'Gdiff', 'Gread', 'Gwrite', 'Ggrep' }, + keys = { + { 'gb', 'Git blame', desc = 'Git Blame' }, + { 'gd', 'Gdiff', desc = 'Git Diff (Fugitive)' }, + } + }, } diff --git a/lua/plugins/gitsigns.lua b/lua/plugins/gitsigns.lua index 561f6f4..9e3de90 100644 --- a/lua/plugins/gitsigns.lua +++ b/lua/plugins/gitsigns.lua @@ -3,39 +3,34 @@ return { event = { "BufReadPre", "BufNewFile" }, config = function() require("gitsigns").setup({ - -- Disable sign column indicators - signcolumn = false, - -- Show colors on line numbers - numhl = true, - -- Highlight the entire line for changed lines (Cursor-style) + signcolumn = true, + numhl = false, linehl = true, - -- Highlight the word that changed within a line - word_diff = true, - -- Show git blame at end of current line (optional, can be distracting) - current_line_blame = false, - current_line_blame_opts = { - virt_text = true, - virt_text_pos = 'eol', - delay = 1000, - ignore_whitespace = false, + word_diff = false, + signs = { + add = { text = "│" }, + change = { text = "│" }, + delete = { text = "_" }, + topdelete = { text = "‾" }, + changedelete = { text = "~" }, }, - -- Preview window configuration - preview_config = { - border = 'rounded', - style = 'minimal', + signs_staged = { + add = { text = "┃" }, + change = { text = "┃" }, + delete = { text = "_" }, + topdelete = { text = "‾" }, + changedelete = { text = "~" }, }, + signs_staged_enable = true, on_attach = function(bufnr) - -- Set up Cursor-style line highlights (subtle background colors) - -- Green tint for added lines + -- Unstaged changes - line highlighting vim.api.nvim_set_hl(0, "GitSignsAddLn", { bg = "#2a3a2a" }) - -- Red tint for removed/changed lines - vim.api.nvim_set_hl(0, "GitSignsChangeLn", { bg = "#3a2a2a" }) + vim.api.nvim_set_hl(0, "GitSignsChangeLn", { bg = "#3a3a2a" }) vim.api.nvim_set_hl(0, "GitSignsDeleteLn", { bg = "#3a2a2a" }) - vim.api.nvim_set_hl(0, "GitSignsChangedeleteLn", { bg = "#3a2a2a" }) - -- Word diff highlights (more prominent) - vim.api.nvim_set_hl(0, "GitSignsAddLnInline", { bg = "#3d5a3d" }) - vim.api.nvim_set_hl(0, "GitSignsChangeLnInline", { bg = "#5a3d3d" }) - vim.api.nvim_set_hl(0, "GitSignsDeleteLnInline", { bg = "#5a3d3d" }) + -- Staged changes - NO line highlighting (gutter only) + vim.api.nvim_set_hl(0, "GitSignsStagedAddLn", {}) + vim.api.nvim_set_hl(0, "GitSignsStagedChangeLn", {}) + vim.api.nvim_set_hl(0, "GitSignsStagedDeleteLn", {}) end, }) end, diff --git a/lua/plugins/treesitter.lua b/lua/plugins/treesitter.lua index c68d0cf..ec00bac 100644 --- a/lua/plugins/treesitter.lua +++ b/lua/plugins/treesitter.lua @@ -7,11 +7,11 @@ return { ensure_installed = { "lua", "vim", "vimdoc", "query", "javascript", "typescript", "python", "html", "css", "json", "yaml", "markdown" }, auto_install = true, highlight = { - enable = true, + enable = false, }, indent = { enable = true, }, }) end, -} \ No newline at end of file +}