mirror of
https://github.com/nix-community/nixvim.git
synced 2025-08-01 16:45:07 +02:00
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:
parent
45081d5f21
commit
203d31810f
1 changed files with 15 additions and 6 deletions
|
@ -285,12 +285,21 @@ in
|
|||
'';
|
||||
};
|
||||
|
||||
extraConfigLuaPre = lib.mkIf 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
|
||||
'';
|
||||
extraConfigLuaPre = lib.mkOrder 100 (
|
||||
# Add a global table at start of init
|
||||
''
|
||||
-- Nixvim's internal module table
|
||||
-- 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 ];
|
||||
};
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue