From fa945816f5462ca1dd4aa7ff090cc931b680083d Mon Sep 17 00:00:00 2001 From: Kyle Laker Date: Sun, 14 Apr 2024 15:54:55 -0400 Subject: [PATCH] fix(edgy): neo-tree doesn't open when leader isn't space The default mapping for this is to use `` which edgy should respect. This ensures that neo-tree still opens even when leader has been remapped. Otherwise, the top neo-tree window just stays in a loading state. Unfortunately, it seems the `` isn't a supported keycode for `nvim_input` (or at least it isn't listed in `:help keycodes` and it doesn't seem to work). Getting the leader first, then passing it to `nvim_input` seems to clear this up. --- lua/lazyvim/plugins/extras/ui/edgy.lua | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lua/lazyvim/plugins/extras/ui/edgy.lua b/lua/lazyvim/plugins/extras/ui/edgy.lua index 1a9c5e12..77f325f4 100644 --- a/lua/lazyvim/plugins/extras/ui/edgy.lua +++ b/lua/lazyvim/plugins/extras/ui/edgy.lua @@ -61,7 +61,8 @@ return { end, pinned = true, open = function() - vim.api.nvim_input("e") + local leader = vim.g.mapleader + vim.api.nvim_input('' .. leader .. 'e') end, size = { height = 0.5 }, },