From 0ce4ebf139a4f9f11c2f22507a55fc9a73aa533d Mon Sep 17 00:00:00 2001 From: Gaetan Lepage Date: Mon, 7 Jul 2025 15:32:16 +0200 Subject: [PATCH] plugins/origami: update module to v2.0 --- plugins/by-name/origami/default.nix | 5 --- .../plugins/by-name/origami/default.nix | 40 +++++++++---------- 2 files changed, 20 insertions(+), 25 deletions(-) diff --git a/plugins/by-name/origami/default.nix b/plugins/by-name/origami/default.nix index 30ef8132..5a824ccb 100644 --- a/plugins/by-name/origami/default.nix +++ b/plugins/by-name/origami/default.nix @@ -7,12 +7,7 @@ lib.nixvim.plugins.mkNeovimPlugin { 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; }; diff --git a/tests/test-sources/plugins/by-name/origami/default.nix b/tests/test-sources/plugins/by-name/origami/default.nix index 4b5810a2..25e7cb16 100644 --- a/tests/test-sources/plugins/by-name/origami/default.nix +++ b/tests/test-sources/plugins/by-name/origami/default.nix @@ -8,40 +8,40 @@ enable = true; settings = { - keepFoldsAcrossSessions.__raw = "package.loaded['ufo'] ~= nil"; + useLspFoldsWithTreesitterFallback = true; pauseFoldsOnSearch = true; - foldtextWithLineCount = { - enabled.__raw = "package.loaded['ufo'] == nil"; - template = " %s lines"; - hlgroupForCount = "Comment"; - }; - foldKeymaps = { - setup = true; - hOnlyOpensOnFirstColumn = false; + foldtext = { + enabled = true; + padding = 3; + lineCount = { + template = "%d lines"; + hlgroup = "Comment"; + }; + diagnosticsCount = true; + gitsignsCount = true; }; autoFold = { - enabled = false; + enabled = true; kinds = [ "comment" "imports" ]; }; + foldKeymaps = { + setup = true; + hOnlyOpensOnFirstColumn = false; + }; }; }; }; example = { - plugins = { - nvim-ufo.enable = true; + plugins.origami = { + enable = true; - origami = { - enable = true; - - settings = { - keepFoldsAcrossSessions = true; - pauseFoldsOnSearch = true; - setupFoldKeymaps = false; - }; + settings = { + pauseFoldsOnSearch = true; + setupFoldKeymaps = false; }; }; };