From d303604a24d7b2716058d65c61c1c0b7c117a4cf Mon Sep 17 00:00:00 2001 From: Mathieu Maret Date: Sat, 30 Jul 2022 23:51:16 +0200 Subject: [PATCH] vim: better language client integration --- .vimrc | 20 +++++++++++++++++--- Makefile | 2 +- 2 files changed, 18 insertions(+), 4 deletions(-) diff --git a/.vimrc b/.vimrc index b38e1b0..d5f6d7c 100644 --- a/.vimrc +++ b/.vimrc @@ -637,7 +637,7 @@ Plugin 'preservim/nerdtree' Plugin 'fs111/pydoc.vim' " Omni completion for cpp -Plugin 'vim-scripts/OmniCppComplete' +Plugin 'vim-scripts/OmniCppComplete' " Can be forced with set omnifunc=omni#cpp#complete#Main " List current file function " let $GIT_SSL_NO_VERIFY = 'true' @@ -646,7 +646,7 @@ Plugin 'gitlab@gitlab.mathux.org:Mathieu/taglist.git' Plugin 'majutsushi/tagbar' " Fuzzy finder -Plugin 'junegunn/fzf' +"Plugin 'junegunn/fzf' " Installed by OS package Plugin 'junegunn/fzf.vim' nnoremap o :FZF nnoremap O :FZF! @@ -678,6 +678,18 @@ if v:version >= 800 ":call LanguageClient_setLoggingLevel('DEBUG') ":LanguageClientStart + "Language Client recommanded settings + Plugin 'Shougo/deoplete.nvim' " Need to install pynvim + Plugin 'roxma/nvim-yarp' + Plugin 'roxma/vim-hug-neovim-rpc' + let g:deoplete#enable_at_startup = 1 + + Plugin 'Shougo/echodoc.vim' + + let cmdheight=2 + let g:echodoc#enable_at_startup = 1 + let g:echodoc#type = 'signature' + function LC_maps() if has_key(g:LanguageClient_serverCommands, &filetype) nmap K (lcn-hover) @@ -690,8 +702,10 @@ if v:version >= 800 endif endfunction augroup LSP - autocmd FileType * call LC_maps() + autocmd FileType c,cpp call LC_maps() augroup END + + else "Syntax checking | Install flake8 or pylint for python " Install shellcheck for bash diff --git a/Makefile b/Makefile index 91d0c5b..1a85c2f 100644 --- a/Makefile +++ b/Makefile @@ -4,7 +4,7 @@ DOT_FILES=$(filter-out $(IGNORE_DOT_FILES), $(wildcard .*) .ssh/config $(wildcar DOT_INSTALLED=$(foreach dot, $(DOT_FILES), $(HOME)/$(dot)) ROOT_DIR:=$(shell dirname $(realpath $(lastword $(MAKEFILE_LIST)))) -PKG_ARCH_BASE=aspell-en aspell-fr conky cscope ctags dunst eog firefox noto-fonts-emoji fzf git gmrun gnome-terminal genius gvim hunspell-fr hyphen-en hyphen-fr lightdm numlockx openssh polkit-gnome python3 sudo tint2 tmux unrar unzip udevil zsh xclip openbox obconf +PKG_ARCH_BASE=aspell-en aspell-fr conky cscope ctags dunst eog firefox noto-fonts-emoji fzf git gmrun gnome-terminal genius gvim hunspell-fr hyphen-en hyphen-fr lightdm numlockx openssh polkit-gnome python3 python-pynvim sudo tint2 tmux unrar unzip udevil zsh xclip openbox obconf PKG_ARCH_DEV=autopep8 bear cppcheck clang flake8 gcc hstr shellcheck strace gitk tig PKG_UBUNTU_BASE=aspell-en aspell-fr conky cscope exuberant-ctags dunst eog firefox git gmrun gnome-terminal genius vim-gtk3 hunspell-fr hyphen-fr lightdm numlockx python3 sudo tint2 tmux unrar unzip udevil zsh openbox obconf