mirror of
https://github.com/NotAShelf/nvf.git
synced 2024-11-26 23:16:46 +00:00
Compare commits
9 commits
95ce28e3e4
...
cbe03c85cd
Author | SHA1 | Date | |
---|---|---|---|
|
cbe03c85cd | ||
1166e8aa1d | |||
|
8ff50562d7 | ||
|
68ad67369e | ||
|
cced0d239f | ||
|
5e0b47f15c | ||
|
f4d3ceb790 | ||
|
da2bc3063c | ||
|
4e55ed520d |
8 changed files with 83 additions and 4 deletions
|
@ -177,6 +177,7 @@ isMaximal: {
|
|||
obsidian.enable = false; # FIXME: neovim fails to build if obsidian is enabled
|
||||
neorg.enable = false;
|
||||
orgmode.enable = false;
|
||||
quarto-nvim.enable = isMaximal;
|
||||
mind-nvim.enable = isMaximal;
|
||||
todo-comments.enable = true;
|
||||
};
|
||||
|
|
17
flake.lock
17
flake.lock
|
@ -1597,6 +1597,22 @@
|
|||
"type": "github"
|
||||
}
|
||||
},
|
||||
"plugin-quarto-nvim": {
|
||||
"flake": false,
|
||||
"locked": {
|
||||
"lastModified": 1728470501,
|
||||
"narHash": "sha256-JeRiyEPpCrFaNhlrS+CH8j2Sv8c9BnL8XoSG9aTnVVU=",
|
||||
"owner": "quarto-dev",
|
||||
"repo": "quarto-nvim",
|
||||
"rev": "23083a0152799ca7263ac9ae53d768d4dd93d24e",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "quarto-dev",
|
||||
"repo": "quarto-nvim",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"plugin-registers": {
|
||||
"flake": false,
|
||||
"locked": {
|
||||
|
@ -2035,6 +2051,7 @@
|
|||
"plugin-pathlib-nvim": "plugin-pathlib-nvim",
|
||||
"plugin-plenary-nvim": "plugin-plenary-nvim",
|
||||
"plugin-project-nvim": "plugin-project-nvim",
|
||||
"plugin-quarto-nvim": "plugin-quarto-nvim",
|
||||
"plugin-registers": "plugin-registers",
|
||||
"plugin-rose-pine": "plugin-rose-pine",
|
||||
"plugin-rustaceanvim": "plugin-rustaceanvim",
|
||||
|
|
|
@ -170,6 +170,10 @@
|
|||
flake = false;
|
||||
};
|
||||
|
||||
plugin-quarto-nvim = {
|
||||
url = "github:quarto-dev/quarto-nvim";
|
||||
flake = false;
|
||||
};
|
||||
plugin-otter-nvim = {
|
||||
url = "github:jmbuhr/otter.nvim";
|
||||
flake = false;
|
||||
|
|
|
@ -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";
|
||||
};
|
||||
};
|
||||
}
|
|
@ -4,9 +4,8 @@
|
|||
lib,
|
||||
...
|
||||
}: let
|
||||
inherit (lib.strings) stringLength concatMapStringsSep;
|
||||
inherit (lib.strings) concatMapStringsSep;
|
||||
inherit (lib.modules) mkIf;
|
||||
|
||||
cfg = config.vim.utility.preview.markdownPreview;
|
||||
in {
|
||||
config = mkIf cfg.enable {
|
||||
|
@ -19,8 +18,8 @@ in {
|
|||
mkdp_filetypes = [(concatMapStringsSep ", " (x: "'" + x + "'") cfg.filetypes)];
|
||||
mkdp_command_for_global = cfg.alwaysAllowPreview;
|
||||
mkdp_open_to_the_world = cfg.broadcastServer;
|
||||
mkdp_open_ip = mkIf (stringLength cfg.customIP > 0) cfg.customIP;
|
||||
mkdp_port = mkIf (stringLength cfg.customPort > 0) cfg.customPort;
|
||||
mkdp_open_ip = cfg.customIP;
|
||||
mkdp_port = cfg.customPort;
|
||||
};
|
||||
};
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue