From fd2c69bf1821d9d0f1b489f9161e0a6ddd7d105d Mon Sep 17 00:00:00 2001 From: Yaroslav Date: Wed, 12 Aug 2020 00:34:31 +0300 Subject: filetype related changes * Updated some filetype.vim that are related to simple text or prose writing (not coding related) to use a different context with SuperTab * Use LanguageClient-neovim + RLS instead of racer --- dotfiles/.config/nvim/init.vim | 29 ++++++++++++++++++++++++++++- 1 file changed, 28 insertions(+), 1 deletion(-) (limited to 'dotfiles/.config/nvim') diff --git a/dotfiles/.config/nvim/init.vim b/dotfiles/.config/nvim/init.vim index f27060c..0548cea 100644 --- a/dotfiles/.config/nvim/init.vim +++ b/dotfiles/.config/nvim/init.vim @@ -19,7 +19,10 @@ Plug 'neomake/neomake' Plug 'jamessan/vim-gnupg' Plug 'majutsushi/tagbar' Plug 'rust-lang/rust.vim' -Plug 'racer-rust/vim-racer' +Plug 'autozimu/LanguageClient-neovim', { + \ 'branch': 'next', + \ 'do': 'bash install.sh', + \ } call plug#end() " Some basics: @@ -37,6 +40,15 @@ call plug#end() set relativenumber set scrolloff=5 +" Set screen title +let &titlestring = "vim - " . expand("%:t") +if &term == "screen" + set t_ts=^[k + set t_fs=^[\ +endif +set title +au BufEnter * let &titlestring = "vim - " . expand("%t") + " Functions for git branch name on statusline function! GitBranch() return system("git rev-parse --abbrev-ref HEAD 2>/dev/null | tr -d '\n'") @@ -175,12 +187,27 @@ call plug#end() inoremap jw inoremap wj +" SuperTab + let g:SuperTabDefaultCompletionType = "context" + let g:SuperTabContextDefaultCompletionType = "" + " NERDTree map f :NERDTreeToggle " Tagbar map :TagbarToggle +" LSP + let g:LanguageClient_serverCommands = { + \ 'rust': ['/usr/bin/rustup', 'run', 'stable', 'rls'], + \ 'javascript': ['/usr/local/bin/javascript-typescript-stdio'], + \ 'javascript.jsx': ['tcp://127.0.0.1:2089'], + \ 'python': ['/usr/local/bin/pyls'], + \ } + + nmap (lcn-menu) + nmap gd (lcn-definition) + " neomake let g:neomake_javascript_enabled_makers = ['eslint'] let g:neomake_javascript_eslint_exe = $PWD .'/node_modules/.bin/eslint' -- cgit v1.2.3