mirror of
https://github.com/carlrobertoh/ProxyAI.git
synced 2026-05-13 15:32:25 +00:00
feat: add default keymap for edit code action
This commit is contained in:
parent
b1d8c521c4
commit
db3f4ac98c
1 changed files with 12 additions and 0 deletions
|
|
@ -1,11 +1,15 @@
|
|||
package ee.carlrobert.codegpt.actions.editor
|
||||
|
||||
import com.intellij.openapi.actionSystem.CustomShortcutSet
|
||||
import com.intellij.openapi.application.runInEdt
|
||||
import com.intellij.openapi.editor.Editor
|
||||
import com.intellij.openapi.project.Project
|
||||
import ee.carlrobert.codegpt.Icons
|
||||
import ee.carlrobert.codegpt.ui.EditCodePopover
|
||||
import java.awt.event.InputEvent
|
||||
import java.awt.event.KeyEvent
|
||||
import javax.swing.Icon
|
||||
import javax.swing.KeyStroke
|
||||
|
||||
class EditCodeAction : BaseEditorAction {
|
||||
|
||||
|
|
@ -16,6 +20,14 @@ class EditCodeAction : BaseEditorAction {
|
|||
"Allow LLM to edit code directly in your editor",
|
||||
icon
|
||||
) {
|
||||
registerCustomShortcutSet(
|
||||
CustomShortcutSet(
|
||||
KeyStroke.getKeyStroke(
|
||||
KeyEvent.VK_E,
|
||||
InputEvent.SHIFT_DOWN_MASK or InputEvent.META_DOWN_MASK
|
||||
)
|
||||
), null
|
||||
)
|
||||
EditorActionsUtil.registerAction(this)
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue