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", "<leader>fge", ":Neorg gtd edit<CR>")
|
||||||
map("n", "<ledaer>fgv", ":Neorg gtd views<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>fr", ":RustRunnables<CR>")
|
||||||
map("n", "<leader>fd", ":RustDebuggables<CR>")
|
map("n", "<leader>fd", ":RustDebuggables<CR>")
|
||||||
|
@ -1,2 +1,8 @@
|
|||||||
pcall(require, "impatient")
|
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()
|
load("core.disabled").setup()
|
||||||
require("core.options").setup()
|
load("core.options").setup()
|
||||||
require("core.mappings").setup()
|
load("core.mappings").setup()
|
||||||
require("core.globals").setup()
|
load("core.globals").setup()
|
||||||
require("core.lsp").setup()
|
load("core.lsp").setup()
|
||||||
|
@ -4,14 +4,15 @@
|
|||||||
-- INFO: SHOULD have a init.lua file associated with them.
|
-- INFO: SHOULD have a init.lua file associated with them.
|
||||||
-- INFO: init.lua is responsible for loading all configuration
|
-- INFO: init.lua is responsible for loading all configuration
|
||||||
-- INFO: related to that directory.
|
-- INFO: related to that directory.
|
||||||
require("core.init")
|
load("core.init")
|
||||||
require("plugins.init")
|
load("core.init")
|
||||||
require("utils.init")
|
load("plugins.init")
|
||||||
|
load("utils.init")
|
||||||
|
|
||||||
-- INFO: Post load, for things that need to setup keybindings etc after the fact
|
-- 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: 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: rely on each other's load order. That type of logic should be shifted
|
||||||
-- NOTE: into non-postload regions then handled in postload modules.
|
-- NOTE: into non-postload regions then handled in postload modules.
|
||||||
require("plugins.postload")
|
load("plugins.postload")
|
||||||
require("core.postload")
|
load("core.postload")
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
require("plugins.plugins")
|
load("plugins.plugins")
|
||||||
local found, _ = pcall(require, "packer_compiled")
|
local found, _ = pcall(load, "packer_compiled")
|
||||||
if not found then
|
if not found then
|
||||||
vim.notify("Unable to locate packer_compiled!")
|
vim.notify("Unable to locate packer_compiled!")
|
||||||
end
|
end
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
local utils = require('utils.funcs')
|
local utils = load('utils.funcs')
|
||||||
local async = require("plenary.async")
|
local async = load("plenary.async")
|
||||||
local map = utils.map
|
local map = utils.map
|
||||||
|
|
||||||
-- Telescope mappings
|
-- 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
|
vim.o.runtimepath = vim.fn.stdpath('data') .. '/site/pack/*/start/*,' .. vim.o.runtimepath
|
||||||
end
|
end
|
||||||
|
|
||||||
local packer = require('packer')
|
local packer = load('packer')
|
||||||
|
|
||||||
packer.init({
|
packer.init({
|
||||||
max_jobs = 20,
|
max_jobs = 20,
|
||||||
|
@ -1,3 +1,3 @@
|
|||||||
-- Anything that needs to be loaded LAST
|
-- Anything that needs to be loaded LAST
|
||||||
-- needs to required here
|
-- 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