2019-06-20 23:27:47 +00:00
|
|
|
if !g:vim_ide | finish | endif
|
|
|
|
|
2019-04-21 11:42:15 +00:00
|
|
|
let s:filetypes = ['c', 'cpp', 'objc', 'objcpp']
|
|
|
|
let g:coc_filetypes += s:filetypes
|
|
|
|
|
|
|
|
call coc#config('languageserver.ccls', {
|
|
|
|
\ 'filetypes': s:filetypes,
|
|
|
|
\ 'command': 'ccls',
|
|
|
|
\ 'rootPatterns': ['.ccls', 'compile_commands.json', '.vim/', '.git/', '.hg/'],
|
|
|
|
\ 'initializationOptions': {
|
|
|
|
\ 'cache': {
|
|
|
|
\ 'directory': '/tmp/ccls',
|
|
|
|
\ },
|
|
|
|
\ },
|
|
|
|
\ })
|
|
|
|
|
|
|
|
" call coc#config('languageserver.clangd', {
|
|
|
|
" \ 'filetypes': s:filetypes,
|
|
|
|
" \ 'command': 'clangd',
|
|
|
|
" \ 'rootPatterns': ['compile_flags.txt', 'compile_commands.json', '.vim/', '.git/', '.hg/'],
|
|
|
|
" \ })
|