vim-config/after/ftplugin/c.vim

26 lines
834 B
VimL

let g:ale_linters = {'c':['clang', 'clangtidy', 'cppcheck']}
" let g:ale_linters = {'c':['clang']}
"let g:ale_fixers = {
" \ 'c': ['clang-format'],
" \}
let g:ale_c_clangformat_options = '-style=file'
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'