- Merge sunbather dark/light into one background-aware color scheme - Fold uninstall.sh into install.sh as a subcommand; drop clone logic - Inline bash_tools/ helpers; remove fct and odict - Remove TPM, tmux-sensible, and tmux-fuzzback; tmux has no plugins now - Remove vim-repeat, vim-fugitive, vim-gitgutter, vim-tmux-navigator, and moonfly; everforest is the default dark theme - Fetch vim-plug via git instead of curl; require git, not curl - Guard termguicolors on Windows consoles without VT support and set nomore before the vimrc loads so headless installs cannot hang - Fall back to sunbather when a color scheme fails to load, without overwriting the saved preference - Append config/vim to runtimepath so netrw stops writing into the repo - Fix .editorconfig Python indent; trim .gitignore; update CI and README Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01NBfsAH6iJg9inkNLKq11YC
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
let s:path = get(g:, 'vim_dir', expand('~/.vim')) . '/theme.json'
|
||||
let s:defaults = {
|
||||
\ 'background': 'dark',
|
||||
\ 'dark': {'theme': 'moonfly', 'transparent': v:false},
|
||||
\ 'dark': {'theme': 'everforest', 'transparent': v:false},
|
||||
\ 'light': {'theme': 'PaperColor', 'transparent': v:false}}
|
||||
let s:config = deepcopy(s:defaults)
|
||||
let s:applying = v:false
|
||||
@@ -60,11 +60,15 @@ endfunction
|
||||
|
||||
function! theme#apply(name) abort
|
||||
let l:background = &background
|
||||
let l:name = s:Available(a:name) ? a:name
|
||||
\ : (l:background ==# 'dark' ? 'sunbather_dark' : 'sunbather_light')
|
||||
let l:name = s:Available(a:name) ? a:name : 'sunbather'
|
||||
let s:applying = v:true
|
||||
try
|
||||
execute 'colorscheme ' . l:name
|
||||
catch
|
||||
" A scheme that fails to load (for example, one that needs true color in a
|
||||
" terminal without it) must not leave Vim without a color scheme. The
|
||||
" saved preference is kept so the next capable session restores it.
|
||||
colorscheme sunbather
|
||||
finally
|
||||
let s:applying = v:false
|
||||
endtry
|
||||
@@ -100,9 +104,6 @@ function! theme#onColorScheme(name) abort
|
||||
if s:applying
|
||||
return
|
||||
endif
|
||||
if a:name !~# '^sunbather_' && index(['everforest', 'moonfly', 'PaperColor'], a:name) < 0
|
||||
return
|
||||
endif
|
||||
let s:config.background = &background
|
||||
let s:config[&background].theme = a:name
|
||||
call s:ApplyTransparency()
|
||||
|
||||
Reference in New Issue
Block a user