summaryrefslogtreecommitdiffstats
path: root/.config/nvim/plug-config/vim-lsp.vim
diff options
context:
space:
mode:
authorJozanLeClerc <bousset.rudy@gmail.com>2020-11-16 22:04:10 +0100
committerJozanLeClerc <bousset.rudy@gmail.com>2020-11-16 22:04:10 +0100
commit8c4f80c18b97cd379c9575679a8ba5390e1f841e (patch)
tree1dffac308091f42660b238e032a68704582ee270 /.config/nvim/plug-config/vim-lsp.vim
parentI now use ccls for vim-lsp instead of clangd (diff)
downloaddotfiles-bsd-8c4f80c18b97cd379c9575679a8ba5390e1f841e.tar.gz
dotfiles-bsd-8c4f80c18b97cd379c9575679a8ba5390e1f841e.tar.bz2
dotfiles-bsd-8c4f80c18b97cd379c9575679a8ba5390e1f841e.tar.xz
dotfiles-bsd-8c4f80c18b97cd379c9575679a8ba5390e1f841e.tar.zst
dotfiles-bsd-8c4f80c18b97cd379c9575679a8ba5390e1f841e.zip
New very cool alias
Diffstat (limited to '.config/nvim/plug-config/vim-lsp.vim')
-rw-r--r--.config/nvim/plug-config/vim-lsp.vim17
1 files changed, 7 insertions, 10 deletions
diff --git a/.config/nvim/plug-config/vim-lsp.vim b/.config/nvim/plug-config/vim-lsp.vim
index d12f315..03c9d82 100644
--- a/.config/nvim/plug-config/vim-lsp.vim
+++ b/.config/nvim/plug-config/vim-lsp.vim
@@ -1,23 +1,16 @@
if executable('ccls')
- au User lsp_setup call lsp#register_server({
+ autocmd 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(), '.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'],
\ })
+ autocmd FileType c,cpp,objc,objcpp,cc setlocal omnifunc=lsp#complete
endif
-autocmd FileType c setlocal omnifunc=lsp#complete
-autocmd FileType cpp setlocal omnifunc=lsp#complete
-autocmd FileType objc setlocal omnifunc=lsp#complete
-autocmd FileType objcpp setlocal omnifunc=lsp#complete
-
-let g:lsp_signs_priority = 10
-let g:lsp_textprop_enabled = 1
-let g:lsp_cxx_hl_use_text_props = 1
highlight LspCxxHlSymStruct ctermfg=Yellow guifg=Yellow
highlight LspCxxHlSymClass ctermfg=Yellow guifg=Yellow
highlight LspCxxHlSymField ctermfg=Blue guifg=Blue
@@ -27,3 +20,7 @@ highlight LspErrorHighlight cterm=undercurl gui=undercurl ctermfg=DarkRed guifg=
highlight LspWarningHighlight cterm=underline gui=underline ctermfg=DarkRed guifg=DarkRed
highlight LspInformationHighlight cterm=underline gui=underline ctermfg=Green guifg=Green
highlight LspHintHighlight term=italic cterm=italic gui=italic ctermfg=Green guifg=Green
+
+let g:lsp_signs_priority = 10
+let g:lsp_textprop_enabled = 1
+let g:lsp_cxx_hl_use_text_props = 1