From 3d99fbf5256456ea72ee8e06c1a2a7db3aa36a45 Mon Sep 17 00:00:00 2001 From: Henrik Lissner Date: Fri, 12 Jul 2024 20:25:01 -0400 Subject: [PATCH] tweak(gdscript): open godot log buffers in popup Includes an advice to prevent the log buffer from being focused. This way, the user can return to their work faster when in their play-debug loop, as well as kill the game/Godot by killing the log buffer remotely (with its process) with C-g/ESC. --- modules/lang/gdscript/config.el | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/modules/lang/gdscript/config.el b/modules/lang/gdscript/config.el index 69c5c2f94..7d93f201a 100644 --- a/modules/lang/gdscript/config.el +++ b/modules/lang/gdscript/config.el @@ -13,6 +13,12 @@ (set-lookup-handlers! 'gdscript-mode :documentation '(gdscript-docs-browse-symbol-at-point :async t)) (set-formatter! 'gdformat '("gdformat" "-") :modes '(gdscript-mode)) + (set-popup-rule! "^\\*godot " :ttl 0 :quit t) + + (defadvice! +gdscript--dont-focus-output-buffer-a (fn &rest args) + "Don't move cursor into gdscript compilation window." + :around #'gdscript-comint--run + (save-selected-window (apply fn args))) ;; eww is clumsy and slow. Best that `gdscript-docs-browse-symbol-at-point' ;; simply use the browser.