nvim: add vim-sensible, vim-sleuth and vim-indent-rainbow, formatting changes

This commit is contained in:
Cynthia Foxwell 2022-04-03 21:02:21 -06:00
parent 422db7b293
commit 202df2947f

View file

@ -5,6 +5,7 @@ call plug#begin(stdpath('data') . '/plugged')
Plug 'owozsh/amora'
" misc
Plug 'tpope/vim-sensible'
Plug 'itchyny/vim-gitbranch'
Plug 'andweeb/presence.nvim'
Plug 'ntpeters/vim-better-whitespace'
@ -15,11 +16,13 @@ Plug 'tpope/vim-fugitive'
Plug 'mg979/vim-visual-multi'
"Plug 'rrethy/vim-hexokinase', { 'do': 'make hexokinase' }
Plug 'rhysd/committia.vim'
Plug 'tpope/vim-sleuth'
" interface
Plug 'romgrk/barbar.nvim'
Plug 'preservim/nerdtree'
Plug 'Xuyuanp/nerdtree-git-plugin'
Plug 'adi/vim-indent-rainbow'
" language specific
Plug 'sheerun/vim-polyglot'
@ -32,9 +35,11 @@ Plug 'nvim-lua/completion-nvim'
call plug#end()
" misc
set notermguicolors
colorscheme lena
"let g:mode = "old_amora"
"colorscheme amora
colorscheme lena
"set termguicolors
set fileformat=unix
@ -90,19 +95,29 @@ set shortmess+=c
let g:completion_enable_auto_popup = 1
let g:rainbow_colors_color = [11, 10, 13, 12]
let g:rainbow_colors_black = [11, 10, 13, 12]
fun! EnableRainbowIndent()
if &ft =~ 'fugitive\|nerdtree'
return
endif
call rainbow#enable()
endfun
autocmd WinEnter,VimEnter * call EnableRainbowIndent()
" tre
let g:NERDTreeGitStatusIndicatorMapCustom = {
\ 'Modified' :'U',
\ 'Staged' :'A',
\ 'Untracked' :'',
\ 'Renamed' :'R',
\ 'Unmerged' :'M',
\ 'Deleted' :'D',
\ 'Dirty' :'',
\ 'Ignored' :'I',
\ 'Clean' :'',
\ 'Unknown' :'?',
\ }
\ 'Modified' :'U',
\ 'Staged' :'A',
\ 'Untracked' :'',
\ 'Renamed' :'R',
\ 'Unmerged' :'M',
\ 'Deleted' :'D',
\ 'Dirty' :'',
\ 'Ignored' :'I',
\ 'Clean' :'',
\ 'Unknown' :'?',
\ }
" keys
tnoremap <Esc> <C-\><C-n>
@ -160,12 +175,12 @@ function! s:h(scope, fg, ...) " bg, attr_list, special
endif
let l:hl_string = [
\ 'highlight', a:scope,
\ 'guifg=' . l:fg[0], 'ctermfg=' . l:fg[1],
\ 'guibg=' . l:bg[0], 'ctermbg=' . l:bg[1],
\ 'gui=' . l:attrs, 'cterm=' . l:attrs,
\ 'guisp=' . l:special[0],
\]
\ 'highlight', a:scope,
\ 'guifg=' . l:fg[0], 'ctermfg=' . l:fg[1],
\ 'guibg=' . l:bg[0], 'ctermbg=' . l:bg[1],
\ 'gui=' . l:attrs, 'cterm=' . l:attrs,
\ 'guisp=' . l:special[0],
\]
execute join(l:hl_string, ' ')
endfunction
@ -199,7 +214,15 @@ hi BufferTabpages ctermfg=7 ctermbg=0
hi BufferTabpageFill ctermfg=7 ctermbg=0
hi BufferOffset ctermfg=0 ctermbg=0
hi NvimTreeNormal ctermbg=0
hi! link SignColumn LineNr
hi LspDiagnosticsDefaultHint ctermfg=6
hi LspDiagnosticsDefaultError ctermfg=1
hi LspDiagnosticsDefaultWarning ctermfg=3
hi LspDiagnosticsDefaultInformation ctermfg=7
hi ALEErrorSign ctermfg=1
hi ALEWarningSign ctermfg=3
"call s:h('StatusLine', g:amora#palette.green, g:amora#palette.bgdark)
"call s:h('StatusLineNC', g:amora#palette.fg, g:amora#palette.bgdark)
@ -244,17 +267,17 @@ function! GetMode()
let l:m = mode(1)
if l:m ==# "i"
let l:mode = "INS"
let l:mode = "INS"
elseif l:m ==# "c"
let l:mode = "CMD"
let l:mode = "CMD"
elseif l:m[0] ==# "R"
let l:mode = "REP"
let l:mode = "REP"
elseif l:m ==# "Rv"
let l:mode = "REP"
let l:mode = "REP"
elseif l:m =~# '\v(v|V| |s|S| )'
let l:mode = "VIS"
let l:mode = "VIS"
else
return ""
return ""
endif
return ' '.l:mode.' '