Fix background

This commit is contained in:
2021-04-21 20:27:59 -03:00
parent 63344848c5
commit a0788e4347
5 changed files with 58 additions and 46 deletions

View File

@@ -1,10 +1,24 @@
local M = {}
local hl = require('tokyo.theme')
function M.setup() require('tokyo.theme').set_hl() end
local highlight = vim.api.nvim_set_hl
local set_hl_ns = vim.api.nvim__set_hl_ns or vim.api.nvim_set_hl_ns
local create_namespace = vim.api.nvim_create_namespace
local function colorscheme()
vim.cmd("hi clear")
if vim.fn.exists("syntax_on") then vim.cmd("syntax reset") end
vim.o.background = "dark"
vim.o.termguicolors = true
local ns = create_namespace("tokyo")
for _, group in pairs(hl) do
for group_name, group_settings in pairs(group) do
highlight(ns, group_name, group_settings)
end
end
set_hl_ns(ns)
end
-- vim.cmd [[augroup Tokyo]]
-- vim.cmd [[ autocmd!]]
-- vim.cmd [[ autocmd ColorScheme * lua require("tokyo.theme").set_hl()]]
function M.setup() colorscheme() end
return M