Override keymaps for prompt windows #533
-
This is great for ephemeral windows like the commit message prompt window. But for the main chat window hiding is the preferable option as they're intended to be toggled. As the Lord intended, I've bound Is there a way to override the default keymaps for prompt windows? |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 5 replies
-
You could add your own custom keymap. Below is a non-related example that I've used previously (source: #485) require('codecompanion').setup({
strategies = {
chat = {
keymaps = {
hide = {
modes = {
n = "gh",
},
callback = function(chat)
chat.ui:hide()
end,
description = "Hide the chat buffer",
},
}
}
}
}) You could take this principle and customize it to suit your needs. |
Beta Was this translation helpful? Give feedback.
I've just added a new event called
CodeCompanionChatOpened
which a boolean valuefrom_prompt_library
.