feat(plugins/precognition): patch toggle to return state

This commit is contained in:
Nicolas Goudry 2024-06-16 15:02:42 +02:00
parent 03dca50006
commit dd3db0f108
No known key found for this signature in database
GPG key ID: 5FC434D9FFD1DF44
3 changed files with 17 additions and 1 deletions

View file

@ -4,7 +4,7 @@
{
extra = {
packages = [
(import ./package.nix { inherit lib pkgs; })
(import ./package { inherit lib pkgs; })
];
config = ''

View file

@ -14,4 +14,8 @@ pkgs.vimUtils.buildVimPlugin {
rev = "v${version}";
hash = "sha256-AqWYV/59ugKyOWALOCdycWVm0bZ7qb981xnuw/mAVzM=";
};
patches = [
./init.lua.patch
];
}

View file

@ -0,0 +1,12 @@
diff --git a/lua/precognition/init.lua b/lua/precognition/init.lua
index b0b9d49..b057a15 100644
--- a/lua/precognition/init.lua
+++ b/lua/precognition/init.lua
@@ -413,6 +413,7 @@ function M.toggle()
else
M.show()
end
+ return visible
end
---@param opts Precognition.PartialConfig