Use core.reload_module instead of style.load
This commit is contained in:
parent
1fc0409163
commit
3a38ded396
|
@ -175,12 +175,13 @@ local function write_user_init_file(init_filename)
|
||||||
-- this module will be loaded after everything else when the application starts
|
-- this module will be loaded after everything else when the application starts
|
||||||
-- it will be automatically reloaded when saved
|
-- it will be automatically reloaded when saved
|
||||||
|
|
||||||
|
local core = require "core"
|
||||||
local keymap = require "core.keymap"
|
local keymap = require "core.keymap"
|
||||||
local config = require "core.config"
|
local config = require "core.config"
|
||||||
local style = require "core.style"
|
local style = require "core.style"
|
||||||
|
|
||||||
-- light theme:
|
-- light theme:
|
||||||
-- style.load("colors.summer")
|
-- core.reload_module("colors.summer")
|
||||||
|
|
||||||
-- key binding:
|
-- key binding:
|
||||||
-- keymap.add { ["ctrl+escape"] = "core:quit" }
|
-- keymap.add { ["ctrl+escape"] = "core:quit" }
|
||||||
|
|
|
@ -53,10 +53,4 @@ style.syntax["string"] = { common.color "#f7c95c" }
|
||||||
style.syntax["operator"] = { common.color "#93DDFA" }
|
style.syntax["operator"] = { common.color "#93DDFA" }
|
||||||
style.syntax["function"] = { common.color "#93DDFA" }
|
style.syntax["function"] = { common.color "#93DDFA" }
|
||||||
|
|
||||||
|
|
||||||
style.load = function(module_name)
|
|
||||||
package.loaded[module_name] = nil
|
|
||||||
require(module_name)
|
|
||||||
end
|
|
||||||
|
|
||||||
return style
|
return style
|
||||||
|
|
|
@ -2,12 +2,13 @@
|
||||||
-- this module will be loaded after everything else when the application starts
|
-- this module will be loaded after everything else when the application starts
|
||||||
-- it will be automatically reloaded when saved
|
-- it will be automatically reloaded when saved
|
||||||
|
|
||||||
|
local core = require "core"
|
||||||
local keymap = require "core.keymap"
|
local keymap = require "core.keymap"
|
||||||
local config = require "core.config"
|
local config = require "core.config"
|
||||||
local style = require "core.style"
|
local style = require "core.style"
|
||||||
|
|
||||||
-- light theme:
|
-- light theme:
|
||||||
-- style.load("colors.summer")
|
-- core.reload_module("colors.summer")
|
||||||
|
|
||||||
-- key binding:
|
-- key binding:
|
||||||
-- keymap.add { ["ctrl+escape"] = "core:quit" }
|
-- keymap.add { ["ctrl+escape"] = "core:quit" }
|
||||||
|
|
Loading…
Reference in New Issue