aboutsummaryrefslogtreecommitdiff
path: root/dotfiles/.config/nvim
diff options
context:
space:
mode:
Diffstat (limited to 'dotfiles/.config/nvim')
-rw-r--r--dotfiles/.config/nvim/init.vim29
1 files changed, 28 insertions, 1 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'