diff options
Diffstat (limited to '.config/nvim')
-rw-r--r-- | .config/nvim/plug-config/vim-lsp.vim | 17 | ||||
-rw-r--r-- | .config/nvim/plug.vim | 3 |
2 files changed, 10 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 diff --git a/.config/nvim/plug.vim b/.config/nvim/plug.vim index 9003ed4..6848ebf 100644 --- a/.config/nvim/plug.vim +++ b/.config/nvim/plug.vim @@ -26,6 +26,9 @@ Plug 'preservim/nerdcommenter' Plug 'preservim/nerdtree' Plug 'ryanoasis/vim-devicons' Plug 'sainnhe/gruvbox-material' +Plug 'SirVer/ultisnips' +Plug 'thomasfaingnaert/vim-lsp-snippets' +Plug 'thomasfaingnaert/vim-lsp-ultisnips' Plug 'tpope/vim-dispatch' Plug 'tpope/vim-fugitive' Plug 'tpope/vim-speeddating' |