add neovim configs to dotconfig
This commit is contained in:
212
nvim/init.vim
Normal file
212
nvim/init.vim
Normal file
@@ -0,0 +1,212 @@
|
||||
call plug#begin()
|
||||
Plug 'airblade/vim-gitgutter'
|
||||
Plug 'dense-analysis/ale'
|
||||
Plug 'deoplete-plugins/deoplete-jedi'
|
||||
Plug 'deoplete-plugins/deoplete-go'
|
||||
Plug 'joshdick/onedark.vim'
|
||||
Plug 'junegunn/fzf'
|
||||
Plug 'luochen1990/rainbow'
|
||||
Plug 'preservim/nerdtree'
|
||||
Plug 'Shougo/deoplete.nvim', { 'do': ':UpdateRemotePlugins' }
|
||||
Plug 'tpope/vim-fugitive'
|
||||
Plug 'tpope/vim-surround'
|
||||
Plug 'vim-airline/vim-airline'
|
||||
Plug 'xuyuanp/nerdtree-git-plugin'
|
||||
|
||||
call plug#end()
|
||||
|
||||
|
||||
" selection - "old", "inclusive" or "exclusive"; how selecting text behaves
|
||||
set selection=exclusive
|
||||
|
||||
" enable syntax highlighting by default
|
||||
syntax enable
|
||||
|
||||
" background - "dark" or "light"; the background color brightness
|
||||
set background=dark
|
||||
|
||||
" scrolloff - number of screen lines to show around the cursor
|
||||
"set so=0
|
||||
set scrolloff=10
|
||||
|
||||
" wrap - long lines wrap
|
||||
set wrap " nowrap
|
||||
|
||||
" linebreak - wrap long lines at a character in 'breakat' (local to window)
|
||||
set linebreak " nolbr
|
||||
|
||||
" breakat - which characters might cause a line break
|
||||
set breakat=\ \ !@*-+;:,./?
|
||||
|
||||
" number - show the line number for each line (local to window)
|
||||
set number " nonu
|
||||
|
||||
" undolevels - maximum number of changes that can be undone
|
||||
set undolevels=1000
|
||||
|
||||
" backspace - specifies what <BS>, CTRL-W, etc. can do in Insert mode
|
||||
set backspace=2
|
||||
|
||||
" showmatch - When inserting a bracket, briefly jump to its match
|
||||
set showmatch " nosm
|
||||
|
||||
" matchtime - tenth of a second to show a match for 'showmatch'
|
||||
set matchtime=5
|
||||
|
||||
" matchpairs - list of pairs that match for the "%" command (local to buffer)
|
||||
set matchpairs=(:),{:},[:],<:>
|
||||
|
||||
" tabstop - number of spaces a <Tab> in the text stands for (local to buffer)
|
||||
set tabstop=2
|
||||
|
||||
" shiftwidth - number of spaces used for each step of (auto)indent (local to buffer)
|
||||
set shiftwidth=2
|
||||
|
||||
" smarttab - a <Tab> in an indent inserts 'shiftwidth' spaces
|
||||
set smarttab " nosta
|
||||
|
||||
" softtabstop - if non-zero, number of spaces to insert for a <Tab> (local to buffer)
|
||||
set softtabstop=2
|
||||
|
||||
" shiftround - round to 'shiftwidth' for "<<" and ">>"
|
||||
set shiftround " nosr
|
||||
|
||||
" expandtab - expand <Tab> to spaces in Insert mode (local to buffer)
|
||||
set expandtab " noet
|
||||
|
||||
" autoindent - automatically set the indent of a new line (local to buffer)
|
||||
set autoindent " noai
|
||||
|
||||
" smartindent - do clever autoindenting (local to buffer)
|
||||
set smartindent " nosi
|
||||
|
||||
" splitbelow - a new window is put below the current one
|
||||
set splitbelow " nosb
|
||||
|
||||
" splitright - a new window is put right of the current one
|
||||
set splitright " nospr
|
||||
|
||||
" showcmd - show (partial) command keys in the status line
|
||||
set showcmd " nosc
|
||||
|
||||
" showmode - display the current mode in the status line
|
||||
set noshowmode " nosmd
|
||||
|
||||
" ruler - show cursor position below each window
|
||||
set ruler " noru
|
||||
|
||||
" history - how many command lines are remembered
|
||||
set history=100
|
||||
|
||||
" listchars - which characters to list
|
||||
set listchars=eol:$,tab:>-,trail:~,extends:>,precedes:<,space:.
|
||||
|
||||
" list - show characters defined in listchars
|
||||
set list " nolist
|
||||
|
||||
" cursorline - show a marker on the current line
|
||||
set cursorline
|
||||
|
||||
" colortheme settings
|
||||
let $NVIM_TUI_ENABLE_TRUE_COLOR = 1
|
||||
let g:onedark_termcolors = 256
|
||||
let g:onedark_terminal_italics = 0
|
||||
|
||||
" colorscheme - set default color theme
|
||||
colorscheme onedark
|
||||
|
||||
hi Normal guibg=NONE ctermbg=NONE
|
||||
|
||||
" airline settings
|
||||
let g:airline_theme = 'onedark'
|
||||
let g:airline_powerline_fonts = 1
|
||||
set encoding=utf-8
|
||||
|
||||
"
|
||||
" Configuration gitgutter
|
||||
"
|
||||
let g:gitgutter_enabled = 1
|
||||
let g:gitgutter_highlight_lines = 0
|
||||
hi SignColumn cterm=none ctermbg=none
|
||||
set updatetime=100
|
||||
|
||||
" Use deoplete.
|
||||
let g:deoplete#enable_at_startup = 1
|
||||
inoremap <expr><tab> pumvisible() ? "\<c-n>" : "\<tab>"
|
||||
|
||||
" deoplete-go settings
|
||||
let g:deoplete#sources#go#gocode_binary = $GOPATH.'/bin/gocode'
|
||||
let g:deoplete#sources#go#sort_class = ['package', 'func', 'type', 'var', 'const']
|
||||
|
||||
|
||||
"
|
||||
" deoplete-jedi settings
|
||||
"
|
||||
let g:deoplete#sources#jedi#ignore_errors = ['E501']
|
||||
|
||||
|
||||
" Use goimports for Fmt
|
||||
"
|
||||
let g:go_fmt_command = "goimports"
|
||||
|
||||
"
|
||||
" filetype (common for plugins)
|
||||
"
|
||||
filetype plugin on
|
||||
|
||||
"
|
||||
" vim-go configuration
|
||||
"
|
||||
|
||||
let g:go_gocode_autobuild = 1
|
||||
let g:go_metalinter_deadline = "20s"
|
||||
let g:go_autodetect_gopath = 0
|
||||
|
||||
|
||||
"
|
||||
" vim-python configuration
|
||||
"
|
||||
let g:pymode_lint_ignore = ["E501", "W",]
|
||||
let g:python_highlight_all = 1
|
||||
|
||||
|
||||
"
|
||||
" ale configuration
|
||||
"
|
||||
let g:ale_fixers = {
|
||||
\ '*': ['remove_trailing_lines', 'trim_whitespace'],
|
||||
\}
|
||||
let g:ale_fix_on_save = 1
|
||||
let g:airline#extensions#ale#enabled = 1
|
||||
let g:ale_lint_on_text_changed = 'never'
|
||||
|
||||
|
||||
"
|
||||
" vim-rainbow settings
|
||||
"
|
||||
let g:rainbow_active = 1
|
||||
|
||||
|
||||
"
|
||||
" gopass configuration
|
||||
"
|
||||
au BufNewFile,BufRead /dev/shm/gopass.* setlocal noswapfile nobackup noundofile
|
||||
|
||||
|
||||
"
|
||||
" NERDtree settings
|
||||
"
|
||||
" autocmd vimenter * NERDTree
|
||||
map - :NERDTreeToggle<CR>
|
||||
let g:NERDGitStatusTreeIndicatorMapCustom = {
|
||||
\ "Modified" : "✹",
|
||||
\ "Staged" : "✚",
|
||||
\ "Untracked" : "✭",
|
||||
\ "Renamed" : "➜",
|
||||
\ "Unmerged" : "═",
|
||||
\ "Deleted" : "✖",
|
||||
\ "Dirty" : "✗",
|
||||
\ "Clean" : "✔︎",
|
||||
\ 'Ignored' : '☒',
|
||||
\ "Unknown" : "?"
|
||||
\ }
|
||||
Reference in New Issue
Block a user