mirror of
https://github.com/NotAShelf/nvf.git
synced 2025-12-17 17:31:18 +00:00
wrapper/rc: add vim.options
Translates an attribute set of values into `vim.o` values in a key-value format.
This commit is contained in:
parent
c957b23aaa
commit
5d8fc297b6
2 changed files with 31 additions and 4 deletions
|
|
@ -85,6 +85,10 @@ in {
|
|||
mapAttrsToList (name: value: "vim.g.${name} = ${toLuaObject value}")
|
||||
(filterNonNull cfg.globals);
|
||||
|
||||
optionsScript =
|
||||
mapAttrsToList (name: value: "vim.o.${name} = ${toLuaObject value}")
|
||||
(filterNonNull cfg.options);
|
||||
|
||||
extraPluginConfigs = resolveDag {
|
||||
name = "extra plugin configs";
|
||||
dag = mapAttrs (_: value: entryAfter value.after value.setup) cfg.extraPlugins;
|
||||
|
|
@ -132,9 +136,12 @@ in {
|
|||
in {
|
||||
vim = {
|
||||
luaConfigRC = {
|
||||
# `vim.g` and `vim.o`
|
||||
globalsScript = entryAnywhere (concatLines globalsScript);
|
||||
# basic
|
||||
pluginConfigs = entryAfter ["basic"] pluginConfigs;
|
||||
optionsScript = entryAfter ["basic"] (concatLines optionsScript);
|
||||
|
||||
# Basic
|
||||
pluginConfigs = entryAfter ["optionsScript"] pluginConfigs;
|
||||
extraPluginConfigs = entryAfter ["pluginConfigs"] extraPluginConfigs;
|
||||
mappings = entryAfter ["extraPluginConfigs"] mappings;
|
||||
};
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue