Configure LSP for C
This commit is contained in:
parent
35bdc2d2c1
commit
d88d26e249
@ -7,3 +7,19 @@ let g:ale_c_clangformat_options = '-style=file'
|
|||||||
|
|
||||||
let g:ycm_goto_buffer_command = 'same-buffer'
|
let g:ycm_goto_buffer_command = 'same-buffer'
|
||||||
|
|
||||||
|
nnoremap <F3> :call LanguageClient_contextMenu()<CR>
|
||||||
|
nnoremap <silent> <F4> :call LanguageClient#textDocument_definition()<CR>
|
||||||
|
nnoremap <silent> <F7> :call LanguageClient#textDocument_hover()<CR>
|
||||||
|
nnoremap <silent> <F6> :call LanguageClient#textDocument_rename()<CR>
|
||||||
|
|
||||||
|
let g:LanguageClient_autoStart = 1
|
||||||
|
|
||||||
|
let g:LanguageClient_serverCommands = {
|
||||||
|
\ 'c': ['cquery', '--language-server', '--log-file=/tmp/cq.log'],
|
||||||
|
\ }
|
||||||
|
|
||||||
|
let g:LanguageClient_rootMarkers = {
|
||||||
|
\ 'c': ['.cquery', 'compile_commands.json', 'build'],
|
||||||
|
\ }
|
||||||
|
|
||||||
|
let g:LanguageClient_settingsPath = $HOME.'/.vim/cquery.json'
|
||||||
|
5
cquery.json
Normal file
5
cquery.json
Normal file
@ -0,0 +1,5 @@
|
|||||||
|
{
|
||||||
|
"initializationOptions": {
|
||||||
|
"cacheDirectory": "/tmp/cquery"
|
||||||
|
}
|
||||||
|
}
|
Loading…
Reference in New Issue
Block a user