From 8c4f80c18b97cd379c9575679a8ba5390e1f841e Mon Sep 17 00:00:00 2001 From: JozanLeClerc Date: Mon, 16 Nov 2020 22:04:10 +0100 Subject: New very cool alias --- .config/nvim/plug-config/vim-lsp.vim | 17 +++++++---------- 1 file changed, 7 insertions(+), 10 deletions(-) (limited to '.config/nvim/plug-config/vim-lsp.vim') 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 -- cgit v1.2.3