plugins/texpresso: init

This commit is contained in:
Gaetan Lepage 2024-04-26 10:47:59 +02:00 committed by Gaétan Lepage
parent 77efb038df
commit e95f8e9ce4
3 changed files with 40 additions and 0 deletions

View file

@ -70,6 +70,7 @@
./languages/rustaceanvim.nix
./languages/sniprun.nix
./languages/tagbar.nix
./languages/texpresso.nix
./languages/treesitter/hmts.nix
./languages/treesitter/rainbow-delimiters.nix
./languages/treesitter/treesitter-context.nix

View file

@ -0,0 +1,33 @@
{
lib,
helpers,
config,
pkgs,
...
}:
with lib;
# This plugin has no configuration, so we use `mkVimPlugin` without the `globalPrefix` argument to
# avoid the creation of the `settings` option.
helpers.vim-plugin.mkVimPlugin config {
name = "texpresso";
originalName = "texpresso.vim";
defaultPackage = pkgs.vimPlugins.texpresso-vim;
maintainers = [maintainers.nickhu];
extraOptions = {
texpressoPackage = mkOption {
type = with types; nullOr package;
default = pkgs.texpresso;
example = null;
description = ''
The `texpresso` package to use.
Set to `null` to not install any package.
'';
};
};
extraConfig = cfg: {
extraPackages = [cfg.texpressoPackage];
};
}

View file

@ -0,0 +1,6 @@
{pkgs, ...}: {
empty = {
# texpresso is broken on darwin
plugins.texpresso.enable = !pkgs.stdenv.isDarwin;
};
}