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

View File

@ -12,7 +12,8 @@ Plug 'tpope/vim-fugitive'
Plug 'scrooloose/nerdtree' Plug 'scrooloose/nerdtree'
" Ansible syntax highlight " Ansible syntax highlight
Plug 'chase/vim-ansible-yaml' Plug 'pearofducks/ansible-vim'
Plug 'yaegassy/coc-ansible', {'do': 'yarn install --frozen-lockfile'}
" Blade syntax highlight " Blade syntax highlight
Plug 'xsbeats/vim-blade' Plug 'xsbeats/vim-blade'
@ -66,13 +67,27 @@ filetype plugin indent on
" Override grep " Override grep
set grepprg=grep\ -nH\ $* 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' let g:tex_flavor='latex'
" Set up airline-theme " Airline-theme - Set up airline-theme
let g:airline_powerline_fonts = 1 let g:airline_powerline_fonts = 1
let g:airline_theme='dark' 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 " Configurations for GVim
if has('gui_running') if has('gui_running')
"set guifont=Ubuntu\ Mono\ derivative\ Powerline\ 14 "set guifont=Ubuntu\ Mono\ derivative\ Powerline\ 14
@ -83,15 +98,6 @@ if has('gui_running')
let g:airline_theme='base16' let g:airline_theme='base16'
endif 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 " Completion with Conqueror of Code
" use <tab> to trigger completion and navigate to the next complete item " use <tab> to trigger completion and navigate to the next complete item
function! CheckBackspace() abort function! CheckBackspace() abort
@ -103,3 +109,16 @@ inoremap <silent><expr> <Tab>
\ coc#pum#visible() ? coc#pum#next(1) : \ coc#pum#visible() ? coc#pum#next(1) :
\ CheckBackspace() ? "\<Tab>" : \ CheckBackspace() ? "\<Tab>" :
\ coc#refresh() \ 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