summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJozanLeClerc <bousset.rudy@gmail.com>2020-11-16 20:03:44 +0100
committerJozanLeClerc <bousset.rudy@gmail.com>2020-11-16 20:03:44 +0100
commit237fe13857f8622b9cacf6d58c48615a77a754bf (patch)
tree679272f7a2b4690b5fb9a6390947bbccbb2ea751
parentLinkview update (diff)
downloaddotfiles-bsd-237fe13857f8622b9cacf6d58c48615a77a754bf.tar.gz
dotfiles-bsd-237fe13857f8622b9cacf6d58c48615a77a754bf.tar.bz2
dotfiles-bsd-237fe13857f8622b9cacf6d58c48615a77a754bf.tar.xz
dotfiles-bsd-237fe13857f8622b9cacf6d58c48615a77a754bf.tar.zst
dotfiles-bsd-237fe13857f8622b9cacf6d58c48615a77a754bf.zip
I now use ccls for vim-lsp instead of clangd
-rw-r--r--.config/nvim/plug-config/vim-lsp.vim39
-rw-r--r--.config/nvim/plug.vim3
-rw-r--r--.config/nvim/settings.vim2
3 files changed, 29 insertions, 15 deletions
diff --git a/.config/nvim/plug-config/vim-lsp.vim b/.config/nvim/plug-config/vim-lsp.vim
index 4accf36..d12f315 100644
--- a/.config/nvim/plug-config/vim-lsp.vim
+++ b/.config/nvim/plug-config/vim-lsp.vim
@@ -1,16 +1,29 @@
-if executable('/usr/local/llvm10/bin/clangd')
- augroup lsp_clangd
- autocmd!
- autocmd User lsp_setup call lsp#register_server({
- \ 'name': 'clangd',
- \ 'cmd': {server_info->['clangd']},
- \ 'whitelist': ['c', 'cpp', 'objc', 'objcpp']
- \ })
- 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
- augroup end
+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
diff --git a/.config/nvim/plug.vim b/.config/nvim/plug.vim
index 9e9a606..9003ed4 100644
--- a/.config/nvim/plug.vim
+++ b/.config/nvim/plug.vim
@@ -2,7 +2,8 @@ call plug#begin(system('echo -n "$XDG_DATA_HOME/nvim/plugged"'))
Plug 'ap/vim-css-color'
Plug 'brglng/vim-sidebar-manager'
Plug 'dag/vim-fish'
-Plug 'honza/vim-snippets'
+" Plug 'honza/vim-snippets'
+Plug 'jackguo380/vim-lsp-cxx-highlight'
Plug 'jceb/vim-orgmode'
Plug 'jiangmiao/auto-pairs'
Plug 'junegunn/fzf', { 'do': { -> fzf#install() } }
diff --git a/.config/nvim/settings.vim b/.config/nvim/settings.vim
index 47241a3..f8594e7 100644
--- a/.config/nvim/settings.vim
+++ b/.config/nvim/settings.vim
@@ -2,7 +2,7 @@ set noautochdir
set bg=dark
set cindent
set cinoptions=>s,e0,n0,f0,{0,}0,^0,L-1,:s,=s,l1,b0,gs,h0,N0,E0,p0,t0,i0,+s
-set cinoptions+=c1,C0,/0,(s,us,U0,w0,Ws,k0,m0,M1,)20,*70,#0
+set cinoptions+=c1,C0,/0,(s,us,U0,w1,Ws,k0,m0,M1,)20,*70,#0
set clipboard^=unnamedplus
set completeopt=menuone,noinsert,noselect,preview
set cursorline