mirror of
https://github.com/nix-community/nixvim.git
synced 2025-06-21 00:25:42 +02:00
modules/dependencies: add glow
This commit is contained in:
parent
68c806bd60
commit
5ad022e151
3 changed files with 13 additions and 12 deletions
|
@ -25,6 +25,7 @@ let
|
|||
default = "git";
|
||||
example = [ "gitMinimal" ];
|
||||
};
|
||||
glow.default = "glow";
|
||||
go.default = "go";
|
||||
lazygit.default = "lazygit";
|
||||
lean.default = "lean4";
|
||||
|
|
|
@ -1,6 +1,5 @@
|
|||
{
|
||||
lib,
|
||||
pkgs,
|
||||
...
|
||||
}:
|
||||
let
|
||||
|
@ -13,19 +12,27 @@ lib.nixvim.plugins.mkNeovimPlugin {
|
|||
|
||||
maintainers = [ lib.maintainers.getchoo ];
|
||||
|
||||
imports = [
|
||||
# TODO: added 2025-04-07, remove after 25.05
|
||||
(lib.nixvim.mkRemovedPackageOptionModule {
|
||||
plugin = "glow";
|
||||
packageName = "glow";
|
||||
})
|
||||
];
|
||||
|
||||
settingsOptions = {
|
||||
glow_path = defaultNullOpts.mkStr (lib.nixvim.mkRaw "vim.fn.exepath('glow')") ''
|
||||
Path to `glow` binary.
|
||||
|
||||
If null or `""`, `glow` in your `$PATH` with be used if available.
|
||||
|
||||
Using `glowPackage` is the recommended way to make `glow` available in your `$PATH`.
|
||||
Using `dependencies.glow` is the recommended way to make `glow` available in your `$PATH`.
|
||||
'';
|
||||
|
||||
install_path = defaultNullOpts.mkStr "~/.local/bin" ''
|
||||
Path for installing `glow` binary if one is not found at `glow_path` or in your `$PATH`.
|
||||
|
||||
Consider using `glowPackage` instead.
|
||||
Consider using `dependencies.glow` instead.
|
||||
'';
|
||||
|
||||
border = defaultNullOpts.mkEnumFirstDefault [
|
||||
|
@ -76,11 +83,7 @@ lib.nixvim.plugins.mkNeovimPlugin {
|
|||
height_ratio = 0.7;
|
||||
};
|
||||
|
||||
extraOptions = {
|
||||
glowPackage = lib.mkPackageOption pkgs "glow" {
|
||||
nullable = true;
|
||||
extraConfig = {
|
||||
dependencies.glow.enable = lib.mkDefault true;
|
||||
};
|
||||
};
|
||||
|
||||
extraConfig = cfg: { extraPackages = [ cfg.glowPackage ]; };
|
||||
}
|
||||
|
|
|
@ -1,4 +1,3 @@
|
|||
{ pkgs, ... }:
|
||||
{
|
||||
empty = {
|
||||
plugins.glow.enable = true;
|
||||
|
@ -8,8 +7,6 @@
|
|||
plugins.glow = {
|
||||
enable = true;
|
||||
|
||||
glowPackage = pkgs.glow;
|
||||
|
||||
settings = {
|
||||
glow_path.__raw = "vim.fn.exepath('glow')";
|
||||
install_path = "~/.local/bin";
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue