mirror of
https://github.com/NotAShelf/nvf.git
synced 2025-12-17 01:21:02 +00:00
notes/quarto: init
This commit is contained in:
parent
5e0b47f15c
commit
cced0d239f
7 changed files with 80 additions and 0 deletions
|
|
@ -3,6 +3,7 @@
|
|||
./obsidian
|
||||
./orgmode
|
||||
./neorg
|
||||
./quarto
|
||||
./mind-nvim
|
||||
./todo-comments
|
||||
];
|
||||
|
|
|
|||
28
modules/plugins/notes/quarto/config.nix
Normal file
28
modules/plugins/notes/quarto/config.nix
Normal file
|
|
@ -0,0 +1,28 @@
|
|||
{
|
||||
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];
|
||||
})
|
||||
]);
|
||||
}
|
||||
6
modules/plugins/notes/quarto/default.nix
Normal file
6
modules/plugins/notes/quarto/default.nix
Normal file
|
|
@ -0,0 +1,6 @@
|
|||
{
|
||||
imports = [
|
||||
./quarto.nix
|
||||
./config.nix
|
||||
];
|
||||
}
|
||||
23
modules/plugins/notes/quarto/quarto.nix
Normal file
23
modules/plugins/notes/quarto/quarto.nix
Normal file
|
|
@ -0,0 +1,23 @@
|
|||
{
|
||||
config,
|
||||
lib,
|
||||
pkgs,
|
||||
...
|
||||
}: let
|
||||
inherit (lib.options) mkEnableOption;
|
||||
inherit (lib.nvim.types) mkGrammarOption mkPluginSetupOption;
|
||||
in {
|
||||
options.vim.notes.quarto-nvim = {
|
||||
enable = mkEnableOption ''
|
||||
Quarto-nvim, which provides tools for working on Quarto manuscripts in Neovim.
|
||||
'';
|
||||
|
||||
setupOpts = mkPluginSetupOption "quarto-nvim" {};
|
||||
|
||||
treesitter = {
|
||||
enable = mkEnableOption "Quarto treesitter" // {default = config.vim.languages.enableTreesitter;};
|
||||
quartoPackage = mkGrammarOption pkgs "markdown";
|
||||
quartoInlinePackage = mkGrammarOption pkgs "markdown-inline";
|
||||
};
|
||||
};
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue