Closed arch-spatula closed 3 months ago
https://github.com/lewis6991/gitsigns.nvim
https://github.com/tpope/vim-fugitive
local options = {
signs = {
add = { text = "│" },
change = { text = "│" },
delete = { text = "" },
topdelete = { text = "‾" },
changedelete = { text = "~" },
untracked = { text = "│" },
},
on_attach = function(bufnr)
local gs = package.loaded.gitsigns
local function opts(desc)
return { buffer = bufnr, desc = desc }
end
local map = vim.keymap.set
map("n", "<leader>rh", gs.reset_hunk, opts "Reset Hunk")
map("n", "<leader>ph", gs.preview_hunk, opts "Preview Hunk")
map("n", "<leader>gb", gs.blame_line, opts "Blame Line")
end,
}
return options
{
"lewis6991/gitsigns.nvim",
event = "User FilePost",
opts = function()
return require "nvchad.configs.gitsigns"
end,
config = function(_, opts)
dofile(vim.g.base46_cache .. "git")
require("gitsigns").setup(opts)
end,
},
위를 응용하기 바랍니다.
이 내용은 은근히 커서 이슈를 따로 열겠습니다.
위 플러그인 설정도 다음 이슈로 남겨두겠습니다.
https://www.youtube.com/watch?v=zOQMwWqdp9w&t=105s
2개 플러그인 모두 유용해 보입니다.
https://github.com/sindrets/diffview.nvim
위 플러그인도 유용해보입니다.