-
Notifications
You must be signed in to change notification settings - Fork 31
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
Doesn't work with yasnippet #76
Comments
Actually, as noted here, I suspect the problem is not so much that it's being set via |
In joaotavora/yasnippet#1169 (comment), @monnier has advised that resetting local variables is expected behaviour for activation of any major mode. |
See joaotavora/yasnippet#1169 (comment) for a recommended way forward here using |
The motivation here (and I agree that it's probaby a bit more convoluted than it needs to be) is so that we can revert any changes made by turning Whether or not we got the implementation right is definitely up for debate, since this is my first try at it and there's a lot I don't know about how Emacs works under the hood 🤷 I liked your snippet here: (setq major-mode-remap-alist (treesit-auto--build-major-mode-remap-alist)) since this effectively does what I originally wanted this package to do: just set the damn |
The motivation here (and I agree that it's probaby a bit more convoluted
than it needs to be) is so that we can revert any changes made by turning
`global-treesit-auto-mode`,
FWIW, your code made this clear in the comments, indeed, thanks.
It has its pros and cons, but I can't suggest a solution that's
universally better 🙁
I haven't seen this `derived-mode-add-parents` before,
since it looks like it might be for Emacs 30?
Yes, it's new.
My hope is that treesit-auto won't be needed for very long, and we get
better built-in support for what I've hacked around in this package,
Agreed.
but I can't quite tell from that conversation whether this is resolved
or a solid workaround exists.
It's still not solved, no. It's probably going to take some time.
|
@monnier just announced that he's patched yasnippet to honor
major-mode-remap-alist
, so that for example if it contains the cons cell(typescript-mode . typescript-ts-mode)
, then activatingtypescript-ts-mode
will also activate all the snippets fortypescript-mode
.However, as I noted in my reply to his comment, it won't work out of the box with
treesit-auto
yet because the latter is only settingmajor-mode-remap-alist
locally not globally. I don't yet understand why it was coded in this way, so I don't have a good solution to suggest yet, but hopefully someone here will 😁The text was updated successfully, but these errors were encountered: