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