2025-01-23 19:35:00 -07:00
|
|
|
{
|
|
|
|
|
config,
|
2025-01-24 10:28:17 -07:00
|
|
|
pkgs,
|
2025-01-23 19:35:00 -07:00
|
|
|
lib,
|
|
|
|
|
...
|
2025-01-26 18:42:54 -07:00
|
|
|
}: let
|
2025-01-23 19:44:59 -07:00
|
|
|
inherit (lib.options) mkOption;
|
|
|
|
|
inherit (lib.types) enum listOf package str;
|
2025-02-11 21:14:24 -07:00
|
|
|
inherit (builtins) attrNames;
|
2025-01-23 19:35:00 -07:00
|
|
|
|
|
|
|
|
cfg = config.vim.languages.tex;
|
2025-01-26 18:42:54 -07:00
|
|
|
in {
|
2025-01-23 19:35:00 -07:00
|
|
|
imports = [
|
2025-01-24 10:49:26 -07:00
|
|
|
./latexmk.nix
|
2025-01-23 19:35:00 -07:00
|
|
|
./tectonic.nix
|
|
|
|
|
];
|
|
|
|
|
|
|
|
|
|
options.vim.languages.tex.build.builder = {
|
|
|
|
|
name = mkOption {
|
|
|
|
|
type = enum (attrNames cfg.build.builders);
|
2025-01-24 10:28:17 -07:00
|
|
|
default = "latexmk";
|
|
|
|
|
description = ''
|
|
|
|
|
The tex builder to use.
|
|
|
|
|
|
|
|
|
|
This is just the default custom option. By setting any of the
|
|
|
|
|
builders to true, this will be overwritten by that builder's
|
|
|
|
|
parameters.
|
2025-01-26 18:42:54 -07:00
|
|
|
Setting this parameter to the name of a declared builder will
|
|
|
|
|
not automatically enable that builder.
|
2025-01-24 10:28:17 -07:00
|
|
|
'';
|
2025-01-23 19:35:00 -07:00
|
|
|
};
|
|
|
|
|
args = mkOption {
|
|
|
|
|
type = listOf str;
|
2025-01-24 10:28:17 -07:00
|
|
|
default = [
|
|
|
|
|
"-pdf"
|
|
|
|
|
"%f"
|
|
|
|
|
];
|
|
|
|
|
description = ''
|
|
|
|
|
The list of args to pass to the builder.
|
|
|
|
|
|
|
|
|
|
This is just the default custom option. By setting any of the
|
|
|
|
|
builders to true, this will be overwritten by that builder's
|
|
|
|
|
parameters.
|
|
|
|
|
'';
|
2025-01-23 19:35:00 -07:00
|
|
|
};
|
|
|
|
|
package = mkOption {
|
|
|
|
|
type = package;
|
2025-01-26 18:42:54 -07:00
|
|
|
default = pkgs.texlive.withPackages (ps: [ps.latexmk]);
|
2025-01-24 10:28:17 -07:00
|
|
|
description = ''
|
|
|
|
|
The tex builder package to use.
|
|
|
|
|
|
|
|
|
|
This is just the default custom option. By setting any of the
|
|
|
|
|
builders to true, this will be overwritten by that builder's
|
|
|
|
|
parameters.
|
|
|
|
|
'';
|
2025-01-23 19:35:00 -07:00
|
|
|
};
|
|
|
|
|
executable = mkOption {
|
|
|
|
|
type = str;
|
2025-01-24 10:28:17 -07:00
|
|
|
default = "latexmk";
|
|
|
|
|
description = ''
|
|
|
|
|
The tex builder executable to use.
|
|
|
|
|
|
|
|
|
|
This is just the default custom option. By setting any of the
|
|
|
|
|
builders to true, this will be overwritten by that builder's
|
|
|
|
|
parameters.
|
|
|
|
|
'';
|
2025-01-23 19:35:00 -07:00
|
|
|
};
|
|
|
|
|
};
|
|
|
|
|
}
|