refactor(nvim): Use new load function
This commit is contained in:
parent
471587f7ab
commit
edef1e61a6
@ -1,4 +1,4 @@
|
||||
local map = require("utils.funcs").map
|
||||
local map = load("utils.funcs").map
|
||||
|
||||
map("n", "<leader>fge", ":Neorg gtd edit<CR>")
|
||||
map("n", "<ledaer>fgv", ":Neorg gtd views<CR>")
|
||||
|
@ -1,4 +1,4 @@
|
||||
local map = require("utils.funcs").map
|
||||
local map = load("utils.funcs").map
|
||||
|
||||
map("n", "<leader>fr", ":RustRunnables<CR>")
|
||||
map("n", "<leader>fd", ":RustDebuggables<CR>")
|
||||
|
@ -1,2 +1,8 @@
|
||||
pcall(require, "impatient")
|
||||
require("main")
|
||||
|
||||
load = function (mod)
|
||||
package.loaded[mod] = nil
|
||||
return require(mod)
|
||||
end
|
||||
|
||||
load("main")
|
||||
|
@ -1,5 +1,5 @@
|
||||
require("core.disabled").setup()
|
||||
require("core.options").setup()
|
||||
require("core.mappings").setup()
|
||||
require("core.globals").setup()
|
||||
require("core.lsp").setup()
|
||||
load("core.disabled").setup()
|
||||
load("core.options").setup()
|
||||
load("core.mappings").setup()
|
||||
load("core.globals").setup()
|
||||
load("core.lsp").setup()
|
||||
|
@ -4,14 +4,15 @@
|
||||
-- INFO: SHOULD have a init.lua file associated with them.
|
||||
-- INFO: init.lua is responsible for loading all configuration
|
||||
-- INFO: related to that directory.
|
||||
require("core.init")
|
||||
require("plugins.init")
|
||||
require("utils.init")
|
||||
load("core.init")
|
||||
load("core.init")
|
||||
load("plugins.init")
|
||||
load("utils.init")
|
||||
|
||||
-- INFO: Post load, for things that need to setup keybindings etc after the fact
|
||||
--
|
||||
-- NOTE: All postload modules should be independent of each other, they shouldn't
|
||||
-- NOTE: rely on each other's load order. That type of logic should be shifted
|
||||
-- NOTE: into non-postload regions then handled in postload modules.
|
||||
require("plugins.postload")
|
||||
require("core.postload")
|
||||
load("plugins.postload")
|
||||
load("core.postload")
|
||||
|
@ -1,5 +1,5 @@
|
||||
require("plugins.plugins")
|
||||
local found, _ = pcall(require, "packer_compiled")
|
||||
load("plugins.plugins")
|
||||
local found, _ = pcall(load, "packer_compiled")
|
||||
if not found then
|
||||
vim.notify("Unable to locate packer_compiled!")
|
||||
end
|
||||
|
@ -1,5 +1,5 @@
|
||||
local utils = require('utils.funcs')
|
||||
local async = require("plenary.async")
|
||||
local utils = load('utils.funcs')
|
||||
local async = load("plenary.async")
|
||||
local map = utils.map
|
||||
|
||||
-- Telescope mappings
|
||||
|
@ -16,7 +16,7 @@ if fn.empty(fn.glob(install_path)) > 0 then
|
||||
vim.o.runtimepath = vim.fn.stdpath('data') .. '/site/pack/*/start/*,' .. vim.o.runtimepath
|
||||
end
|
||||
|
||||
local packer = require('packer')
|
||||
local packer = load('packer')
|
||||
|
||||
packer.init({
|
||||
max_jobs = 20,
|
||||
|
@ -1,3 +1,3 @@
|
||||
-- Anything that needs to be loaded LAST
|
||||
-- needs to required here
|
||||
require("plugins.mappings")
|
||||
load("plugins.mappings")
|
||||
|
@ -1 +1 @@
|
||||
require("utils.cmd")
|
||||
load("utils.cmd")
|
||||
|
Loading…
Reference in New Issue
Block a user