dotfiles/vimrc

165 lines
3.9 KiB
VimL
Raw Normal View History

" Gestione plugin con vim-plug
call plug#begin()
2023-05-18 22:20:06 +02:00
" Base for plugin management
Plug 'junegunn/vim-plug'
2023-04-29 16:36:57 +02:00
2023-05-18 22:20:06 +02:00
" Standard vim packages
Plug 'tpope/vim-sensible'
Plug 'tpope/vim-commentary'
2023-05-02 01:18:22 +02:00
Plug 'tpope/vim-surround'
Plug 'tpope/vim-repeat'
2023-04-29 16:36:57 +02:00
" Git wrapper
Plug 'tpope/vim-fugitive'
2023-04-29 16:36:57 +02:00
" File explorer
Plug 'scrooloose/nerdtree'
2023-04-29 16:36:57 +02:00
" nerdtree git plugin
Plug 'Xuyuanp/nerdtree-git-plugin'
2023-05-31 22:48:30 +02:00
" fzf integration
Plug 'junegunn/fzf.vim'
2023-05-18 22:20:06 +02:00
" Snippets management and support for vim
Plug 'SirVer/ultisnips'
Plug 'honza/vim-snippets'
2023-05-18 22:20:06 +02:00
" Conqueror of Completion
Plug 'neoclide/coc.nvim', {'branch': 'release'}
2023-04-29 16:36:57 +02:00
2023-05-18 22:20:06 +02:00
" Shell Conqueror of Completion plugin
Plug 'josa42/coc-sh', { 'do': 'yarn install --frozen-lockfile' }
2023-04-29 16:36:57 +02:00
2023-05-18 22:20:06 +02:00
" Python
Plug 'fannheyward/coc-pyright', { 'do': 'yarn install --frozen-lockfile' }
" Ansible
Plug 'pearofducks/ansible-vim' " syntax highlight
Plug 'yaegassy/coc-ansible', {'do': 'yarn install --frozen-lockfile'}
" Rust
Plug 'rust-lang/rust.vim'
Plug 'zooxyt/Ultisnips-rust'
Plug 'fannheyward/coc-rust-analyzer', { 'do': 'yarn install --frozen-lockfile' }
2023-04-29 16:36:57 +02:00
" latex stuff
Plug 'lervag/vimtex'
Plug 'ckunte/latex-snippets-vim', { 'tag': '*' }
2023-05-18 22:20:06 +02:00
Plug 'neoclide/coc-vimtex', { 'do': 'yarn install --frozen-lockfile' }
2023-04-29 16:36:57 +02:00
2023-05-18 22:20:06 +02:00
" HTML 5 template
Plug 'othree/html5.vim'
"
" Blade syntax highlight
Plug 'xsbeats/vim-blade'
" terraform syntax highlight
Plug 'hashivim/vim-terraform'
2024-01-01 22:21:46 +01:00
" Mediawiki pages support
Plug 'm-pilia/vim-mediawiki'
" Markdown with preview
2024-03-05 23:03:03 +01:00
Plug 'fannheyward/coc-markdownlint', { 'do': 'yarn install --frozen-lockfile' }
2024-01-01 22:21:46 +01:00
Plug 'weirongxu/coc-webview'
Plug 'weirongxu/coc-markdown-preview-enhanced', { 'do': 'yarn install --frozen-lockfile' }
2023-05-18 22:20:06 +02:00
""" Aesthetic fixes """
2023-04-29 16:36:57 +02:00
" Devicons
Plug 'ryanoasis/vim-devicons'
2023-04-29 16:36:57 +02:00
" Vim Airline
Plug 'vim-airline/vim-airline'
Plug 'vim-airline/vim-airline-themes'
2023-04-29 16:36:57 +02:00
" Solarized theme
Plug 'altercation/vim-colors-solarized'
2023-04-29 16:36:57 +02:00
" Vim-plug configuration end
call plug#end()
" Impostazioni di base
syntax on
set background=dark
set modelines=5
set modeline
set showcmd
set laststatus=2
2023-06-01 22:32:23 +02:00
set splitbelow
set splitright
" Riattivo i plugin per i tipi di file
filetype plugin indent on
" Override grep
set grepprg=grep\ -nH\ $*
" Configurazioni addizionali
" Nerdtree
let g:NERDTreeNodeDelimiter = "\u00a0"
map <C-n> :NERDTreeToggle<CR>
" LaTeXsuite - Cambio il tex flavor
" let g:tex_flavor='latex'
" Airline-theme - Set up airline-theme
let g:airline_powerline_fonts = 1
2023-04-29 16:36:57 +02:00
let g:airline_theme='dark'
" ALE configurations
2023-12-31 23:05:30 +01:00
"nmap <silent> <C-e> <Plug>(ale_next_wrap)
"let g:ale_sign_error = '⬥'
"let g:ale_sign_warning = '⬦'
"let g:ale_yaml_yamllint_options='-d "{extends: relaxed, rules: {line-length: disable}}"'
2023-04-29 16:36:57 +02:00
" Configurazioni per ansible-vim
let g:ansible_unindent_after_newline = 1
2023-04-29 16:36:57 +02:00
" Configurations for GVim
if has('gui_running')
"set guifont=Ubuntu\ Mono\ derivative\ Powerline\ 14
"set guifont = Droid Sans Mono Slashed for Powerline Regular 16,Ubuntu Mono derivative Powerline 14
2023-06-01 17:24:43 +02:00
set guifont=Fira\ Code\ Nerd\ Font\ 12,Ubuntu\ Mono\ derivative\ Powerline\ 14
2023-04-29 16:36:57 +02:00
colorscheme solarized
let g:airline_theme='base16'
endif
" Completion with Conqueror of Code
" use <tab> to trigger completion and navigate to the next complete item
function! CheckBackspace() abort
let col = col('.') - 1
return !col || getline('.')[col - 1] =~# '\s'
endfunction
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
let g:coc_filetype_map = {
\ 'yaml.ansible': 'ansible',
\ }
" vimtex configuration
let g:vimtex_view_method = 'zathura'
" Ultisnips configuration
2023-05-18 22:20:06 +02:00
let g:UltiSnipsExpandTrigger = '<Tab>'