From 9639ed8d023fb9434a895158656e33a1e2aeed76 Mon Sep 17 00:00:00 2001 From: rootiest Date: Sat, 28 Dec 2024 18:47:16 -0500 Subject: [PATCH] ecolog keymapping --- lua/plugins/coding.lua | 19 ++++++++++++++----- 1 file changed, 14 insertions(+), 5 deletions(-) diff --git a/lua/plugins/coding.lua b/lua/plugins/coding.lua index df0bbf6..b351dd4 100644 --- a/lua/plugins/coding.lua +++ b/lua/plugins/coding.lua @@ -125,11 +125,20 @@ return { 'hrsh7th/nvim-cmp', -- Optional, for autocompletion support }, -- Optionally reccommend adding keybinds (I use them personally) - keys = { - { 'qge', 'EcologGoto', desc = 'Go to env file' }, - { 'qes', 'EcologSelect', desc = 'Switch env file' }, - { 'qep', 'EcologPeek', desc = 'Ecolog peek variable' }, - }, + keys = function() + if pcall(require, 'which-key') then + require('which-key').add({ lhs = 'qe', group = 'Ecolog' }) + return { + { 'qeg', 'EcologGoto', desc = 'Go to env file' }, + { 'qes', 'EcologSelect', desc = 'Switch env file' }, + { + 'qep', + 'EcologPeek', + desc = 'Ecolog peek variable', + }, + } + end + end, lazy = false, opts = { -- Enables shelter mode for sensitive values