Fix: not setting colorscheme correctly #5
This commit is contained in:
@@ -1,8 +1,8 @@
|
|||||||
lua << EOF
|
" lua << EOF
|
||||||
-- for k in pairs(package.loaded) do
|
" for k in pairs(package.loaded) do
|
||||||
-- if k:match(".*tokyodark.*") then package.loaded[k] = nil end
|
" if k:match(".*tokyodark.*") then package.loaded[k] = nil end
|
||||||
-- end
|
" end
|
||||||
EOF
|
" EOF
|
||||||
|
|
||||||
lua require('tokyodark')
|
lua require('tokyodark').colorscheme()
|
||||||
|
|
||||||
|
|||||||
@@ -242,8 +242,6 @@ local function load_sync()
|
|||||||
load_highlights(hl.predef)
|
load_highlights(hl.predef)
|
||||||
load_highlights(hl.common)
|
load_highlights(hl.common)
|
||||||
load_highlights(hl.syntax)
|
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)
|
set_hl_ns(ns)
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|||||||
@@ -1,7 +1,9 @@
|
|||||||
local highlights = require('tokyodark.highlights')
|
local highlights = require('tokyodark.highlights')
|
||||||
local terminal = require('tokyodark.terminal')
|
local terminal = require('tokyodark.terminal')
|
||||||
|
|
||||||
local function colorscheme()
|
local M = {}
|
||||||
|
|
||||||
|
function M.colorscheme()
|
||||||
vim.cmd("hi clear")
|
vim.cmd("hi clear")
|
||||||
if vim.fn.exists("syntax_on") then vim.cmd("syntax reset") end
|
if vim.fn.exists("syntax_on") then vim.cmd("syntax reset") end
|
||||||
vim.o.background = "dark"
|
vim.o.background = "dark"
|
||||||
@@ -13,4 +15,4 @@ local function colorscheme()
|
|||||||
vim.cmd [[au ColorSchemePre * lua require("tokyodark.highlights").clear_namespace()]]
|
vim.cmd [[au ColorSchemePre * lua require("tokyodark.highlights").clear_namespace()]]
|
||||||
end
|
end
|
||||||
|
|
||||||
colorscheme()
|
return M
|
||||||
|
|||||||
Reference in New Issue
Block a user