nvf/modules/plugins/notes/quarto/config.nix

29 lines
595 B
Nix
Raw Normal View History

2024-10-23 14:08:35 +00:00
{
config,
lib,
...
}: let
inherit (lib.modules) mkIf mkMerge;
inherit (lib.nvim.dag) entryAnywhere;
inherit (lib.nvim.lua) toLuaObject;
cfg = config.vim.notes.quarto-nvim;
in {
config = mkIf cfg.enable (mkMerge [
{
vim = {
startPlugins = [ "otter-nvim" "quarto-nvim" ];
pluginRC.quarto-nvim = entryAnywhere ''
require('quarto').setup(${toLuaObject cfg.setupOpts})
'';
};
}
(mkIf cfg.treesitter.enable {
vim.treesitter.enable = true;
vim.treesitter.grammars = [cfg.treesitter.quartoPackage];
})
]);
}