1
0
Fork 0

nvim: git integration improvements
All checks were successful
Update Flake / update-flake (push) Successful in 2m33s
Build / build-amd64-linux (push) Successful in 1m42s
Build / build-arm64-linux (push) Successful in 12m44s

This commit is contained in:
Daniel Kempkens 2024-01-02 23:35:15 +01:00
parent cfcc6bbd51
commit 131ef3fe3c
Signed by: daniel
SSH key fingerprint: SHA256:Ks/MyhQYcPRQiwMKLAKquWCdCPe3JXlb1WttgnAoSeM
5 changed files with 20 additions and 3 deletions

View file

@ -42,6 +42,7 @@
{:desc "List VCS Branches"})
(keymap.set :n :<leader>vl #(gitsigns.blame_line {:full true})
{:desc "Blame Line"})
(keymap.set :n :<leader>vd :<cmd>DiffviewOpen<CR> {:desc "Open DiffView"})
(keymap.set :n :<leader>lk telescope-builtin.keymaps
{:desc "Show Keymappings"})
(keymap.set :n :<leader>ld #(telescope-builtin.diagnostics telescope-ivy)

View file

@ -72,7 +72,7 @@
(vim.cmd.redrawtabline))
:minwid (fn [self]
self.bufnr)}}})
(set mod.close-tabpage {:provider "%999X %X" :hl :TabLine})
(set mod.close-tabpage {:provider "%999X 󰅖 %X" :hl :TabLine})
;; Indicator
(set mod.active-indicator
{:provider (fn [self]

View file

@ -0,0 +1,5 @@
(let [diffview (require :diffview)]
(diffview.setup {:hooks {:diff_buf_read (fn [_bufnr]
(set vim.opt_local.relativenumber
false)
(set vim.b.toggle_line_style 0))}}))

View file

@ -1,4 +1,5 @@
(let [neogit (require :neogit)
gitsigns (require :gitsigns)
augroup (vim.api.nvim_create_augroup :NifocNeogit {:clear true})
aucmd vim.api.nvim_create_autocmd]
(neogit.setup {})
@ -11,4 +12,10 @@
:NeogitStatus
:NeogitTagMessage]
:callback #(set vim.b.toggle_line_style 0)
:group augroup}))
:group augroup})
(aucmd :User {:pattern :NeogitCommitComplete
:callback #(gitsigns.refresh)
:group augroup})
(aucmd :User {:pattern :NeogitPushComplete
:callback neogit.close
:group augroup}))

View file

@ -321,7 +321,11 @@ in
type = "fennel";
}
diffview-nvim
{
plugin = diffview-nvim;
config = builtins.readFile ../../config/nvim/plugins/diffview.fnl;
type = "fennel";
}
{
plugin = neogit;