summaryrefslogtreecommitdiffstats
path: root/.config/nvim/plug-config/vim-lsp.vim
blob: d12f315a83253861c99acf378e85065583081398 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
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(), '.ccls'))},
				\ 'initialization_options': {
				\   'highlight': { 'lsRanges' : v:true },
				\ },
				\ 'whitelist': ['c', 'cpp', 'objc', 'objcpp', 'cc'],
				\ })
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
highlight LspCxxHlSymParameter ctermfg=LightYellow guifg=LightYellow
highlight LspCxxHlSymVariableStatic ctermfg=LightRed guifg=LightRed
highlight LspErrorHighlight cterm=undercurl gui=undercurl ctermfg=DarkRed guifg=DarkRed
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