mirror of
https://github.com/NotAShelf/nvf.git
synced 2025-09-06 18:31:35 +00:00
treewide: make the entire generated config lua based (#333)
* modules: switch to gerg's neovim-wrapper * modules: use initViml instead of writing the file * treewide: make the entire generated config lua based * docs: remove mentions of configRC * plugins/treesitter: remove vim.cmd hack * treewide: move resolveDag to lib * modules/wrapper(rc): fix typo * treewide: migrate to pluginRC for correct DAG order The "new" DAG order is as follows: - (luaConfigPre) - globalsScript - basic - theme - pluginConfigs - extraPluginConfigs - mappings - (luaConfigPost) * plugins/theme: fix theme DAG place * plugins/theme: fix fixed theme DAG place * modules/wrapper(rc): add removed option module for configRC * docs: add dag-entries chapter, add release note entry * fix: formatting CI * languages/nix: add missing `local` * docs: fix page link * docs: add mention of breaking changes at the start of the release notes * plugins/neo-tree: convert to pluginRC * modules/wrapper(rc): add back entryAnywhere * modules/wrapper(rc): expose pluginRC * apply raf patch --------- Co-authored-by: NotAShelf <raf@notashelf.dev>
This commit is contained in:
parent
cbff0e4715
commit
f9789432f9
84 changed files with 389 additions and 404 deletions
|
@ -7,10 +7,10 @@
|
|||
inherit (lib.attrsets) attrNames;
|
||||
inherit (lib.types) bool lines enum;
|
||||
inherit (lib.modules) mkIf;
|
||||
inherit (lib.nvim.dag) entryBefore;
|
||||
inherit (lib.nvim.dag) entryAfter;
|
||||
|
||||
cfg = config.vim.theme;
|
||||
supported_themes = import ./supported_themes.nix {
|
||||
supportedThemes = import ./supported-themes.nix {
|
||||
inherit lib config;
|
||||
};
|
||||
in {
|
||||
|
@ -21,12 +21,12 @@ in {
|
|||
};
|
||||
|
||||
name = mkOption {
|
||||
type = enum (attrNames supported_themes);
|
||||
description = "Supported themes can be found in `supported_themes.nix`";
|
||||
type = enum (attrNames supportedThemes);
|
||||
description = "Supported themes can be found in `supportedThemes.nix`";
|
||||
};
|
||||
|
||||
style = mkOption {
|
||||
type = enum supported_themes.${cfg.name}.styles;
|
||||
type = enum supportedThemes.${cfg.name}.styles;
|
||||
description = "Specific style for theme if it supports it";
|
||||
};
|
||||
|
||||
|
@ -45,11 +45,9 @@ in {
|
|||
config = mkIf cfg.enable {
|
||||
vim = {
|
||||
startPlugins = [cfg.name];
|
||||
configRC.theme = entryBefore ["luaScript"] ''
|
||||
lua << EOF
|
||||
luaConfigRC.theme = entryAfter ["basic"] ''
|
||||
${cfg.extraConfig}
|
||||
${supported_themes.${cfg.name}.setup (with cfg; {inherit style transparent;})}
|
||||
EOF
|
||||
${supportedThemes.${cfg.name}.setup {inherit (cfg) style transparent;}}
|
||||
'';
|
||||
};
|
||||
};
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue