fix(nvim): optionally register which-key prefix

This commit is contained in:
Joao P Dubas 2023-10-02 00:53:09 +00:00
parent b5e9107739
commit ed9e644fff

View File

@ -56,9 +56,12 @@ return {
}
},
keys = function ()
require('which-key').register({
['<leader>t'] = { name = 'Res[t]', _ = 'which_key_ignore' }
})
local status_ok, which_key = pcall(require, 'which-key')
if status_ok then
which_key.register({
['<leader>t'] = { name = 'Res[t]', _ = 'which_key_ignore' }
})
end
return {
{ '<leader>tr', '<Plug>RestNvim', desc = 'Run the request under cursor' },
{ '<leader>tp', '<Plug>RestNvimPreview', desc = 'Preview the curl command for the request under cursor' },