dotfiles/dot_config/nvim/init.vim

70 lines
1.6 KiB
VimL
Raw Normal View History

2020-04-09 04:18:20 +00:00
call plug#begin()
Plug 'editorconfig/editorconfig-vim'
Plug 'tomasiser/vim-code-dark'
Plug 'vim-airline/vim-airline'
Plug 'mhinz/vim-startify'
Plug 'ctrlpvim/ctrlp.vim'
Plug 'dense-analysis/ale'
Plug 'vim-syntastic/syntastic'
Plug 'majutsushi/tagbar'
Plug 'preservim/nerdtree'
Plug 'jiangmiao/auto-pairs'
Plug 'Shougo/deoplete.nvim', { 'do': ':UpdateRemotePlugins' }
Plug 'autozimu/LanguageClient-neovim', {
\ 'branch': 'next',
\ 'do': 'bash install.sh',
\ }
Plug 'rust-lang/rust.vim'
" Plug 'racer-rust/vim-racer'
Plug 'idris-hackers/idris-vim'
call plug#end()
" General config
colorscheme codedark
set splitright
set number
set cursorline
set hidden
syntax on
filetype on
filetype plugin indent on
let mapleader = ";"
nnoremap T :vsplit<BAR>vertical resize 54<BAR>terminal<CR>i
" Plugin-related maps
nmap <F8> :TagbarToggle<CR>
map <C-n> :NERDTreeToggle<CR>
let g:LanguageClient_serverCommands = {
\ 'rust': ['rust-analyzer'],
\ }
nnoremap <F5> :call LanguageClient_contextMenu()<CR>
function LC_maps()
if has_key(g:LanguageClient_serverCommands, &filetype)
nnoremap <buffer> <silent> K :call LanguageClient#textDocument_hover()<cr>
nnoremap <buffer> <silent> gd :call LanguageClient#textDocument_definition()<CR>
nnoremap <buffer> <silent> <F2> :call LanguageClient#textDocument_rename()<CR>
endif
endfunction
autocmd FileType * call LC_maps()
" Plugin-related configs
let g:airline#extensions#tabline#buffer_nr_show = 1
let g:airline#extensions#tabline#enabled = 1
let g:deoplete#enable_at_startup = 1
" let g:rustfmt_autosave = 1
let g:racer_experimental_completer = 1