62 lines
2 KiB
VimL
62 lines
2 KiB
VimL
|
" For async completion
|
|||
|
Plug 'Shougo/deoplete.nvim', { 'on': [] } " automatic suggestions, can also perhaps be changed for newer plugs
|
|||
|
" PLUGIN: DEOPLETE
|
|||
|
" enable deoplete at startup
|
|||
|
let g:deoplete#enable_at_startup = 0
|
|||
|
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
|
|||
|
let g:deoplete#omni#input_patterns = get(g:,'deoplete#omni#input_patterns',{})
|
|||
|
|
|||
|
Plug 'deoplete-plugins/deoplete-go', { 'do': 'make'}
|
|||
|
|
|||
|
Plug 'Shougo/echodoc.vim', { 'on': [] }
|
|||
|
" PLUGIN: ECHODOC
|
|||
|
let g:echodoc#type="virtual"
|
|||
|
set splitbelow
|
|||
|
set completeopt+=menuone,noinsert,noselect
|
|||
|
set completeopt-=preview
|
|||
|
autocmd CompleteDone * pclose
|
|||
|
|
|||
|
Plug 'w0rp/ale', { 'on': [] } " asynchronous linting - might be superseded by lsp or coc.nvim at some point
|
|||
|
" PLUGIN: ALE
|
|||
|
" clearer Error and warning signs for the gutter
|
|||
|
let g:ale_sign_error = '⤫'
|
|||
|
let g:ale_sign_warning = '⚠'
|
|||
|
" Enable integration with airline.
|
|||
|
let g:airline#extensions#ale#enabled = 1
|
|||
|
let g:ale_fix_on_save = 1
|
|||
|
let g:ale_fixers = {
|
|||
|
\'javascipt': ['eslint', 'prettier'],
|
|||
|
\'html': ['tidy','prettier'],
|
|||
|
\'typescript': ['prettier','tslint'],
|
|||
|
\'*': ['remove_trailing_lines', 'trim_whitespace'],
|
|||
|
\'go': ['gofmt'],
|
|||
|
\'sh': ['shfmt'],
|
|||
|
\'zsh': ['shfmt'],
|
|||
|
\}
|
|||
|
let g:ale_linters = {
|
|||
|
\ 'go': ['gopls'],
|
|||
|
\ 'sh': ['language_server','shellcheck'],
|
|||
|
\ 'zsh': ['language_server','shellcheck'],
|
|||
|
\}
|
|||
|
|
|||
|
" lazy loading since they require a lot of startup time
|
|||
|
augroup load_ide_features
|
|||
|
autocmd!
|
|||
|
autocmd InsertEnter * call plug#load('ale', 'deoplete.nvim', 'echodoc.vim')
|
|||
|
\| autocmd! load_ide_features
|
|||
|
autocmd InsertEnter * call deoplete#enable()
|
|||
|
autocmd InsertEnter * call echodoc#enable()
|
|||
|
|
|||
|
|
|||
|
augroup PandocCompletion
|
|||
|
" Add pandoc citations to deoplete automatic completions
|
|||
|
autocmd InsertEnter * call deoplete#custom#var('omni', 'input_patterns', {
|
|||
|
\ 'pandoc': '@'
|
|||
|
\})
|
|||
|
augroup END
|