dotfiles/.config/nvim/init.vim

95 lines
1.9 KiB
VimL
Raw Normal View History

2020-06-18 05:58:10 +00:00
" Shortcuts
map <C-o> :NERDTreeToggle<CR>
map <F8> :TagbarToggle<CR>
2020-06-19 02:07:10 +00:00
" Required for operations modifying multiple buffers like rename.
set hidden
let g:LanguageClient_serverCommands = {
\ 'rust': ['rust-analyzer']
\ }
2020-06-18 05:58:10 +00:00
" Navigate Completion List
2020-06-19 02:07:10 +00:00
inoremap <silent><expr> <Tab> pumvisible() ? "\<C-n>" : "\<Tab>"
inoremap <silent><expr> <S-Tab> pumvisible() ? "\<C-p>" : "\<S-Tab>"
2020-06-18 05:58:10 +00:00
" Confirm Selection
inoremap <expr> <cr> pumvisible() ? "\<C-y>" : "\<C-g>u\<CR>"
2020-06-19 02:07:10 +00:00
" LanguageClient Options
nnoremap <F5> :call LanguageClient_contextMenu()<CR>
2020-06-18 05:58:10 +00:00
" Plugged Plugins
call plug#begin(stdpath('data') . '/plugged')
2020-06-19 02:07:10 +00:00
" Delimiter Autocompletion
Plug 'raimondi/delimitmate'
2020-06-18 05:58:10 +00:00
" One Dark Theme
Plug 'joshdick/onedark.vim'
2020-06-19 02:07:10 +00:00
" Monokai Theme
Plug 'tomasr/molokai'
2020-06-18 05:58:10 +00:00
" Tender Theme
Plug 'jacoborus/tender.vim'
2020-06-19 02:07:10 +00:00
" Not too sure if this extension is necessary tbh
2020-06-18 05:58:10 +00:00
Plug 'sheerun/vim-polyglot'
" Powerline Bar at bottom of screen
Plug 'itchyny/lightline.vim'
" Scope Tags
Plug 'majutsushi/tagbar'
" Syntax
Plug 'vim-syntastic/syntastic'
" Rust Support
Plug 'rust-lang/rust.vim'
2020-06-19 02:07:10 +00:00
" Language Server Protocol Support
Plug 'autozimu/LanguageClient-neovim', { 'branch': 'next', 'do': 'bash install.sh', }
" Autocomplete
Plug 'Shougo/deoplete.nvim', { 'do': ':UpdateRemotePlugins' }
" Fuzzy Search
Plug 'junegunn/fzf'
2020-06-18 05:58:10 +00:00
" Multiple Cursors
Plug 'terryma/vim-multiple-cursors'
" File Browser
Plug 'preservim/nerdtree'
" NerdTree Icons (Should be last according to docs)
Plug 'ryanoasis/vim-devicons'
2020-06-19 02:07:10 +00:00
" Better Rust Synatax Highlighting
Plug 'arzg/vim-rust-syntax-ext'
2020-06-18 05:58:10 +00:00
call plug#end()
" Autosave with rust-fmt (Rust Only)
let g:rustfmt_autosave = 1
2020-06-19 02:07:10 +00:00
" Enable Autocomplete
let g:deoplete#enable_at_startup = 1
2020-06-18 05:58:10 +00:00
" Install Tender for Lightline
2020-06-19 02:07:10 +00:00
let g:lightline = { 'colorscheme': 'molokai' }
" Let The LSP Client know which Language servers to use
let g:LanguageClient_serverCommands = {
\ 'rust': ['rust-analyzer']
\ }
2020-06-18 05:58:10 +00:00
" Configuration
set noshowmode " Not Needed because we have Lightline
2020-06-19 02:07:10 +00:00
colorscheme molokai
2020-06-18 05:58:10 +00:00