fix/vimtex options are globals

This commit is contained in:
mugaizzo 2025-11-14 00:41:35 -07:00
commit 872f024d5b
2 changed files with 8 additions and 8 deletions

View file

@ -4,18 +4,18 @@
... ...
}: let }: let
inherit (lib.modules) mkIf; inherit (lib.modules) mkIf;
inherit (lib.nvim.dag) entryAnywhere; # inherit (lib.nvim.dag) entryAnywhere;
inherit (lib.nvim.lua) toLuaObject; # inherit (lib.nvim.lua) toLuaObject;
cfg = config.vim.latex.vimtex; cfg = config.vim.latex.vimtex;
in { in {
config = mkIf cfg.enable { config = mkIf cfg.enable {
vim.startPlugins = ["vimtex"]; vim.startPlugins = ["vimtex"];
vim.pluginRC.vimtex = entryAnywhere '' # vim.pluginRC.vimtex = entryAnywhere ''
-- Description of each option can be found in https://github.com/lervag/vimtex # -- Description of each option can be found in https://github.com/lervag/vimtex
-- Current nvf options are minimal, contribute your needed options # -- Current nvf options are minimal, contribute your needed options
require("vimtex").setup(${toLuaObject cfg.setupOpts}) # -- require("vimtex").setup(${toLuaObject cfg.setupOpts})
''; # '';
}; };
} }

View file

@ -3,7 +3,7 @@
inherit (lib.types) bool str listOf; inherit (lib.types) bool str listOf;
inherit (lib.nvim.types) mkPluginSetupOption; inherit (lib.nvim.types) mkPluginSetupOption;
in { in {
options.vim.latex = { options.vim.latex.vimtex = {
enable = mkEnableOption "VimTeX is a modern Vim and Neovim filetype and syntax plugin for LaTeX files."; enable = mkEnableOption "VimTeX is a modern Vim and Neovim filetype and syntax plugin for LaTeX files.";
setupOpts = mkPluginSetupOption "vimtex" { setupOpts = mkPluginSetupOption "vimtex" {