mirror of
https://github.com/nix-community/nixvim.git
synced 2025-06-20 16:15:43 +02:00
plugins/origami: init
This commit is contained in:
parent
cd30817b21
commit
98644a34ab
2 changed files with 66 additions and 0 deletions
18
plugins/by-name/origami/default.nix
Normal file
18
plugins/by-name/origami/default.nix
Normal file
|
@ -0,0 +1,18 @@
|
||||||
|
{ lib, ... }:
|
||||||
|
lib.nixvim.plugins.mkNeovimPlugin {
|
||||||
|
name = "origami";
|
||||||
|
packPathName = "nvim-origami";
|
||||||
|
package = "nvim-origami";
|
||||||
|
|
||||||
|
maintainers = [ lib.maintainers.GaetanLepage ];
|
||||||
|
|
||||||
|
# Ensures `nvim-ufo` (if enabled) is loaded before `origami`
|
||||||
|
# Default priority is 1000, mkBefore is 500 and mkAfter is 1500
|
||||||
|
configLocation = lib.mkOrder 1100 "extraConfigLua";
|
||||||
|
|
||||||
|
settingsExample = {
|
||||||
|
keepFoldsAcrossSessions = true;
|
||||||
|
pauseFoldsOnSearch = true;
|
||||||
|
setupFoldKeymaps = false;
|
||||||
|
};
|
||||||
|
}
|
48
tests/test-sources/plugins/by-name/origami/default.nix
Normal file
48
tests/test-sources/plugins/by-name/origami/default.nix
Normal file
|
@ -0,0 +1,48 @@
|
||||||
|
{
|
||||||
|
empty = {
|
||||||
|
plugins.origami.enable = true;
|
||||||
|
};
|
||||||
|
|
||||||
|
defaults = {
|
||||||
|
plugins.origami = {
|
||||||
|
enable = true;
|
||||||
|
|
||||||
|
settings = {
|
||||||
|
keepFoldsAcrossSessions.__raw = "package.loaded['ufo'] ~= nil";
|
||||||
|
pauseFoldsOnSearch = true;
|
||||||
|
foldtextWithLineCount = {
|
||||||
|
enabled.__raw = "package.loaded['ufo'] == nil";
|
||||||
|
template = " %s lines";
|
||||||
|
hlgroupForCount = "Comment";
|
||||||
|
};
|
||||||
|
foldKeymaps = {
|
||||||
|
setup = true;
|
||||||
|
hOnlyOpensOnFirstColumn = false;
|
||||||
|
};
|
||||||
|
autoFold = {
|
||||||
|
enabled = false;
|
||||||
|
kinds = [
|
||||||
|
"comment"
|
||||||
|
"imports"
|
||||||
|
];
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
example = {
|
||||||
|
plugins = {
|
||||||
|
nvim-ufo.enable = true;
|
||||||
|
|
||||||
|
origami = {
|
||||||
|
enable = true;
|
||||||
|
|
||||||
|
settings = {
|
||||||
|
keepFoldsAcrossSessions = true;
|
||||||
|
pauseFoldsOnSearch = true;
|
||||||
|
setupFoldKeymaps = false;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
Loading…
Add table
Add a link
Reference in a new issue