top-level/output: add global table top of init.lua

Creating a global table at top of init.lua to allow sharing between
different sections of the init.lua without worrying about ordering.
This commit is contained in:
Austin Horstman 2024-08-21 10:52:35 -05:00
parent 45081d5f21
commit 203d31810f
No known key found for this signature in database

View file

@ -285,12 +285,21 @@ in
''; '';
}; };
extraConfigLuaPre = lib.mkIf config.wrapRc '' extraConfigLuaPre = lib.mkOrder 100 (
-- Ignore the user lua configuration # Add a global table at start of init
vim.opt.runtimepath:remove(vim.fn.stdpath('config')) -- ~/.config/nvim ''
vim.opt.runtimepath:remove(vim.fn.stdpath('config') .. "/after") -- ~/.config/nvim/after -- Nixvim's internal module table
vim.opt.runtimepath:remove(vim.fn.stdpath('data') .. "/site") -- ~/.local/share/nvim/site -- Can be used to share code throughout init.lua
''; local _M = {}
''
+ lib.optionalString config.wrapRc ''
-- Ignore the user lua configuration
vim.opt.runtimepath:remove(vim.fn.stdpath('config')) -- ~/.config/nvim
vim.opt.runtimepath:remove(vim.fn.stdpath('config') .. "/after") -- ~/.config/nvim/after
vim.opt.runtimepath:remove(vim.fn.stdpath('data') .. "/site") -- ~/.local/share/nvim/site
''
);
extraPlugins = lib.mkIf config.wrapRc [ config.filesPlugin ]; extraPlugins = lib.mkIf config.wrapRc [ config.filesPlugin ];
}; };