diff --git a/vimrc.new b/vimrc.new index 799baf5..30e6c11 100644 --- a/vimrc.new +++ b/vimrc.new @@ -12,7 +12,8 @@ Plug 'tpope/vim-fugitive' Plug 'scrooloose/nerdtree' " Ansible syntax highlight -Plug 'chase/vim-ansible-yaml' +Plug 'pearofducks/ansible-vim' +Plug 'yaegassy/coc-ansible', {'do': 'yarn install --frozen-lockfile'} " Blade syntax highlight Plug 'xsbeats/vim-blade' @@ -66,13 +67,27 @@ filetype plugin indent on " Override grep set grepprg=grep\ -nH\ $* -" Cambio il tex flavor +" Configurazioni addizionali + +" Nerdtree +let g:NERDTreeNodeDelimiter = "\u00a0" +map :NERDTreeToggle + +" LaTeXsuite - Cambio il tex flavor let g:tex_flavor='latex' -" Set up airline-theme +" Airline-theme - Set up airline-theme let g:airline_powerline_fonts = 1 let g:airline_theme='dark' +" ALE configurations +nmap (ale_next_wrap) +let g:ale_sign_error = '⬥' +let g:ale_sign_warning = '⬦' + +" Configurazioni per ansible-vim +let g:ansible_unindent_after_newline = 1 + " Configurations for GVim if has('gui_running') "set guifont=Ubuntu\ Mono\ derivative\ Powerline\ 14 @@ -83,15 +98,6 @@ if has('gui_running') let g:airline_theme='base16' endif -" ALE configurations -nmap (ale_next_wrap) -let g:ale_sign_error = '⬥' -let g:ale_sign_warning = '⬦' - -" Configurazioni addizionali -let g:NERDTreeNodeDelimiter = "\u00a0" -map :NERDTreeToggle - " Completion with Conqueror of Code " use to trigger completion and navigate to the next complete item function! CheckBackspace() abort @@ -103,3 +109,16 @@ inoremap \ coc#pum#visible() ? coc#pum#next(1) : \ CheckBackspace() ? "\" : \ coc#refresh() + +" Conferma scelta con invio +inoremap coc#pum#visible() ? coc#pum#confirm() : "\\=coc#on_enter()\" +" mostra documentazione in preview +nnoremap K :call ShowDocumentation() + +function! ShowDocumentation() + if CocAction('hasProvider', 'hover') + call CocActionAsync('doHover') + else + call feedkeys('K', 'in') + endif +endfunction