arch-spatula / neovim-setup

neovim 설정 저장
0 stars 1 forks source link

git 커밋 준비를 위한 플러그인 #15

Closed arch-spatula closed 3 months ago

arch-spatula commented 3 months ago
feat/git-plugin

https://www.youtube.com/watch?v=zOQMwWqdp9w&t=105s

2개 플러그인 모두 유용해 보입니다.

https://github.com/sindrets/diffview.nvim

위 플러그인도 유용해보입니다.

arch-spatula commented 3 months ago

https://github.com/lewis6991/gitsigns.nvim

https://github.com/tpope/vim-fugitive

arch-spatula commented 3 months ago

https://github.com/NvChad/NvChad/blob/e5f8a38ae3d6b3bedf68f29b0e96dad7a4ca2da5/lua/nvchad/plugins/init.lua

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,
  },

위를 응용하기 바랍니다.

arch-spatula commented 3 months ago

https://github.com/jesseduffield/lazygit

arch-spatula commented 3 months ago

https://github.com/jesseduffield/lazygit

이 내용은 은근히 커서 이슈를 따로 열겠습니다.

https://github.com/sindrets/diffview.nvim

위 플러그인 설정도 다음 이슈로 남겨두겠습니다.