Vim updates

This commit is contained in:
Ian Keane 2025-12-28 14:34:31 -05:00
parent d80c1bac80
commit e038b8c08c

119
vimrc
View file

@ -16,12 +16,16 @@
Plug 'tpope/vim-commentary' Plug 'tpope/vim-commentary'
Plug 'dense-analysis/ale' Plug 'dense-analysis/ale'
Plug 'airblade/vim-gitgutter' Plug 'airblade/vim-gitgutter'
Plug 'itchyny/lightline.vim' " Plug 'itchyny/lightline.vim'
Plug 'vim-airline/vim-airline'
Plug 'preservim/vim-pencil'
Plug 'vim-airline/vim-airline-themes'
Plug 'tommcdo/vim-exchange'
Plug 'tpope/vim-repeat' Plug 'tpope/vim-repeat'
Plug 'haya14busa/incsearch.vim' Plug 'haya14busa/incsearch.vim'
Plug 'sheerun/vim-polyglot' Plug 'sheerun/vim-polyglot'
Plug 'nvie/vim-flake8' Plug 'nvie/vim-flake8'
Plug 'wolf-dog/lightline-sceaduhelm.vim' " Plug 'wolf-dog/lightline-sceaduhelm.vim'
Plug 'tpope/vim-fugitive' Plug 'tpope/vim-fugitive'
Plug 'justinmk/vim-sneak' Plug 'justinmk/vim-sneak'
Plug 'jgdavey/tslime.vim' Plug 'jgdavey/tslime.vim'
@ -53,6 +57,8 @@
Plug 'jlanzarotta/bufexplorer' Plug 'jlanzarotta/bufexplorer'
Plug 'chriskempson/base16-vim' Plug 'chriskempson/base16-vim'
Plug 'HiPhish/guile.vim' Plug 'HiPhish/guile.vim'
Plug 'rust-lang/rust.vim'
Plug 'jasonccox/vim-wayland-clipboard'
call plug#end() call plug#end()
@ -61,42 +67,107 @@
" appearance {{{ " appearance {{{
syntax on " Enable syntax syntax on " Enable syntax
colorscheme base16-oceanicnext " colorscheme base16-oceanicnext
" set termguicolors? " set termguicolors?
" set t_Co=16? set t_Co=16?
set encoding=utf-8 " Keep utf-8 encoding set encoding=utf-8 " Keep utf-8 encoding
set scrolloff=2 " Keep at least 3 lines above and below cursor set scrolloff=2 " Keep at least 3 lines above and below cursor
set showmode " Something something buffers set showmode " Something something buffers
set showcmd " Show command in bottom bar set showcmd " Show command in bottom bar
set wildmenu " Visual autocomplete for command menu set wildmenu " Visual autocomplete for command menu
set wildmode=list:longest " Show all completions on tab set wildmode=list:longest " Show all completions on tab
set laststatus=2 " Last window will always have statusline " set laststatus=2 " Last window will always have statusline
set showmatch " Highlight matching [{()}] set showmatch " Highlight matching [{()}]
set nocursorline " Highlight current line set nocursorline " Highlight current line
highlight GitGutterAdd ctermbg=black guibg=black " highlight GitGutterAdd ctermbg=black guibg=black
highlight SignColumn guibg=black ctermbg=black highlight SignColumn guibg=black ctermbg=black
highlight clear LineNr
highlight GitGutterAdd ctermbg=NONE highlight GitGutterAdd ctermbg=NONE
highlight GitGutterChange ctermbg=NONE highlight GitGutterChange ctermbg=NONE
highlight GitGutterDelete ctermbg=NONE highlight GitGutterDelete ctermbg=NONE
highlight Folded ctermbg=NONE highlight Folded ctermbg=NONE
highlight Search ctermfg=white ctermbg=blue " highlight Search ctermfg=white ctermbg=blue
highlight Visual ctermbg=DarkGreen " Make search terms more visible highlight Search ctermbg=23
" highlight Visual ctermbg=DarkGreen " Make search terms more visible
highlight Visual ctermbg=23 " Make search terms more visible
let g:ctrlsf_default_root="project" let g:ctrlsf_default_root="project"
" remove underline on current line number " remove underline on current line number
hi CursorLineNr cterm=NONE hi CursorLineNr cterm=NONE
" Lightline hi VertSplit ctermfg=black
let g:lightline = { 'colorscheme': 'sceaduhelm' } hi VertSplit ctermbg=green
set fillchars+=vert:│ set fillchars=vert:┃
command! LightlineReload call LightlineReload() " #### STATUSBAR
function! LightlineReload() " Need to configure statusline as it will be used on non-active windows
call lightline#init() " set statusline=%f\ %h%m%r%=%l,%c\ %P
call lightline#colorscheme() " highlight StatusLine guibg=black ctermbg=black
call lightline#update()
let g:airline#extensions#tabline#enabled = 1
let g:airline_theme='base16'
" ## Clean up tabbar##
" Disable showing the tab number
let g:airline#extensions#tabline#show_tab_nr = 0
" Simplify the tabline to show only the buffer name, no "tabs" or "buffers"
let g:airline#extensions#tabline#show_splits = 0
let g:airline#extensions#tabline#show_buffers = 1
" " Disable showing the buffer number
let g:airline#extensions#tabline#buffer_nr_show = 0
" Optional: turn off clickable tabs if you do not need them
let g:airline#extensions#tabline#buffer_idx_mode = 0
" Don't show nr of tabs
let g:airline#extensions#tabline#show_tab_count = 0
" Don't show 'x' on the top right
let g:airline#extensions#tabline#show_close_button = 0
" Don't show 'tabs' or 'buffers' in tabline
let g:airline#extensions#tabline#show_tab_type = 0
" No separators
let g:airline#extensions#tabline#left_sep = ' '
let g:airline#extensions#tabline#left_alt_sep = ' '
let g:airline#extensions#tabline#right_sep = ' '
let g:airline#extensions#tabline#right_alt_sep = ' '
function! s:update_highlights()
hi CursorLine ctermbg=none guibg=NONE
hi airline_a_inactive guibg=red ctermbg=red
hi airline_b_inactive guibg=red ctermbg=red
hi airline_c_inactive guibg=red ctermbg=red
hi airline_a guibg=red ctermbg=red
hi airline_b guibg=red ctermbg=red
hi airline_c guibg=red ctermbg=red
endfunction endfunction
autocmd User AirlineAfterInit call s:update_highlights()
" let g:airline_theme_patch_func = 'AirlineThemePatch'
" function! AirlineThemePatch(palette)
" if g:airline_theme == 'badwolf'
" for colors in values(a:palette.inactive)
" let colors[3] = 1
" endfor
" endif
" endfunction
" Lightline
" let g:lightline = { 'colorscheme': '16color' }
" set fillchars+=vert:│
" command! LightlineReload call LightlineReload()
" function! LightlineReload()
" call lightline#init()
" call lightline#colorscheme()
" call lightline#update()
" endfunction
" Invisible characters " Invisible characters
set list set list
@ -139,6 +210,11 @@ set listchars=tab:▸\ ,eol:¬
let g:bufExplorerDefaultHelp=0 " Do not show default help. let g:bufExplorerDefaultHelp=0 " Do not show default help.
set nobackup set nobackup
augroup pencil
autocmd!
autocmd FileType text, txt, asciidoc, adoc call pencil#init({'wrap': 'hard'})
augroup END
"}}} "}}}
" searching {{{ " searching {{{
@ -226,14 +302,14 @@ set listchars=tab:▸\ ,eol:¬
" Customize fzf colors to match your color scheme " Customize fzf colors to match your color scheme
let g:fzf_colors = let g:fzf_colors =
\ { 'fg': [ 'fg', 'Normal'], \ { 'fg': [ 'fg', 'Normal'],
\ 'bg': [ 'bg', 'Normal'], \ 'bg': [ 'fg', 'Normal'],
\ 'hl': [ 'fg', 'Comment'], \ 'hl': [ 'fg', 'Comment'],
\ 'fg+': [ 'fg', 'CursorLine', 'CursorColumn', 'Normal'], \ 'fg+': [ 'fg', 'CursorLine', 'CursorColumn', 'Normal'],
\ 'bg+': [ 'bg', 'CursorLine', 'CursorColumn'], \ 'bg+': [ '23', 'CursorLine', 'CursorColumn'],
\ 'hl+': [ 'fg', 'Statement'], \ 'hl+': [ 'fg', 'Statement'],
\ 'info': [ 'fg', 'PreProc'], \ 'info': [ 'fg', 'PreProc'],
\ 'border': [ 'fg', 'Ignore'], \ 'border': [ 'fg', 'Ignore'],
\ 'prompt': [ 'fg', 'Conditional'], \ 'prompt': [ '23', 'Conditional'],
\ 'pointer': [ 'fg', 'Exception'], \ 'pointer': [ 'fg', 'Exception'],
\ 'marker': [ 'fg', 'Keyword'], \ 'marker': [ 'fg', 'Keyword'],
\ 'spinner': [ 'fg', 'Label'], \ 'spinner': [ 'fg', 'Label'],
@ -288,8 +364,9 @@ set listchars=tab:▸\ ,eol:¬
" ALE {{{ " ALE {{{
let g:ale_linters = {'javascript': ['tsserver'], let g:ale_linters = {'javascript': ['tsserver'],
\ 'typescript': ['tsserver'], \ 'typescript': ['tsserver'],
\ 'rust': ['analyzer'],
\ 'typescriptreact': ['tsserver'], \ 'typescriptreact': ['tsserver'],
\ 'python': ['flake8'], \ 'python': ['flake8', 'pylsp'],
\ 'css': ['csslint'], \ 'css': ['csslint'],
\ 'dockerfile': ['hadolint'], \ 'dockerfile': ['hadolint'],
\ 'yaml': ['yamllint'] } \ 'yaml': ['yamllint'] }