plugins/origami: init

This commit is contained in:
Gaetan Lepage 2025-05-02 00:47:09 +02:00
parent cd30817b21
commit 98644a34ab
2 changed files with 66 additions and 0 deletions

View 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;
};
}

View 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;
};
};
};
};
}