diff options
author | JozanLeClerc <bousset.rudy@gmail.com> | 2020-11-16 22:04:10 +0100 |
---|---|---|
committer | JozanLeClerc <bousset.rudy@gmail.com> | 2020-11-16 22:04:10 +0100 |
commit | 8c4f80c18b97cd379c9575679a8ba5390e1f841e (patch) | |
tree | 1dffac308091f42660b238e032a68704582ee270 /.config | |
parent | I now use ccls for vim-lsp instead of clangd (diff) | |
download | dotfiles-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 '')
-rw-r--r-- | .config/nvim/plug-config/vim-lsp.vim | 17 | ||||
-rw-r--r-- | .config/nvim/plug.vim | 3 | ||||
-rw-r--r-- | .config/zsh/alias.zsh | 1 |
3 files changed, 11 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' diff --git a/.config/zsh/alias.zsh b/.config/zsh/alias.zsh index b779c07..0c814ed 100644 --- a/.config/zsh/alias.zsh +++ b/.config/zsh/alias.zsh @@ -46,6 +46,7 @@ alias ga='git add' alias gco='git commit -m' alias gpp='git push' alias gpo='git push origin' +alias srcnt='find . -type f -name "*.c" -exec cat {} \; | sed "/^\//d" | sed "/^\*/d" | sed "/^ \*/d" | sed "/^\/\//d" | sed "/^$/d" | wc -l | tr -d " "' alias startdocker='sudo service vboxnet restart && docker-machine start docker-home' alias stopdocker='docker-machine stop docker-home' alias envdocker='eval `docker-machine env docker-home`' |