branch: elpa/idris-mode
commit 50a05f8eece2e2eefcebf75d6b94f33b3f7de690
Author: Marek L <[email protected]>
Commit: Marek L <[email protected]>
Handle syntax highlighting in `idris-load-file-sync`
As experimental feature it is by default disabled.
To enable it switch
`idris-x-enable-semantic-source-highlighting-in-sync-file-load`
to true.
---
idris-commands.el | 6 +++++-
idris-settings.el | 10 ++++++++++
2 files changed, 15 insertions(+), 1 deletion(-)
diff --git a/idris-commands.el b/idris-commands.el
index 9eaea2ec60..5c9697a42e 100644
--- a/idris-commands.el
+++ b/idris-commands.el
@@ -265,9 +265,13 @@ This sets the load position to point, if there is one."
(idris-load-to (point)))
(let* ((dir-and-fn (idris-filename-to-load))
(fn (cdr dir-and-fn))
- (srcdir (car dir-and-fn)))
+ (srcdir (car dir-and-fn))
+ (idris-semantic-source-highlighting
+ (and
idris-x-enable-semantic-source-highlighting-in-sync-file-load
+ (idris-buffer-semantic-source-highlighting))))
(setq idris-currently-loaded-buffer nil)
(idris-switch-working-directory srcdir)
+ (idris-toggle-semantic-source-highlighting)
(let ((result
(idris-eval
(if idris-load-to-here
diff --git a/idris-settings.el b/idris-settings.el
index fd236c7510..29e9937d47 100644
--- a/idris-settings.el
+++ b/idris-settings.el
@@ -75,6 +75,16 @@ This is to reduce lag when loading large Idris files."
:group 'idris
:type 'integer)
+(defcustom idris-x-enable-semantic-source-highlighting-in-sync-file-load nil
+ "*Experimental*
+Enable semantic source highlighting during synchronous file loads triggered
+by Idris commands.
+
+This may improve visual feedback, but can impact responsiveness depending
+on file size and command frequency."
+ :group 'idris
+ :type 'boolean)
+
(defcustom idris-log-events nil
"If non-nil, communications between Emacs and Idris are logged.