From e038b8c08c40ed0c218a6b504b42e9f4cc58a8c2 Mon Sep 17 00:00:00 2001 From: Ian Keane Date: Sun, 28 Dec 2025 14:34:31 -0500 Subject: [PATCH] Vim updates --- vimrc | 119 +++++++++++++++++++++++++++++++++++++++++++++++----------- 1 file changed, 98 insertions(+), 21 deletions(-) diff --git a/vimrc b/vimrc index c3ca37e..5110f21 100755 --- a/vimrc +++ b/vimrc @@ -16,12 +16,16 @@ Plug 'tpope/vim-commentary' Plug 'dense-analysis/ale' 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 'haya14busa/incsearch.vim' Plug 'sheerun/vim-polyglot' Plug 'nvie/vim-flake8' - Plug 'wolf-dog/lightline-sceaduhelm.vim' + " Plug 'wolf-dog/lightline-sceaduhelm.vim' Plug 'tpope/vim-fugitive' Plug 'justinmk/vim-sneak' Plug 'jgdavey/tslime.vim' @@ -53,6 +57,8 @@ Plug 'jlanzarotta/bufexplorer' Plug 'chriskempson/base16-vim' Plug 'HiPhish/guile.vim' + Plug 'rust-lang/rust.vim' + Plug 'jasonccox/vim-wayland-clipboard' call plug#end() @@ -61,42 +67,107 @@ " appearance {{{ syntax on " Enable syntax -colorscheme base16-oceanicnext +" colorscheme base16-oceanicnext " set termguicolors? -" set t_Co=16? +set t_Co=16? set encoding=utf-8 " Keep utf-8 encoding set scrolloff=2 " Keep at least 3 lines above and below cursor set showmode " Something something buffers set showcmd " Show command in bottom bar set wildmenu " Visual autocomplete for command menu 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 nocursorline " Highlight current line -highlight GitGutterAdd ctermbg=black guibg=black +" highlight GitGutterAdd ctermbg=black guibg=black highlight SignColumn guibg=black ctermbg=black -highlight clear LineNr highlight GitGutterAdd ctermbg=NONE highlight GitGutterChange ctermbg=NONE highlight GitGutterDelete ctermbg=NONE highlight Folded ctermbg=NONE -highlight Search ctermfg=white ctermbg=blue -highlight Visual ctermbg=DarkGreen " Make search terms more visible +" highlight Search ctermfg=white ctermbg=blue +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" " remove underline on current line number hi CursorLineNr cterm=NONE -" Lightline -let g:lightline = { 'colorscheme': 'sceaduhelm' } -set fillchars+=vert:│ +hi VertSplit ctermfg=black +hi VertSplit ctermbg=green +set fillchars=vert:┃ -command! LightlineReload call LightlineReload() +" #### STATUSBAR -function! LightlineReload() - call lightline#init() - call lightline#colorscheme() - call lightline#update() +" Need to configure statusline as it will be used on non-active windows +" set statusline=%f\ %h%m%r%=%l,%c\ %P +" highlight StatusLine guibg=black ctermbg=black + +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 +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 set list @@ -139,6 +210,11 @@ set listchars=tab:▸\ ,eol:¬ let g:bufExplorerDefaultHelp=0 " Do not show default help. set nobackup + augroup pencil + autocmd! + autocmd FileType text, txt, asciidoc, adoc call pencil#init({'wrap': 'hard'}) + augroup END + "}}} " searching {{{ @@ -226,14 +302,14 @@ set listchars=tab:▸\ ,eol:¬ " Customize fzf colors to match your color scheme let g:fzf_colors = \ { 'fg': [ 'fg', 'Normal'], - \ 'bg': [ 'bg', 'Normal'], + \ 'bg': [ 'fg', 'Normal'], \ 'hl': [ 'fg', 'Comment'], \ 'fg+': [ 'fg', 'CursorLine', 'CursorColumn', 'Normal'], - \ 'bg+': [ 'bg', 'CursorLine', 'CursorColumn'], + \ 'bg+': [ '23', 'CursorLine', 'CursorColumn'], \ 'hl+': [ 'fg', 'Statement'], \ 'info': [ 'fg', 'PreProc'], \ 'border': [ 'fg', 'Ignore'], - \ 'prompt': [ 'fg', 'Conditional'], + \ 'prompt': [ '23', 'Conditional'], \ 'pointer': [ 'fg', 'Exception'], \ 'marker': [ 'fg', 'Keyword'], \ 'spinner': [ 'fg', 'Label'], @@ -288,8 +364,9 @@ set listchars=tab:▸\ ,eol:¬ " ALE {{{ let g:ale_linters = {'javascript': ['tsserver'], \ 'typescript': ['tsserver'], + \ 'rust': ['analyzer'], \ 'typescriptreact': ['tsserver'], - \ 'python': ['flake8'], + \ 'python': ['flake8', 'pylsp'], \ 'css': ['csslint'], \ 'dockerfile': ['hadolint'], \ 'yaml': ['yamllint'] }