fix(macos): sync Neovim Catppuccin with system appearance
Write ~/.local/share/nvim_color_scheme from the same macOS Appearance probe as Alacritty; trim the nvim theme line read for robustness. Made-with: Cursor
This commit is contained in:
parent
bded1b359d
commit
afbc87be2b
2 changed files with 9 additions and 1 deletions
|
|
@ -16,8 +16,11 @@
|
|||
local config_file = os.getenv("HOME")..'/.local/share/nvim_color_scheme'
|
||||
local f = io.open(config_file, "r")
|
||||
if f ~= nil then
|
||||
local system_theme = f:read()
|
||||
local system_theme = f:read("*l")
|
||||
io.close(f)
|
||||
if system_theme then
|
||||
system_theme = system_theme:gsub("^%s+", ""):gsub("%s+$", "")
|
||||
end
|
||||
if system_theme == 'dark' then
|
||||
vim.cmd("set bg=dark")
|
||||
elseif system_theme == 'light' then
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue