Fix background
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user