plugins/origami: update module to v2.0

This commit is contained in:
Gaetan Lepage 2025-07-07 15:32:16 +02:00 committed by Gaétan Lepage
parent 65725e83f8
commit 0ce4ebf139
2 changed files with 20 additions and 25 deletions

View file

@ -7,12 +7,7 @@ lib.nixvim.plugins.mkNeovimPlugin {
maintainers = [ lib.maintainers.GaetanLepage ]; 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 = { settingsExample = {
keepFoldsAcrossSessions = true;
pauseFoldsOnSearch = true; pauseFoldsOnSearch = true;
setupFoldKeymaps = false; setupFoldKeymaps = false;
}; };

View file

@ -8,41 +8,41 @@
enable = true; enable = true;
settings = { settings = {
keepFoldsAcrossSessions.__raw = "package.loaded['ufo'] ~= nil"; useLspFoldsWithTreesitterFallback = true;
pauseFoldsOnSearch = true; pauseFoldsOnSearch = true;
foldtextWithLineCount = { foldtext = {
enabled.__raw = "package.loaded['ufo'] == nil"; enabled = true;
template = " %s lines"; padding = 3;
hlgroupForCount = "Comment"; lineCount = {
template = "%d lines";
hlgroup = "Comment";
}; };
foldKeymaps = { diagnosticsCount = true;
setup = true; gitsignsCount = true;
hOnlyOpensOnFirstColumn = false;
}; };
autoFold = { autoFold = {
enabled = false; enabled = true;
kinds = [ kinds = [
"comment" "comment"
"imports" "imports"
]; ];
}; };
foldKeymaps = {
setup = true;
hOnlyOpensOnFirstColumn = false;
};
}; };
}; };
}; };
example = { example = {
plugins = { plugins.origami = {
nvim-ufo.enable = true;
origami = {
enable = true; enable = true;
settings = { settings = {
keepFoldsAcrossSessions = true;
pauseFoldsOnSearch = true; pauseFoldsOnSearch = true;
setupFoldKeymaps = false; setupFoldKeymaps = false;
}; };
}; };
}; };
};
} }