Set initial colorscheme on debian hosts

This commit is contained in:
sonny 2024-10-11 22:02:29 +02:00
parent 4dba4f2bb0
commit 8bd8ce698c

View file

@ -1,9 +1,6 @@
-- {{ ansible_managed }}
-- set the colorscheme whenever the background setting changes
vim.api.nvim_create_autocmd({'OptionSet'}, {
pattern = {'background'},
callback = function()
local background_callback = function()
if vim.o.background == 'dark' then
vim.cmd('colorscheme github_dark_dimmed')
else
@ -12,8 +9,18 @@ vim.api.nvim_create_autocmd({'OptionSet'}, {
-- force a full redraw:
vim.cmd('mode')
end
})
end
-- set the colorscheme whenever the background setting changes
vim.api.nvim_create_autocmd(
{ 'OptionSet' },
{ pattern = { 'background' }, callback = background_callback }
)
{% if ansible_facts['os_family'] == 'Debian' %}
background_callback()
{% endif %}
{% if ansible_facts['os_family'] == 'Archlinux' %}
--[[