From 829a44f79c66b57cf0d29255617b05ddc78fdd53 Mon Sep 17 00:00:00 2001 From: Daanturo Date: Thu, 29 Jul 2021 08:59:48 +0700 Subject: [PATCH] Quickly close the `lsp-signature` popup by ESC* Add to `doom-escape-hook` a function that closes the displayed LSP signature. --- modules/tools/lsp/+lsp.el | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/modules/tools/lsp/+lsp.el b/modules/tools/lsp/+lsp.el index 4044ea77f..b4468b816 100644 --- a/modules/tools/lsp/+lsp.el +++ b/modules/tools/lsp/+lsp.el @@ -58,6 +58,13 @@ about it (it will be logged to *Messages* however).") ;; REVIEW Remove this once this is fixed upstream. (add-to-list 'lsp-client-packages 'lsp-racket) + (add-hook! 'doom-escape-hook + (defun +lsp-signature-stop-maybe-h () + "Close the displayed `lsp-signature'." + (when lsp-signature-mode + (lsp-signature-stop) + t))) + (set-popup-rule! "^\\*lsp-help" :size 0.35 :quit t :select t) (set-lookup-handlers! 'lsp-mode :definition #'+lsp-lookup-definition-handler