-
Notifications
You must be signed in to change notification settings - Fork 33
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Activating mmm-mode
without any setup leads to error in typescript-ts-mode
#138
Comments
Hi! Are you sure you don't see any such errors in the Messages without enabling |
I am not completely sure, but the few tests I made just now didn't show any warnings nor errors with TypeScript files. |
Okay, I can repro. This is odd: the font-lock query with |
Unfortunately, the best fix I found so far is patch against Emacs: diff --git a/lisp/treesit.el b/lisp/treesit.el
index f0d6f32b421..c1834bbfb9a 100644
--- a/lisp/treesit.el
+++ b/lisp/treesit.el
@@ -2725,7 +2725,7 @@ treesit-major-mode-setup
'( nil nil nil nil
(font-lock-fontify-syntactically-function
. treesit-font-lock-fontify-region)))
- (font-lock-mode 1)
+ ;; (font-lock-mode 1)
(treesit-font-lock-recompute-features)
(dolist (parser (treesit-parser-list))
(treesit-parser-add-notifier I've filed a report to Debbugs (https://debbugs.gnu.org/66223), maybe we'll be able to have this in Emacs 29.2. Or you could patch locally, or build from source. The problem is mostly specific to In any case, treesit.el also has its own way of defining mixed-language modes, but it requires writing more Elisp. |
Great work, thanks for finding the cause and reporting it uptream! The following is definitely unrelated to I thought I could circumvent the bug by just using
|
Thank you. This is a known one, actually 😬 It's fixed in the To have it working right now, you can either build from source (or patch locally), or install an older version of the typescript grammar. Anything slightly older than tree-sitter/tree-sitter-typescript@b893426 should work (e.g. its parent). |
I just wanted to try out
mmm-mode
before setting anything up (I need to edit SQL statements within TypeScript code).I open a TypeScript file (*.ts), activate
typescript-ts-mode
, and activatemmm-mode
.I get an error with the following trace:
The text was updated successfully, but these errors were encountered: