nvim: git integration improvements
This commit is contained in:
parent
cfcc6bbd51
commit
131ef3fe3c
5 changed files with 20 additions and 3 deletions
|
@ -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)
|
||||
|
|
|
@ -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]
|
||||
|
|
5
home/config/nvim/plugins/diffview.fnl
Normal file
5
home/config/nvim/plugins/diffview.fnl
Normal 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))}}))
|
|
@ -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})
|
||||
(aucmd :User {:pattern :NeogitCommitComplete
|
||||
:callback #(gitsigns.refresh)
|
||||
:group augroup})
|
||||
(aucmd :User {:pattern :NeogitPushComplete
|
||||
:callback neogit.close
|
||||
:group augroup}))
|
||||
|
|
|
@ -321,7 +321,11 @@ in
|
|||
type = "fennel";
|
||||
}
|
||||
|
||||
diffview-nvim
|
||||
{
|
||||
plugin = diffview-nvim;
|
||||
config = builtins.readFile ../../config/nvim/plugins/diffview.fnl;
|
||||
type = "fennel";
|
||||
}
|
||||
|
||||
{
|
||||
plugin = neogit;
|
||||
|
|
Loading…
Reference in a new issue