diff options
author | Johannes Stoelp <johannes.stoelp@gmail.com> | 2023-07-25 23:48:56 +0200 |
---|---|---|
committer | Johannes Stoelp <johannes.stoelp@gmail.com> | 2023-07-25 23:48:56 +0200 |
commit | c7b20ad53cff281a64831be31049769087780805 (patch) | |
tree | 43c7181dfa2065f468762254f9c478b5bbc0ddfb | |
parent | ad114c0daac3a0da84f875ce5127ac0ac978466d (diff) | |
download | dotfiles-c7b20ad53cff281a64831be31049769087780805.tar.gz dotfiles-c7b20ad53cff281a64831be31049769087780805.zip |
nvim: add diffview
-rw-r--r-- | nvim.init.vim | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/nvim.init.vim b/nvim.init.vim index 2732f02..bdd0617 100644 --- a/nvim.init.vim +++ b/nvim.init.vim @@ -32,6 +32,9 @@ call plug#begin('~/.nvim/plugged') " Treesitter Plug 'nvim-treesitter/nvim-treesitter', {'do': ':TSUpdate'} Plug 'nvim-treesitter/nvim-treesitter-context' + + " Diffview + Plug 'sindrets/diffview.nvim' call plug#end() " ----------------- @@ -150,6 +153,11 @@ require('telescope').setup{ } -- Telescope: load fzf-native. require('telescope').load_extension('fzf') + +-- Diffview +require('diffview').setup({ + use_icons = false, +}) EOF " ----------------- @@ -178,6 +186,11 @@ nnoremap <leader>fm <cmd>Telescope man_pages sections={"2","3"}<cr> nnoremap <leader>ft <cmd>Telescope lsp_document_symbols<cr> nnoremap <leader>fwt <cmd>Telescope lsp_dynamic_workspace_symbols<cr> +" Diffview +nnoremap <leader>do :DiffviewOpen --untracked-files=no +nnoremap <leader>dc <cmd>DiffviewClose<cr> +nnoremap <leader>dh :DiffviewFileHistory % + " ----------------- " Autogroups. " ----------------- |