2013-02-11 14:08:07 +01:00
|
|
|
" configure tags - add additional tags here or comment out not-used ones
|
|
|
|
set tags+=~/.vim/tags/cpp
|
|
|
|
" build tags of your own project with F11
|
|
|
|
map <F11> :!ctags -R --sort=yes --c++-kinds=+p --fields=+iaS --extra=+q .<CR>
|
|
|
|
map <F10> :mksession! Session.vim \| wviminfo! viminfo<CR>
|
|
|
|
|
|
|
|
set modeline
|
2020-04-15 17:22:55 +02:00
|
|
|
set noexpandtab
|
2013-02-11 14:08:07 +01:00
|
|
|
set listchars+=precedes:<,extends:>
|
2020-04-15 17:22:55 +02:00
|
|
|
|
|
|
|
" Language Server
|
|
|
|
|
|
|
|
let g:lsp_signs_enabled = 1 " enable signs
|
|
|
|
let g:lsp_diagnostics_echo_cursor = 1 " enable echo under cursor when in normal mode
|
|
|
|
|
|
|
|
"if executable('pyls')
|
|
|
|
" " pip install python-language-server
|
|
|
|
" au User lsp_setup call lsp#register_server({
|
|
|
|
" \ 'name': 'pyls',
|
|
|
|
" \ 'cmd': {server_info->['pyls']},
|
|
|
|
" \ 'whitelist': ['python'],
|
|
|
|
" \ })
|
|
|
|
"endif
|
|
|
|
|
|
|
|
if executable('ghdl-ls')
|
|
|
|
au User lsp_setup call lsp#register_server({
|
|
|
|
\ 'name': 'ghdl-ls',
|
|
|
|
\ 'cmd': {server_info->['ghdl-ls']},
|
|
|
|
\ 'whitelist': ['vhdl'],
|
|
|
|
\ })
|
|
|
|
endif
|
|
|
|
|
|
|
|
function! s:on_lsp_buffer_enabled() abort
|
|
|
|
setlocal omnifunc=lsp#complete
|
|
|
|
setlocal signcolumn=yes
|
|
|
|
nmap <buffer> gd <plug>(lsp-definition)
|
|
|
|
nmap <buffer> <f2> <plug>(lsp-rename)
|
|
|
|
" refer to doc to add more commands
|
|
|
|
endfunction
|
|
|
|
|
|
|
|
augroup lsp_install
|
|
|
|
au!
|
|
|
|
" call s:on_lsp_buffer_enabled only for languages that has the server registered.
|
|
|
|
autocmd User lsp_buffer_enabled call s:on_lsp_buffer_enabled()
|
|
|
|
augroup END
|