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";
|
default = "git";
|
||||||
example = [ "gitMinimal" ];
|
example = [ "gitMinimal" ];
|
||||||
};
|
};
|
||||||
|
glow.default = "glow";
|
||||||
go.default = "go";
|
go.default = "go";
|
||||||
lazygit.default = "lazygit";
|
lazygit.default = "lazygit";
|
||||||
lean.default = "lean4";
|
lean.default = "lean4";
|
||||||
|
|
|
@ -1,6 +1,5 @@
|
||||||
{
|
{
|
||||||
lib,
|
lib,
|
||||||
pkgs,
|
|
||||||
...
|
...
|
||||||
}:
|
}:
|
||||||
let
|
let
|
||||||
|
@ -13,19 +12,27 @@ lib.nixvim.plugins.mkNeovimPlugin {
|
||||||
|
|
||||||
maintainers = [ lib.maintainers.getchoo ];
|
maintainers = [ lib.maintainers.getchoo ];
|
||||||
|
|
||||||
|
imports = [
|
||||||
|
# TODO: added 2025-04-07, remove after 25.05
|
||||||
|
(lib.nixvim.mkRemovedPackageOptionModule {
|
||||||
|
plugin = "glow";
|
||||||
|
packageName = "glow";
|
||||||
|
})
|
||||||
|
];
|
||||||
|
|
||||||
settingsOptions = {
|
settingsOptions = {
|
||||||
glow_path = defaultNullOpts.mkStr (lib.nixvim.mkRaw "vim.fn.exepath('glow')") ''
|
glow_path = defaultNullOpts.mkStr (lib.nixvim.mkRaw "vim.fn.exepath('glow')") ''
|
||||||
Path to `glow` binary.
|
Path to `glow` binary.
|
||||||
|
|
||||||
If null or `""`, `glow` in your `$PATH` with be used if available.
|
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" ''
|
install_path = defaultNullOpts.mkStr "~/.local/bin" ''
|
||||||
Path for installing `glow` binary if one is not found at `glow_path` or in your `$PATH`.
|
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 [
|
border = defaultNullOpts.mkEnumFirstDefault [
|
||||||
|
@ -76,11 +83,7 @@ lib.nixvim.plugins.mkNeovimPlugin {
|
||||||
height_ratio = 0.7;
|
height_ratio = 0.7;
|
||||||
};
|
};
|
||||||
|
|
||||||
extraOptions = {
|
extraConfig = {
|
||||||
glowPackage = lib.mkPackageOption pkgs "glow" {
|
dependencies.glow.enable = lib.mkDefault true;
|
||||||
nullable = true;
|
|
||||||
};
|
|
||||||
};
|
};
|
||||||
|
|
||||||
extraConfig = cfg: { extraPackages = [ cfg.glowPackage ]; };
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,4 +1,3 @@
|
||||||
{ pkgs, ... }:
|
|
||||||
{
|
{
|
||||||
empty = {
|
empty = {
|
||||||
plugins.glow.enable = true;
|
plugins.glow.enable = true;
|
||||||
|
@ -8,8 +7,6 @@
|
||||||
plugins.glow = {
|
plugins.glow = {
|
||||||
enable = true;
|
enable = true;
|
||||||
|
|
||||||
glowPackage = pkgs.glow;
|
|
||||||
|
|
||||||
settings = {
|
settings = {
|
||||||
glow_path.__raw = "vim.fn.exepath('glow')";
|
glow_path.__raw = "vim.fn.exepath('glow')";
|
||||||
install_path = "~/.local/bin";
|
install_path = "~/.local/bin";
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue