[nvim] Make colors a proper module and call .init() from init.lua
This commit is contained in:
parent
aeaeca56a3
commit
92418f9ec9
2 changed files with 15 additions and 6 deletions
|
@ -56,10 +56,12 @@ vim.cmd [[
|
|||
]]
|
||||
|
||||
require "configuration"
|
||||
require "colors"
|
||||
require "keys"
|
||||
require "lsp"
|
||||
|
||||
local colors = require "colors"
|
||||
colors.init()
|
||||
|
||||
function ErynEnsureMetadataDirectoriesExist()
|
||||
local paths = {
|
||||
vim.opt.backupdir:get(),
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
-- Eryn Wells <eryn@erynwells.me>
|
||||
|
||||
function reloadColorscheme(colorschemeName)
|
||||
local function reloadColorscheme(colorschemeName)
|
||||
if colorschemeName == nil then
|
||||
vim.cmd [[
|
||||
highlight clear
|
||||
|
@ -39,8 +39,15 @@ function reloadColorscheme(colorschemeName)
|
|||
end
|
||||
end
|
||||
|
||||
if vim.env.TERM_PROGRAM == "Apple_Terminal" then
|
||||
local function init()
|
||||
if vim.env.TERM_PROGRAM == "Apple_Terminal" then
|
||||
reloadColorscheme(nil)
|
||||
else
|
||||
else
|
||||
reloadColorscheme("dracula")
|
||||
end
|
||||
end
|
||||
|
||||
return {
|
||||
init = init,
|
||||
reloadColorscheme = reloadColorscheme
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue