fix(tree-sitter): add derived-mode parents to ts-modes

ts-modes do this already in 30/31+ (`derived-mode-add-parents` was added
in 30), but is still needed for 29.x users and any ts-modes that haven't
adapted (many of them).

Fix: doomemacs/community#29
This commit is contained in:
Henrik Lissner
2025-09-07 10:21:10 -04:00
parent 8f55404781
commit 1adec8b10c
3 changed files with 17 additions and 9 deletions

View File

@@ -95,6 +95,7 @@ This can be passed nil as its second argument to unset handlers for MODES. e.g.
'xref-backend-functions)
(make-list 5 async)
(make-list 5 (or (eq major-mode mode)
(memq mode (get major-mode 'derived-mode-extra-parents))
(and (boundp mode)
(symbol-value mode))))))))
(add-hook hook fn)))))