Update neovim config

Signed-off-by: Sanchayan Maity <maitysanchayan@gmail.com>
This commit is contained in:
Sanchayan Maity 2017-08-04 16:38:35 +05:30
parent d151294b56
commit eafd45df5a
1 changed files with 39 additions and 40 deletions

View File

@ -5,11 +5,8 @@ call plug#begin('~/.config/nvim/plugged')
Plug 'benekastah/neomake'
" Automatically match brackets as you type
Plug 'Raimondi/delimitMate'
" Tab completion
Plug 'ervandew/supertab'
" Haskell
Plug 'neovimhaskell/haskell-vim', { 'for': [ 'haskell', 'cabal' ] }
Plug 'alx741/vim-hindent'
" Lisp
Plug 'vim-scripts/paredit.vim', { 'for': [ 'scheme', 'lisp', 'commonlisp' ] }
" LaTeX Editing
@ -25,8 +22,8 @@ Plug 'thirtythreeforty/lessspace.vim'
Plug 'bling/vim-airline'
Plug 'airblade/vim-gitgutter'
" Manage Project sessions
Plug 'tpope/vim-obsession'
Plug 'dhruvasagar/vim-prosession'
Plug 'xolox/vim-session'
Plug 'xolox/vim-misc'
" Explore filesystem
Plug 'scrooloose/nerdtree'
" Tags
@ -35,27 +32,18 @@ Plug 'universal-ctags/ctags'
Plug 'scrooloose/nerdcommenter'
" Theme
Plug 'sickill/vim-monokai'
" Auto Completion with Deoplete
Plug 'Shougo/deoplete.nvim', { 'do': ':UpdateRemotePlugins' }
" Autocomplete for Python
Plug 'zchee/deoplete-jedi'
" Autocomplete for Rust
Plug 'sebastianmarkow/deoplete-rust'
Plug 'rust-lang/rust.vim'
" For Clojure
Plug 'guns/vim-clojure-static'
Plug 'junegunn/rainbow_parentheses.vim'
Plug 'guns/vim-clojure-highlight'
Plug 'tpope/vim-fireplace'
Plug 'tpope/vim-sexp-mappings-for-regular-people'
Plug 'guns/vim-sexp'
Plug 'tpope/vim-repeat'
" Gtags
Plug 'vim-scripts/gtags.vim'
Plug 'unblevable/quick-scope'
Plug 'justinmk/vim-sneak'
Plug 'wellle/targets.vim'
Plug 'kana/vim-submode' | Plug 'jocap/jumpinline.vim'
" Initialize plugin system
call plug#end()
syntax on
filetype plugin indent on
" Don't mess up undo history
let g:jedi#show_call_signatures = "0"
@ -84,13 +72,11 @@ set ruler " Show the line and column numbers of the cursor.
set number " Show the line numbers on the left side.
set formatoptions+=o " Continue comment marker in new lines.
set textwidth=0 " Hard-wrap long lines as you type them.
"set expandtab " Insert spaces when TAB is pressed.
set tabstop=4 " Render TABs using this many spaces.
set shiftwidth=4 " Indentation amount for < and > commands.
set noerrorbells " No beeps.
set modeline " Enable modeline.
set esckeys " Cursor keys in insert mode.
set linespace=0 " Set line-spacing to minimum.
set nojoinspaces " Prevents inserting two spaces after punctuation on a join (J)
@ -130,6 +116,13 @@ nnoremap <Leader>b :CtrlPBuffer<CR>
nnoremap <Leader>f :CtrlPMRUFiles<CR>
" Open NerdTree
nnoremap <Leader>n :NERDTree<CR>
" Gtags
nnoremap <Leader>] :Gtags<CR><CR>
nnoremap <Leader>\ :Gtags -r<CR><CR>
nnoremap <Leader>c :cclose<CR>
nnoremap <Leader>k :cp<CR>
nnoremap <Leader>j :cn<CR>
nnoremap <Leader>l :cl<CR>
" Manage splits
set splitbelow
@ -141,11 +134,19 @@ syntax enable
colorscheme monokai
" Key Bindings to help with terminal mode
noremap <Esc> <C-\><C-n>
nnoremap <A-h> <C-w>h
nnoremap <A-j> <C-w>j
nnoremap <A-k> <C-w>k
nnoremap <A-l> <C-w>l
:tnoremap <Esc> <C-\><C-n>
:tnoremap <A-h> <C-\><C-N><C-w>h
:tnoremap <A-j> <C-\><C-N><C-w>j
:tnoremap <A-k> <C-\><C-N><C-w>k
:tnoremap <A-l> <C-\><C-N><C-w>l
:inoremap <A-h> <C-\><C-N><C-w>h
:inoremap <A-j> <C-\><C-N><C-w>j
:inoremap <A-k> <C-\><C-N><C-w>k
:inoremap <A-l> <C-\><C-N><C-w>l
:nnoremap <A-h> <C-w>h
:nnoremap <A-j> <C-w>j
:nnoremap <A-k> <C-w>k
:nnoremap <A-l> <C-w>l
" Disable Arrow Keys
inoremap <Up> <NOP>
@ -158,7 +159,6 @@ noremap <Left> <NOP>
noremap <Right> <NOP>
" For Haskell
let g:haskell_indent_disable = 1 " to disabled indentation
let g:haskell_enable_quantification = 1 " to enable highlighting of `forall`
let g:haskell_enable_recursivedo = 1 " to enable highlighting of `mdo` and `rec`
let g:haskell_enable_arrowsyntax = 1 " to enable highlighting of `proc`
@ -166,17 +166,16 @@ let g:haskell_enable_pattern_synonyms = 1 " to enable highlighting of `pattern`
let g:haskell_enable_typeroles = 1 " to enable highlighting of type roles
let g:haskell_enable_static_pointers = 1 " to enable highlighting of `static`
let g:haskell_backpack = 1 " to enable highlighting of backpack keywords
let g:hindent_on_save = 1
let g:hindent_indent_size = 4
let g:hindent_line_length = 80
" For Rust
let g:deoplete#sources#rust#racer_binary='/home/sanchayan/.cargo/bin/racer'
let g:deoplete#sources#rust#rust_source_path='/home/sanchayan/GitSource/rust/src'
" Use deoplete.
let g:deoplete#enable_at_startup = 1
let g:deoplete#enable_smart_case = 1
let g:haskell_indent_if = 3
let g:haskell_indent_case = 2
let g:haskell_indent_let = 4
let g:haskell_indent_where = 6
let g:haskell_indent_before_where = 2
let g:haskell_indent_after_bare_where = 2
let g:haskell_indent_do = 3
let g:haskell_indent_in = 1
let g:haskell_indent_guard = 2
let g:cabal_indent_section = 2
let g:airline#extensions#tabline#enabled = 2
let g:airline#extensions#tabline#fnamemod = ':t'