summaryrefslogtreecommitdiff
path: root/modules
diff options
context:
space:
mode:
authorCraig Jennings <c@cjennings.net>2025-10-20 14:41:32 -0500
committerCraig Jennings <c@cjennings.net>2025-10-20 14:41:32 -0500
commit8edaf02481bd61b35d82f2be62e521d9aaf64d2a (patch)
treed73b4c65ddb64ab63c32987f6954c4246441b187 /modules
parentf0ed846b9cd10a7111f7c78054b70df517426491 (diff)
feat: prog-general: Pin Go grammar version for Emacs compatibility
Add cl-lib requirement and pin Go grammar to v0.19.1 to ensure compatibility with Emacs 30.2 font-lock queries. Remove redundant hs-minor-mode hook from bicycle configuration.
Diffstat (limited to 'modules')
-rw-r--r--modules/prog-general.el14
1 files changed, 11 insertions, 3 deletions
diff --git a/modules/prog-general.el b/modules/prog-general.el
index f25b35bf..71949506 100644
--- a/modules/prog-general.el
+++ b/modules/prog-general.el
@@ -67,6 +67,16 @@
(treesit-auto-install t)
;; (treesit-auto-install 'prompt) ;; optional prompt instead of auto-install
:config
+ (require 'cl-lib)
+ ;; Pin Go grammar to v0.19.1 for compatibility with Emacs 30.2 font-lock queries
+ (let* ((go-idx (cl-position-if (lambda (recipe)
+ (eq (treesit-auto-recipe-lang recipe) 'go))
+ treesit-auto-recipe-list))
+ (go-recipe (and go-idx (nth go-idx treesit-auto-recipe-list))))
+ (when go-recipe
+ ;; Directly modify the slot value using aset (struct fields are vectors internally)
+ (aset go-recipe 6 "v0.19.1"))) ; slot 6 is :revision
+
(treesit-auto-add-to-auto-mode-alist 'all)
(global-treesit-auto-mode))
@@ -74,11 +84,9 @@
;; BICYCLE
;; cycle visibility of outline sections and code blocks.
-;; additionally it can make use of the hideshow package.
(use-package bicycle
:after outline
- :hook ((prog-mode . outline-minor-mode)
- (prog-mode . hs-minor-mode))
+ :hook (prog-mode . outline-minor-mode)
:bind (:map outline-minor-mode-map
("C-<tab>" . bicycle-cycle)
;; backtab is shift-tab