diff options
author | Yaroslav <contact@yaroslavps.com> | 2020-08-12 00:34:31 +0300 |
---|---|---|
committer | Yaroslav <contact@yaroslavps.com> | 2020-08-12 00:34:31 +0300 |
commit | fd2c69bf1821d9d0f1b489f9161e0a6ddd7d105d (patch) | |
tree | 225c196ce2a279b9f5ed396144fa1c1b22ee7564 /dotfiles | |
parent | 93e4cfe9fcfc685328b214ad2e0e3d90ceab5519 (diff) | |
download | vimrice-fd2c69bf1821d9d0f1b489f9161e0a6ddd7d105d.tar.gz vimrice-fd2c69bf1821d9d0f1b489f9161e0a6ddd7d105d.zip |
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
Diffstat (limited to 'dotfiles')
5 files changed, 36 insertions, 3 deletions
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 <Esc> inoremap wj <Esc> +" SuperTab + let g:SuperTabDefaultCompletionType = "context" + let g:SuperTabContextDefaultCompletionType = "<c-x><c-o>" + " NERDTree map <leader>f :NERDTreeToggle<CR> " Tagbar map <F3> :TagbarToggle<CR> +" 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 <F4> <Plug>(lcn-menu) + nmap <silent> gd <Plug>(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 = "<c-p>" 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 = "<c-p>" 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 = "<c-p>" 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 = "<c-p>" |