From c7b20ad53cff281a64831be31049769087780805 Mon Sep 17 00:00:00 2001 From: Johannes Stoelp Date: Tue, 25 Jul 2023 23:48:56 +0200 Subject: nvim: add diffview --- nvim.init.vim | 13 +++++++++++++ 1 file changed, 13 insertions(+) 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 fm Telescope man_pages sections={"2","3"} nnoremap ft Telescope lsp_document_symbols nnoremap fwt Telescope lsp_dynamic_workspace_symbols +" Diffview +nnoremap do :DiffviewOpen --untracked-files=no +nnoremap dc DiffviewClose +nnoremap dh :DiffviewFileHistory % + " ----------------- " Autogroups. " ----------------- -- cgit v1.2.3