You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
From 7035599fff1fcf69d45ee466b9a8541dfd199a86 Mon Sep 17 00:00:00 2001
From: faraz <[email protected]>
Date: Fri, 1 Mar 2024 16:42:53 -0800
Subject: [PATCH] Fix lsp-ui-flycheck-list--visit binding to M-RET
RET and return are different keys in emacs.
Binding such a M- don't work if emacs is in terminal mode.
For bindings to work both in terminal and UI. The correct binding is RET and M-RET
https://github.com/emacs-lsp/lsp-ui/blame/bc58c6664577d1d79060c6b32b7ad20e70ee19d0/lsp-ui-flycheck.el#L158
https://www.fromkk.com/posts/c-m-ret-and-return-key-in-emacs/
(cherry picked from commit 2c66ab8fd8715623bef0fdebd21aca2da706e51d)
---
lsp-ui-flycheck.el | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/lsp-ui-flycheck.el b/lsp-ui-flycheck.el
index e3ac831..e9a6dc6 100644
--- a/lsp-ui-flycheck.el
+++ b/lsp-ui-flycheck.el
@@ -154,8 +154,8 @@ Use `lsp-diagnostics' to receive diagnostics from your LSP server."
(defvar lsp-ui-flycheck-list-mode-map
(let ((map (make-sparse-keymap)))
(define-key map (kbd "q") 'lsp-ui-flycheck-list--quit)
- (define-key map (kbd "<return>") 'lsp-ui-flycheck-list--view)
- (define-key map (kbd "<M-return>") 'lsp-ui-flycheck-list--visit)
+ (define-key map (kbd "<RET>") 'lsp-ui-flycheck-list--view)
+ (define-key map (kbd "<M-RET>") 'lsp-ui-flycheck-list--visit)
map)
"Keymap for ‘lsp-ui-flycheck-list-mode’.")
--
2.34.1
```
RET and return are different keys in emacs.
Binding such a M- don't work if emacs is in terminal mode.
For bindings to work both in terminal and UI. The correct binding is RET and M-RET
https://github.com/emacs-lsp/lsp-ui/blame/bc58c6664577d1d79060c6b32b7ad20e70ee19d0/lsp-ui-flycheck.el#L158
(let ((map (make-sparse-keymap)))
(define-key map (kbd "q") 'lsp-ui-flycheck-list--quit)
-(define-key map (kbd "") 'lsp-ui-flycheck-list--visit)
-(define-key map (kbd "") 'lsp-ui-flycheck-list--visit)
https://www.fromkk.com/posts/c-m-ret-and-return-key-in-emacs/
The text was updated successfully, but these errors were encountered: