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 +++++++++++++++++++++- .../.local/share/nvim/site/after/ftplugin/mail.vim | 3 +++ .../share/nvim/site/after/ftplugin/markdown.vim | 2 +- .../.local/share/nvim/site/after/ftplugin/tex.vim | 2 +- .../.local/share/nvim/site/after/ftplugin/text.vim | 3 +++ 5 files changed, 36 insertions(+), 3 deletions(-) create mode 100644 dotfiles/.local/share/nvim/site/after/ftplugin/mail.vim create mode 100644 dotfiles/.local/share/nvim/site/after/ftplugin/text.vim (limited to 'dotfiles') 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' diff --git a/dotfiles/.local/share/nvim/site/after/ftplugin/mail.vim b/dotfiles/.local/share/nvim/site/after/ftplugin/mail.vim new file mode 100644 index 0000000..2bc09e9 --- /dev/null +++ b/dotfiles/.local/share/nvim/site/after/ftplugin/mail.vim @@ -0,0 +1,3 @@ +setlocal tw=72 +setlocal spell spelllang=en_us,es,ru +let b:SuperTabContextDefaultCompletionType = "" diff --git a/dotfiles/.local/share/nvim/site/after/ftplugin/markdown.vim b/dotfiles/.local/share/nvim/site/after/ftplugin/markdown.vim index 71a1c6b..d248326 100644 --- a/dotfiles/.local/share/nvim/site/after/ftplugin/markdown.vim +++ b/dotfiles/.local/share/nvim/site/after/ftplugin/markdown.vim @@ -1,3 +1,3 @@ - setlocal tw=80 setlocal spell spelllang=en_us,es,ru +let b:SuperTabContextDefaultCompletionType = "" diff --git a/dotfiles/.local/share/nvim/site/after/ftplugin/tex.vim b/dotfiles/.local/share/nvim/site/after/ftplugin/tex.vim index 71a1c6b..d248326 100644 --- a/dotfiles/.local/share/nvim/site/after/ftplugin/tex.vim +++ b/dotfiles/.local/share/nvim/site/after/ftplugin/tex.vim @@ -1,3 +1,3 @@ - setlocal tw=80 setlocal spell spelllang=en_us,es,ru +let b:SuperTabContextDefaultCompletionType = "" diff --git a/dotfiles/.local/share/nvim/site/after/ftplugin/text.vim b/dotfiles/.local/share/nvim/site/after/ftplugin/text.vim new file mode 100644 index 0000000..d248326 --- /dev/null +++ b/dotfiles/.local/share/nvim/site/after/ftplugin/text.vim @@ -0,0 +1,3 @@ +setlocal tw=80 +setlocal spell spelllang=en_us,es,ru +let b:SuperTabContextDefaultCompletionType = "" -- cgit v1.2.3