mirror of
https://github.com/nix-community/nixvim.git
synced 2025-08-04 18:15:08 +02:00
plugins/quarto: fix by enforcing enabling otter when settings.codeRunner is enabled
See https://github.com/quarto-dev/quarto-nvim/issues/187
This commit is contained in:
parent
e76ebb7819
commit
550c2573bb
3 changed files with 54 additions and 26 deletions
|
@ -12,6 +12,10 @@ lib.nixvim.plugins.mkNeovimPlugin {
|
||||||
|
|
||||||
maintainers = [ lib.maintainers.HeitorAugustoLN ];
|
maintainers = [ lib.maintainers.HeitorAugustoLN ];
|
||||||
|
|
||||||
|
# `require("otter").setup()` must run **BEFORE** quarto
|
||||||
|
# https://github.com/quarto-dev/quarto-nvim/issues/187
|
||||||
|
configLocation = lib.mkOrder 900 "extraConfigLua";
|
||||||
|
|
||||||
imports = [
|
imports = [
|
||||||
# TODO: introduced 2024-06-29; remove after 24.11
|
# TODO: introduced 2024-06-29; remove after 24.11
|
||||||
(lib.mkRemovedOptionModule
|
(lib.mkRemovedOptionModule
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
{ lib, pkgs, ... }:
|
{ lib, config, ... }:
|
||||||
let
|
let
|
||||||
inherit (lib.nixvim) defaultNullOpts;
|
inherit (lib.nixvim) defaultNullOpts;
|
||||||
inherit (lib) types;
|
inherit (lib) types;
|
||||||
|
@ -99,4 +99,13 @@ lib.nixvim.plugins.mkNeovimPlugin {
|
||||||
default_method = "vim-slime";
|
default_method = "vim-slime";
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
|
extraConfig = cfg: {
|
||||||
|
assertions = lib.nixvim.mkAssertions "plugins.quarto" {
|
||||||
|
assertion = (cfg.settings.codeRunner.enable or false) -> config.plugins.otter.enable;
|
||||||
|
message = ''
|
||||||
|
Quarto requires `plugins.otter` to be enabled when `settings.codeRunner.enable` is true.
|
||||||
|
'';
|
||||||
|
};
|
||||||
|
};
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,6 +1,13 @@
|
||||||
{
|
{
|
||||||
empty = {
|
empty = {
|
||||||
plugins.quarto.enable = true;
|
plugins = {
|
||||||
|
quarto.enable = true;
|
||||||
|
otter.enable = true;
|
||||||
|
treesitter = {
|
||||||
|
enable = true;
|
||||||
|
settings.highlight.enable = true;
|
||||||
|
};
|
||||||
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
defaults = {
|
defaults = {
|
||||||
|
@ -39,7 +46,14 @@
|
||||||
};
|
};
|
||||||
|
|
||||||
example = {
|
example = {
|
||||||
plugins.quarto = {
|
plugins = {
|
||||||
|
otter.enable = true;
|
||||||
|
treesitter = {
|
||||||
|
enable = true;
|
||||||
|
settings.highlight.enable = true;
|
||||||
|
};
|
||||||
|
|
||||||
|
quarto = {
|
||||||
enable = true;
|
enable = true;
|
||||||
|
|
||||||
settings = {
|
settings = {
|
||||||
|
@ -72,4 +86,5 @@
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
};
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue