fix(nvim): toggleterm keymap registration (#10)

Fix import for `which-key` and set the correct name for key mapping.

Reviewed-on: #10
This commit is contained in:
João Paulo Dubas 2023-10-29 21:06:30 +00:00
parent 4aafe2aa9c
commit 61f02a4236

View File

@ -83,10 +83,10 @@ return {
shell = vim.o.shell, shell = vim.o.shell,
}, },
keys = function () keys = function ()
local status_ok, which_key = pcall(require, 'which_key') local status_ok, which_key = pcall(require, 'which-key')
if status_ok then if status_ok then
which_key.register({ which_key.register({
['<leader>o'] = { name = 'To[g]gle terminal', _ = 'which_key_ignore' } ['<leader>o'] = { name = 'T[o]ggle terminal', _ = 'which_key_ignore' }
}) })
end end
vim.api.nvim_create_autocmd('TermOpen', { vim.api.nvim_create_autocmd('TermOpen', {