From 07ca15843b6992ca79a87df6b3f1e392bb173883 Mon Sep 17 00:00:00 2001 From: Price Hiller Date: Tue, 2 Aug 2022 01:31:24 -0500 Subject: [PATCH] fix(hydra): return if gitsigns not loaded --- .../primary/config/lua/plugins/configs/hydra.lua | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/dots/.nvim-environments/primary/config/lua/plugins/configs/hydra.lua b/dots/.nvim-environments/primary/config/lua/plugins/configs/hydra.lua index 4ced56eb..5e69376c 100644 --- a/dots/.nvim-environments/primary/config/lua/plugins/configs/hydra.lua +++ b/dots/.nvim-environments/primary/config/lua/plugins/configs/hydra.lua @@ -3,6 +3,11 @@ if not loaded then return end +local loaded, gitsigns = pcall(require, "gitsigns") +if not loaded then + return +end + -- Side Scroll hydra({ name = "Side scroll", @@ -22,9 +27,6 @@ hydra({ }, }) --- Git Integration -local gitsigns = require("gitsigns") - local hint = [[ _J_: next hunk _s_: stage hunk _d_: show deleted _b_: blame line _K_: prev hunk _u_: undo stage hunk _p_: preview hunk _B_: blame show full