Skip to content

Commit 9f468c5

Browse files
isomarcteyyoncho
authored andcommitted
Add Terminal Friendly Bindings For Imenu (emacs-lsp#269)
The key binding `<return>` only binds to return in the graphical mode of emacs. If emacs is running in the terminal we want to use `RET` instead.
1 parent 16e3eeb commit 9f468c5

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

lsp-ui-imenu.el

+2
Original file line numberDiff line numberDiff line change
@@ -319,6 +319,8 @@ Return the updated COLOR-INDEX."
319319
(define-key map (kbd "<left>") 'lsp-ui-imenu--prev-kind)
320320
(define-key map (kbd "<return>") 'lsp-ui-imenu--view)
321321
(define-key map (kbd "<M-return>") 'lsp-ui-imenu--visit)
322+
(define-key map (kbd "RET") 'lsp-ui-imenu--view)
323+
(define-key map (kbd "M-RET") 'lsp-ui-imenu--visit)
322324
(setq lsp-ui-imenu-mode-map map)))
323325

324326
(define-derived-mode lsp-ui-imenu-mode special-mode "lsp-ui-imenu"

0 commit comments

Comments
 (0)