mirror of
https://github.com/jdhao/nvim-config.git
synced 2025-06-08 14:14:33 +02:00
Initial support for C++
This commit is contained in:
@@ -44,6 +44,9 @@ Plug 'machakann/vim-swap'
|
||||
" IDE for Lisp
|
||||
" Plug 'kovisoft/slimv'
|
||||
Plug 'vlime/vlime', {'rtp': 'vim/', 'for': 'lisp'}
|
||||
|
||||
" C++ semantic highlighting
|
||||
Plug 'jackguo380/vim-lsp-cxx-highlight'
|
||||
"}}
|
||||
|
||||
"{{ Search related plugins
|
||||
@@ -390,6 +393,24 @@ if executable('pyls')
|
||||
augroup END
|
||||
endif
|
||||
|
||||
if executable('ccls')
|
||||
augroup ccls_setup
|
||||
autocmd!
|
||||
au User lsp_setup call lsp#register_server({
|
||||
\ 'name': 'ccls',
|
||||
\ 'cmd': {server_info->['ccls']},
|
||||
\ 'root_uri': {server_info->lsp#utils#path_to_uri(
|
||||
\ lsp#utils#find_nearest_parent_file_directory(
|
||||
\ lsp#utils#get_buffer_path(), ['.ccls', 'compile_commands.json', '.git/']))},
|
||||
\ 'initialization_options': {
|
||||
\ 'highlight': { 'lsRanges' : v:true },
|
||||
\ 'cache': {'directory': stdpath('cache') . '/ccls' },
|
||||
\ },
|
||||
\ 'whitelist': ['c', 'cpp', 'objc', 'objcpp', 'cc'],
|
||||
\ })
|
||||
augroup END
|
||||
endif
|
||||
|
||||
if executable('vim-language-server')
|
||||
augroup LspVim
|
||||
autocmd!
|
||||
@@ -546,9 +567,12 @@ endif
|
||||
|
||||
"{{ Navigation and tags
|
||||
""""""""""""""""""""""""""" gutentags settings """"""""""""""""""""""""""""""
|
||||
let g:gutentags_ctags_exclude = ['*.md', '*.html', '*.json', '*.toml', '*.css', '*.js',]
|
||||
" The path to store tags files, instead of in the project root.
|
||||
let g:gutentags_cache_dir = stdpath('cache') . '/ctags'
|
||||
let g:gutentags_ctags_extra_args = ['--fields=+niazS', '--extra=+q']
|
||||
let g:gutentags_ctags_extra_args += ['--c++-kinds=+px']
|
||||
let g:gutentags_ctags_extra_args += ['--c-kinds=+px']
|
||||
let g:gutentags_ctags_exclude = ['*.md', '*.html', '*.json', '*.toml', '*.css', '*.js',]
|
||||
|
||||
""""""""""""""""""""""""""" vista settings """"""""""""""""""""""""""""""""""
|
||||
let g:vista#renderer#icons = {
|
||||
|
||||
Reference in New Issue
Block a user