From 1fbc02c2a0bc5522f32773fd98bb8f988d44d9ec Mon Sep 17 00:00:00 2001 From: Stefan Huber Date: Sat, 18 Dec 2021 21:03:14 +0100 Subject: [PATCH] plugins: Split up plugin and init files --- init-plugins-noroot-nolowendbox.vim | 127 +++++++++++++++++ init-plugins-noroot.vim | 3 + init-plugins.vim | 69 +++++++++ init.vim | 209 +--------------------------- plugins-noroot-nolowendbox.vim | 36 +++++ plugins-noroot.vim | 33 +++++ plugins.vim | 69 +-------- 7 files changed, 271 insertions(+), 275 deletions(-) create mode 100644 init-plugins-noroot-nolowendbox.vim create mode 100644 init-plugins-noroot.vim create mode 100644 init-plugins.vim create mode 100644 plugins-noroot-nolowendbox.vim create mode 100644 plugins-noroot.vim diff --git a/init-plugins-noroot-nolowendbox.vim b/init-plugins-noroot-nolowendbox.vim new file mode 100644 index 0000000..eb48f8a --- /dev/null +++ b/init-plugins-noroot-nolowendbox.vim @@ -0,0 +1,127 @@ +" The denite settings are largely stolen from spacevim +let s:denite_options = { + \ 'default' : { + \ 'winheight' : 15, + \ 'mode' : 'insert', + \ 'start_filter' : 1, + \ 'quit' : 1, + \ 'highlight_matched_char' : 'MoreMsg', + \ 'highlight_matched_range' : 'MoreMsg', + \ 'direction': 'rightbelow', + \ }} + +augroup spacevim_layer_denite + autocmd! + autocmd FileType denite call s:denite_my_settings() +augroup END + +function! s:denite_my_settings() abort + nnoremap i + \ denite#do_map('open_filter_buffer') + nnoremap ' + \ denite#do_map('toggle_select').'j' + nnoremap q + \ denite#do_map('quit') + nnoremap + \ denite#do_map('do_action', 'tabopen') + nnoremap + \ denite#do_map('do_action', 'vsplit') + nnoremap + \ denite#do_map('do_action', 'split') + nnoremap + \ denite#do_map('do_action') + nnoremap p + \ denite#do_map('do_action', 'preview') + nnoremap j + nnoremap k +endfunction + +" FIND and GREP COMMANDS +if executable('rg') + " Ripgrep command on grep source + call denite#custom#var('grep', 'command', ['rg']) + call denite#custom#var('grep', 'default_opts', + \ ['--vimgrep', '--no-heading']) + call denite#custom#var('grep', 'recursive_opts', []) + call denite#custom#var('grep', 'pattern_opt', ['--regexp']) + call denite#custom#var('grep', 'separator', ['--']) + call denite#custom#var('grep', 'final_opts', []) +endif + +let s:insert_mode_mappings = [ + \ ['jk', '', 'noremap'], + \ ['', '', 'noremap'], + \ ['', '', 'noremap'], + \ ['', '', 'noremap'], + \ ['', '', 'noremap'], + \ ['', '', 'noremap'], + \ ['', '', 'noremap'], + \ ['', '', 'noremap'], + \ ['', '', 'noremap'], + \ ['', '', 'noremap'], + \ ['', '', 'noremap'], + \ ['', '', 'noremap'], + \ ['', '', 'noremap'], + \ ['', '', 'noremap'], + \ ] + +let s:normal_mode_mappings = [ + \ ["'", '', 'noremap'], + \ ['', '', 'noremap'], + \ ['', '', 'noremap'], + \ ['', '', 'noremap'], + \ ['', '', 'noremap'], + \ ['', '', 'noremap'], + \ ['', '', 'noremap'], + \ ['gg', '', 'noremap'], + \ ['', '', 'noremap'], + \ ['', '', 'noremap'], + \ ['', '', 'noremap'], + \ ['q', '', 'noremap'], + \ ['r', '', 'noremap'], + \ ] + + +if has('nvim-0.5') + set foldexpr=nvim_treesitter#foldexpr() + +lua < i - \ denite#do_map('open_filter_buffer') - nnoremap ' - \ denite#do_map('toggle_select').'j' - nnoremap q - \ denite#do_map('quit') - nnoremap - \ denite#do_map('do_action', 'tabopen') - nnoremap - \ denite#do_map('do_action', 'vsplit') - nnoremap - \ denite#do_map('do_action', 'split') - nnoremap - \ denite#do_map('do_action') - nnoremap p - \ denite#do_map('do_action', 'preview') - nnoremap j - nnoremap k - endfunction - - " FIND and GREP COMMANDS - if executable('rg') - " Ripgrep command on grep source - call denite#custom#var('grep', 'command', ['rg']) - call denite#custom#var('grep', 'default_opts', - \ ['--vimgrep', '--no-heading']) - call denite#custom#var('grep', 'recursive_opts', []) - call denite#custom#var('grep', 'pattern_opt', ['--regexp']) - call denite#custom#var('grep', 'separator', ['--']) - call denite#custom#var('grep', 'final_opts', []) - endif - - let s:insert_mode_mappings = [ - \ ['jk', '', 'noremap'], - \ ['', '', 'noremap'], - \ ['', '', 'noremap'], - \ ['', '', 'noremap'], - \ ['', '', 'noremap'], - \ ['', '', 'noremap'], - \ ['', '', 'noremap'], - \ ['', '', 'noremap'], - \ ['', '', 'noremap'], - \ ['', '', 'noremap'], - \ ['', '', 'noremap'], - \ ['', '', 'noremap'], - \ ['', '', 'noremap'], - \ ['', '', 'noremap'], - \ ] - - let s:normal_mode_mappings = [ - \ ["'", '', 'noremap'], - \ ['', '', 'noremap'], - \ ['', '', 'noremap'], - \ ['', '', 'noremap'], - \ ['', '', 'noremap'], - \ ['', '', 'noremap'], - \ ['', '', 'noremap'], - \ ['gg', '', 'noremap'], - \ ['', '', 'noremap'], - \ ['', '', 'noremap'], - \ ['', '', 'noremap'], - \ ['q', '', 'noremap'], - \ ['r', '', 'noremap'], - \ ] - - if has('nvim-0.5') - set foldexpr=nvim_treesitter#foldexpr() -lua <