From eafd45df5a85221bcde545b65cdba3d2276e48d7 Mon Sep 17 00:00:00 2001 From: Sanchayan Maity Date: Fri, 4 Aug 2017 16:38:35 +0530 Subject: [PATCH] Update neovim config Signed-off-by: Sanchayan Maity --- nvim/init.vim | 79 +++++++++++++++++++++++++-------------------------- 1 file changed, 39 insertions(+), 40 deletions(-) diff --git a/nvim/init.vim b/nvim/init.vim index 64de3d4..e094c0b 100644 --- a/nvim/init.vim +++ b/nvim/init.vim @@ -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 b :CtrlPBuffer nnoremap f :CtrlPMRUFiles " Open NerdTree nnoremap n :NERDTree +" Gtags +nnoremap ] :Gtags +nnoremap \ :Gtags -r +nnoremap c :cclose +nnoremap k :cp +nnoremap j :cn +nnoremap l :cl " Manage splits set splitbelow @@ -141,11 +134,19 @@ syntax enable colorscheme monokai " Key Bindings to help with terminal mode -noremap -nnoremap h -nnoremap j -nnoremap k -nnoremap l +:tnoremap +:tnoremap h +:tnoremap j +:tnoremap k +:tnoremap l +:inoremap h +:inoremap j +:inoremap k +:inoremap l +:nnoremap h +:nnoremap j +:nnoremap k +:nnoremap l " Disable Arrow Keys inoremap @@ -158,7 +159,6 @@ noremap noremap " 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'