Reorganize vim plugin settings
Setting everything during PlugLoad function caused some plugins to misbehave. Plugins are now loaded by Plug and their settings can be either set with a file in the plugin directory (this mimicks the old way of setting plugin up during load) or in after/ directory, which sets options *after* everything has loaded.
This commit is contained in:
parent
6b79eeef5d
commit
756e45e037
29 changed files with 305 additions and 274 deletions
|
|
@ -113,9 +113,44 @@ Plug 'rakr/vim-one'
|
|||
Plug 'vim-pandoc/vim-pandoc'
|
||||
Plug 'vim-pandoc/vim-pandoc-syntax'
|
||||
|
||||
Plug 'Shougo/deoplete.nvim' " automatic suggestions, can also perhaps be changed for newer plugs
|
||||
|
||||
call plug#end()
|
||||
endif
|
||||
|
||||
" PLUGIN: DEOPLETE
|
||||
" enable deoplete at startup
|
||||
let g:deoplete#enable_at_startup = 1
|
||||
let g:deoplete#enable_ignore_case = 1
|
||||
let g:deoplete#enable_smart_case = 1
|
||||
let g:deoplete#enable_camel_case = 1
|
||||
let g:deoplete#enable_refresh_always = 1
|
||||
let g:deoplete#max_abbr_width = 0
|
||||
let g:deoplete#max_menu_width = 0
|
||||
" call deoplete#custom#var('omni', 'input_patterns', {
|
||||
" \ 'pandoc': '@',
|
||||
" \})
|
||||
" call deoplete#enable()
|
||||
" lazy loading since they require a lot of startup time
|
||||
let s:ide_features_loaded=0
|
||||
function! Autocomplete_linting_init() abort
|
||||
if s:ide_features_loaded || !has('nvim')
|
||||
return
|
||||
endif
|
||||
let s:ide_features_loaded=1
|
||||
call plug#load('ale', 'deoplete.nvim', 'echodoc.vim')
|
||||
call echodoc#enable()
|
||||
call deoplete#custom#var('omni', 'input_patterns', {
|
||||
\ 'pandoc': '@',
|
||||
\})
|
||||
call deoplete#enable()
|
||||
endfunction
|
||||
|
||||
augroup load_ide_features
|
||||
autocmd!
|
||||
autocmd InsertEnter * call Autocomplete_linting_init()
|
||||
augroup END
|
||||
|
||||
set foldlevel=2
|
||||
|
||||
" PLUGIN: vim-pandoc
|
||||
|
|
@ -141,8 +176,8 @@ let g:pandoc#hypertext#create_if_no_alternates_exists=1
|
|||
let g:pandoc#syntax#conceal#use = 1
|
||||
let g:pandoc#syntax#conceal#urls = 1
|
||||
|
||||
" follow and open links with pandoc
|
||||
" open a file with either local means, or let the system decide
|
||||
" follow and open links with pandoc
|
||||
" open a file with either local means, or let the system decide
|
||||
nnoremap <silent> gX :<C-u>call pandoc#hypertext#OpenSystem()<cr>
|
||||
nnoremap <silent> gx :<C-u>call pandoc#hypertext#OpenLocal()<cr>
|
||||
" open a link in the editor (this buffer, or split)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue