Fix: not setting colorscheme correctly #5
This commit is contained in:
@@ -234,16 +234,14 @@ hl.langs.scala = {
|
||||
}
|
||||
|
||||
function M.clear_namespace()
|
||||
vim.api.nvim_buf_clear_namespace(0, ns, 0, -1)
|
||||
set_hl_ns(0)
|
||||
vim.api.nvim_buf_clear_namespace(0, ns, 0, -1)
|
||||
set_hl_ns(0)
|
||||
end
|
||||
|
||||
local function load_sync()
|
||||
load_highlights(hl.predef)
|
||||
load_highlights(hl.common)
|
||||
load_highlights(hl.syntax)
|
||||
-- for _, group in pairs(hl.langs) do load_highlights(ns, group) end
|
||||
-- for _, group in pairs(hl.plugins) do load_highlights(ns, group) end
|
||||
set_hl_ns(ns)
|
||||
end
|
||||
|
||||
|
||||
@@ -1,7 +1,9 @@
|
||||
local highlights = require('tokyodark.highlights')
|
||||
local terminal = require('tokyodark.terminal')
|
||||
|
||||
local function colorscheme()
|
||||
local M = {}
|
||||
|
||||
function M.colorscheme()
|
||||
vim.cmd("hi clear")
|
||||
if vim.fn.exists("syntax_on") then vim.cmd("syntax reset") end
|
||||
vim.o.background = "dark"
|
||||
@@ -10,7 +12,7 @@ local function colorscheme()
|
||||
highlights.setup()
|
||||
terminal.setup()
|
||||
|
||||
vim.cmd [[au ColorSchemePre * lua require("tokyodark.highlights").clear_namespace()]]
|
||||
vim.cmd [[au ColorSchemePre * lua require("tokyodark.highlights").clear_namespace()]]
|
||||
end
|
||||
|
||||
colorscheme()
|
||||
return M
|
||||
|
||||
Reference in New Issue
Block a user