fix(edgy): neo-tree doesn't open when leader isn't space

The default mapping for this is to use `<leader>` 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 `<leader>` 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.
This commit is contained in:
Kyle Laker 2024-04-14 15:54:55 -04:00
parent bb36f71b77
commit fa945816f5
No known key found for this signature in database
GPG key ID: 2FD3E02A3F6B2223

View file

@ -61,7 +61,8 @@ return {
end,
pinned = true,
open = function()
vim.api.nvim_input("<esc><space>e")
local leader = vim.g.mapleader
vim.api.nvim_input('<esc>' .. leader .. 'e')
end,
size = { height = 0.5 },
},