1 Star 0 Fork 0

old_school_vim/vim-lsp-cxx-highlight

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
克隆/下载
vim-lsp-register.vim 1.38 KB
一键复制 编辑 原始数据 按行查看 历史
Jack Guo 提交于 2019-07-04 16:32 +08:00 . Add Support for coc.nvim (#8)
" Configuration of vim-lsp to use cquery and ccls with vim-lsp
" also see https://github.com/prabirshrestha/vim-lsp/wiki/Servers-cquery
"
" cquery always requires these options
" highlight.enabled = true
" emitInactiveRegions = true
if executable('cquery')
au User lsp_setup call lsp#register_server({
\ 'name': 'cquery',
\ 'cmd': {server_info->['cquery']},
\ 'root_uri': {server_info->lsp#utils#path_to_uri(lsp#utils#find_nearest_parent_file_directory(lsp#utils#get_buffer_path(), 'compile_commands.json'))},
\ 'initialization_options': {
\ 'cacheDirectory': '/path/to/cquery/cache',
\ 'highlight': { 'enabled' : v:true },
\ 'emitInactiveRegions': v:true
\ },
\ 'whitelist': ['c', 'cpp', 'objc', 'objcpp', 'cc'],
\ })
endif
" also see https://github.com/prabirshrestha/vim-lsp/wiki/Servers-ccls
"
" highlight.lsRanges = true
" is only necessary if vim doesn't have +byte_offset
if executable('ccls')
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(), 'compile_commands.json'))},
\ 'initialization_options': {
\ 'highlight': { 'lsRanges' : v:true },
\ },
\ 'whitelist': ['c', 'cpp', 'objc', 'objcpp', 'cc'],
\ })
endif
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/old_school_vim/vim-lsp-cxx-highlight.git
git@gitee.com:old_school_vim/vim-lsp-cxx-highlight.git
old_school_vim
vim-lsp-cxx-highlight
vim-lsp-cxx-highlight
master

搜索帮助