Second versione di vimrc, con un po' di aggiustamenti per ansible.

This commit is contained in:
Emiliano Vavassori 2023-05-01 23:16:53 +02:00
parent 46c3abd48f
commit b21ddcad84
1 changed files with 31 additions and 12 deletions

View File

@ -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 <C-n> :NERDTreeToggle<CR>
" 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 <silent> <C-e> <Plug>(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 <silent> <C-e> <Plug>(ale_next_wrap)
let g:ale_sign_error = '⬥'
let g:ale_sign_warning = '⬦'
" Configurazioni addizionali
let g:NERDTreeNodeDelimiter = "\u00a0"
map <C-n> :NERDTreeToggle<CR>
" Completion with Conqueror of Code
" use <tab> to trigger completion and navigate to the next complete item
function! CheckBackspace() abort
@ -103,3 +109,16 @@ inoremap <silent><expr> <Tab>
\ coc#pum#visible() ? coc#pum#next(1) :
\ CheckBackspace() ? "\<Tab>" :
\ coc#refresh()
" Conferma scelta con invio
inoremap <expr> <cr> coc#pum#visible() ? coc#pum#confirm() : "\<CR>\<c-r>=coc#on_enter()\<CR>"
" mostra documentazione in preview
nnoremap <silent> K :call ShowDocumentation()<CR>
function! ShowDocumentation()
if CocAction('hasProvider', 'hover')
call CocActionAsync('doHover')
else
call feedkeys('K', 'in')
endif
endfunction