mirror of
https://github.com/nix-community/nixvim.git
synced 2025-06-22 00:48:58 +02:00
plugins/glow: init
This commit is contained in:
parent
1a644b8c2b
commit
0f76a8cdfc
3 changed files with 114 additions and 0 deletions
87
plugins/languages/markdown/glow.nix
Normal file
87
plugins/languages/markdown/glow.nix
Normal file
|
@ -0,0 +1,87 @@
|
|||
{
|
||||
lib,
|
||||
helpers,
|
||||
config,
|
||||
pkgs,
|
||||
...
|
||||
}:
|
||||
helpers.neovim-plugin.mkNeovimPlugin config {
|
||||
name = "glow";
|
||||
originalName = "glow.nvim";
|
||||
defaultPackage = pkgs.vimPlugins.glow-nvim;
|
||||
|
||||
maintainers = [ lib.maintainers.getchoo ];
|
||||
|
||||
settingsOptions = {
|
||||
glow_path = helpers.defaultNullOpts.mkStr (helpers.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`.
|
||||
'';
|
||||
|
||||
install_path = helpers.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.
|
||||
'';
|
||||
|
||||
border = helpers.defaultNullOpts.mkEnumFirstDefault [
|
||||
"shadow"
|
||||
"none"
|
||||
"double"
|
||||
"rounded"
|
||||
"solid"
|
||||
"single"
|
||||
] "Style of the floating window's border.";
|
||||
|
||||
style = helpers.defaultNullOpts.mkEnum [
|
||||
"dark"
|
||||
"light"
|
||||
] (helpers.mkRaw "vim.opt.background") "Glow style.";
|
||||
|
||||
pager = helpers.defaultNullOpts.mkBool false ''
|
||||
Display output in a pager style.
|
||||
'';
|
||||
|
||||
width = helpers.defaultNullOpts.mkInt 100 ''
|
||||
Width of the floating window.
|
||||
'';
|
||||
|
||||
height = helpers.defaultNullOpts.mkInt 100 ''
|
||||
Height of the floating window.
|
||||
'';
|
||||
|
||||
width_ratio = helpers.defaultNullOpts.mkNum 0.7 ''
|
||||
Maximum width of the floating window relative to the window size.
|
||||
'';
|
||||
|
||||
height_ratio = helpers.defaultNullOpts.mkNum 0.7 ''
|
||||
Maximum height of the floating window relative to the window size.
|
||||
'';
|
||||
};
|
||||
|
||||
settingsExample = {
|
||||
border = "shadow";
|
||||
style = "dark";
|
||||
pager = false;
|
||||
width = 80;
|
||||
height = 100;
|
||||
width_ratio = 0.7;
|
||||
height_ratio = 0.7;
|
||||
};
|
||||
|
||||
extraOptions = {
|
||||
glowPackage = helpers.mkPackageOption {
|
||||
description = ''
|
||||
Which package to use for `glow` in your `$PATH`.
|
||||
Set to `null` to disable its automatic installation.
|
||||
'';
|
||||
default = pkgs.glow;
|
||||
defaultText = lib.literalExpression "pkgs.glow";
|
||||
};
|
||||
};
|
||||
|
||||
extraConfig = cfg: { extraPackages = [ cfg.glowPackage ]; };
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue