X-Git-Url: https://git.sthu.org/?p=vimconf.git;a=blobdiff_plain;f=plugins-noroot-nolowendbox.vim;h=4c9c4d77506d718c3624d94b0ce9b56c99feb3ee;hp=93d01f3b0238994fb09163d58fbf006e49cec6c7;hb=d768c759620dfbc8caa54bbb65ff784067057546;hpb=68f80c92cc99f2a2a29666b89b0e66259c1c8a7f diff --git a/plugins-noroot-nolowendbox.vim b/plugins-noroot-nolowendbox.vim index 93d01f3..4c9c4d7 100644 --- a/plugins-noroot-nolowendbox.vim +++ b/plugins-noroot-nolowendbox.vim @@ -45,3 +45,139 @@ if has('nvim-0.5') else Plug 'sheerun/vim-polyglot' endif + + +function PluginsNorootNolowendboxConfig() + + " 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'], + \ ] + + " Have deoplete completion for vimtex (e.g., bibtex entries) + au Filetype tex call deoplete#custom#var('omni', 'input_patterns', { + \ 'tex': g:vimtex#re#deoplete }) + + if has('nvim-0.5') + set foldexpr=nvim_treesitter#foldexpr() + +lua <