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 = {
|
2024-10-23 14:25:08 +00:00
|
|
|
startPlugins = ["otter-nvim" "quarto-nvim"];
|
2024-10-23 14:08:35 +00:00
|
|
|
|
|
|
|
pluginRC.quarto-nvim = entryAnywhere ''
|
|
|
|
require('quarto').setup(${toLuaObject cfg.setupOpts})
|
|
|
|
'';
|
|
|
|
};
|
|
|
|
}
|
|
|
|
|
|
|
|
(mkIf cfg.treesitter.enable {
|
|
|
|
vim.treesitter.enable = true;
|
|
|
|
vim.treesitter.grammars = [cfg.treesitter.quartoPackage];
|
|
|
|
})
|
|
|
|
]);
|
|
|
|
}
|