File tree Expand file tree Collapse file tree
dotfiles/.config/nvim/lua/dotfiles Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -16,5 +16,6 @@ function M.command(cmd, match)
1616end
1717
1818cabbrev (' grep' , ' silent grep!' )
19+ cabbrev (' Review' , ' DiffviewOpen' )
1920
2021return M
Original file line number Diff line number Diff line change 11local M = {}
22local fn = vim .fn
3- local dv = require (' diffview' )
4- local dv_lib = require (' diffview.lib' )
5- local diff = require (' dotfiles.diff' )
63
74local function cmd (name , action , flags )
85 local flag_pairs = {}
@@ -41,16 +38,6 @@ function M.find_replace_register(find, replace)
4138 vim .cmd (cmd )
4239end
4340
44- function M .review (rev )
45- dv .open (rev )
46-
47- local view = dv_lib .get_current_diffview ()
48-
49- if view then
50- diff .fix_highlight (view .left_winid , { force = true })
51- end
52- end
53-
5441function M .terminal (cmd )
5542 vim .cmd (cmd )
5643 vim .cmd (' term' )
6552 { nargs = ' +' }
6653)
6754
68- -- Git
69- cmd (' Review' , ' lua dotfiles.commands.review(<f-args>)' , { nargs = ' ?' })
70-
7155-- Terminals
7256cmd (' Term' , ' lua dotfiles.commands.terminal("new")' )
7357cmd (' Vterm' , ' lua dotfiles.commands.terminal("vnew")' )
Original file line number Diff line number Diff line change @@ -4,6 +4,7 @@ local cb = require('diffview.config').diffview_callback
44
55require (' diffview' ).setup {
66 diff_binaries = false ,
7+ enhanced_diff_hl = true ,
78 file_panel = {
89 width = 40 ,
910 use_icons = true
@@ -22,6 +23,8 @@ require('diffview').setup {
2223 [' U' ] = cb (' unstage_all' ),
2324 [' X' ] = cb (' restore_entry' ),
2425 [' R' ] = cb (' refresh_files' ),
26+ [' ]f' ] = cb (' select_next_entry' ),
27+ [' [f' ] = cb (' select_prev_entry' ),
2528 }
2629 }
2730}
You can’t perform that action at this time.
0 commit comments