Improve colorscheme support in smaller installations

This commit is contained in:
Edith Boles committed 2026-11-28 20:27:58 -08:00
1 parent 2b0d612ad6
commit ac22aabed2
1 file changed
+10 -8
+10 -8
View File
@@ -8,7 +8,7 @@ let required_exes = ["git", "curl", "wget"]
for required_exe in required_exes for required_exe in required_exes
if executable(required_exe) == 0 if executable(required_exe) == 0
echow("Failed to find " + required_exe) echom("Failed to find " . required_exe)
let libs_avail = 0 let libs_avail = 0
endif endif
endfor endfor
@@ -71,6 +71,7 @@ set bg=dark
colorscheme slate colorscheme slate
function SetHighlights() function SetHighlights()
hi StatusLine term=bold,reverse cterm=bold,reverse ctermfg=237 ctermbg=243
hi CursorLineNr term=bold cterm=bold ctermfg=012 gui=bold hi CursorLineNr term=bold cterm=bold ctermfg=012 gui=bold
hi EndOfBuffer ctermfg=bg guifg=#404950 hi EndOfBuffer ctermfg=bg guifg=#404950
hi ALEError ctermbg=DarkRed hi ALEError ctermbg=DarkRed
@@ -88,7 +89,7 @@ function SetHighlights()
hi! def link ALEWarning SpellCap hi! def link ALEWarning SpellCap
endfunction endfunction
call SetHighlights() autocmd ColorScheme * call SetHighlights()
inoremap <expr> <TAB> pumvisible() ? "\<C-n>" : "\<TAB>" inoremap <expr> <TAB> pumvisible() ? "\<C-n>" : "\<TAB>"
inoremap <expr> <S-TAB> pumvisible() ? "\<C-p>" : "\<TAB>" inoremap <expr> <S-TAB> pumvisible() ? "\<C-p>" : "\<TAB>"
@@ -238,15 +239,18 @@ endfor
" PLUGIN SUPPORT REQUIRED AFTER THIS " PLUGIN SUPPORT REQUIRED AFTER THIS
" ================================== " ==================================
if empty(glob("~/.vim/autoload"))
silent execute '!mkdir -p ~/.vim/autoload'
silent execute '!mkdir -p ~/.vim/undodir'
silent execute '!mkdir -p ~/.vim/swapdir'
endif
if libs_avail == 0 if libs_avail == 0
echow("Install the above dependencies to access the rest of this .vimrc's features") echom("Install the above dependencies to access the rest of this .vimrc's features")
finish finish
endif endif
if empty(glob("~/.vim/autoload/plug.vim")) if empty(glob("~/.vim/autoload/plug.vim"))
silent execute '!mkdir -p ~/.vim/autoload'
silent execute '!mkdir -p ~/.vim/undodir'
silent execute '!mkdir -p ~/.vim/swapdir'
silent execute '!curl -fLo ~/.vim/autoload/plug.vim https://raw.github.com/junegunn/vim-plug/master/plug.vim' silent execute '!curl -fLo ~/.vim/autoload/plug.vim https://raw.github.com/junegunn/vim-plug/master/plug.vim'
let install = 1 let install = 1
endif endif
@@ -311,5 +315,3 @@ autocmd BufEnter *.log setlocal autoread
autocmd User LspSetup call LspAddServer(lsp_list) autocmd User LspSetup call LspAddServer(lsp_list)
autocmd User LspSetup call LspOptionsSet(lspOpts) autocmd User LspSetup call LspOptionsSet(lspOpts)
autocmd User LspAttached let b:ale_disable_lsp = 1 autocmd User LspAttached let b:ale_disable_lsp = 1
call SetHighlights()