Skip to content

Commit

Permalink
feat: adds diffview
Browse files Browse the repository at this point in the history
  • Loading branch information
ixahmedxi committed Dec 19, 2022
1 parent dff755e commit e7e78a7
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 0 deletions.
1 change: 1 addition & 0 deletions init.lua
Original file line number Diff line number Diff line change
Expand Up @@ -34,3 +34,4 @@ require("config.cursorline")
require("config.color-highlight")
require("config.tmux")
require("config.git-conflict")
require("config.diffview")
3 changes: 3 additions & 0 deletions lua/config/diffview.lua
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
import("diffview", function(diffview)
diffview.setup()
end)
1 change: 1 addition & 0 deletions lua/config/plugins.lua
Original file line number Diff line number Diff line change
Expand Up @@ -143,6 +143,7 @@ return packer.startup(function(use)
require("persistence").setup()
end,
})
use("sindrets/diffview.nvim")

if PACKER_BOOTSTRAP then
require("packer").sync()
Expand Down
9 changes: 9 additions & 0 deletions lua/config/which-key.lua
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,15 @@ import("which-key", function(whichKey)
["s"] = { "<cmd>lua require('telescope.builtin').git_status()<CR>", "Status" },
["c"] = { "<cmd>lua require('telescope.builtin').git_commits()<CR>", "Commits" },
["b"] = { "<cmd>lua require('telescope.builtin').git_branches()<CR>", "Branches" },
["d"] = {
name = "Diff view",
["o"] = { "<cmd>DiffviewOpen<CR>", "Open" },
["d"] = { "<cmd>DiffviewClose<CR>", "Close" },
["l"] = { "<cmd>DiffviewLog<CR>", "Log" },
["r"] = { "<cmd>DiffviewRefresh<CR>", "Refresh" },
["f"] = { "<cmd>DiffviewFocusFiles<CR>", "Focus files" },
["h"] = { "<cmd>DiffviewFileHistory<CR>", "File history" },
},
},
["l"] = {
name = "LSP",
Expand Down

0 comments on commit e7e78a7

Please sign in to comment.