Configure cmake-language-server and coc-cmake
Utilises the following Python package: ```console $ pip3 install --user cmake-language-server ```
This commit is contained in:
parent
8a2ca8c53f
commit
bf6deaf1ed
@ -1,6 +1,3 @@
|
||||
" Add omnifunc completion plugin.
|
||||
packadd vim-cmake-completion
|
||||
|
||||
" Enable syntax folding, see .vim/after/syntax/cmake.vim
|
||||
setlocal foldmethod=syntax
|
||||
" Set comment string
|
||||
|
@ -40,6 +40,7 @@ function! build#dir(...) abort
|
||||
" TODO: Check .vim/coc-settings.json exists, create it if not
|
||||
let l:coc_settings = json_decode(join(readfile('.vim/coc-settings.json'), ''))
|
||||
let l:coc_settings['clangd.compilationDatabasePath'] = $BUILD_DIR
|
||||
let l:coc_settings['cmake.lsp.buildDirectory'] = $BUILD_DIR
|
||||
call writefile([json_encode(l:coc_settings)], '.vim/coc-settings.json')
|
||||
CocRestart
|
||||
endif
|
||||
|
1
coc-settings.json
Normal file
1
coc-settings.json
Normal file
@ -0,0 +1 @@
|
||||
{"cmake.lsp.enable": true}
|
2
vimrc
2
vimrc
@ -40,8 +40,6 @@ Pack 'neoclide/coc.nvim', {'branch': 'release'}
|
||||
" ultisnips - snippet engine
|
||||
Pack 'SirVer/ultisnips'
|
||||
Pack 'honza/vim-snippets'
|
||||
" vim-cmake-completion - completion & help
|
||||
Pack 'kbenzie/vim-cmake-completion', {'type': 'opt'}
|
||||
" vimomni - Completion for vimscript
|
||||
Pack 'vim-scripts/vimomni', {'type': 'opt'}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user