From b21ddcad84f7594457f39156bf6a0ba39251755c Mon Sep 17 00:00:00 2001 From: Emiliano Vavassori Date: Mon, 1 May 2023 23:16:53 +0200 Subject: [PATCH] Second versione di vimrc, con un po' di aggiustamenti per ansible. --- vimrc.new | 43 +++++++++++++++++++++++++++++++------------ 1 file changed, 31 insertions(+), 12 deletions(-) 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