-
-
Notifications
You must be signed in to change notification settings - Fork 15k
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
emacs: handle specially-named tree-sitter grammars #383937
Conversation
5a30607
to
3f5ceb2
Compare
I do not think this commit has anything to do the issue this PR tries to solve because This PR indeed works. However, it looks more like an upstream (Emacs or markdown_inline tree-sitter) issue. Can it be reproduced without Nixpkgs? If so, it is better to report this issue to upstream and have it fixed there. |
OK, I don't think I explained the issue very well. You're right that we're not using I should probably have linked #181195 (comment) instead, where
In #348933, the OP noted
The upstream naming {
"name": "markdown_inline",
"camelcase": "MarkdownInline",
"scope": "text.markdown_inline",
"path": "tree-sitter-markdown-inline",
"highlights": "tree-sitter-markdown-inline/queries/highlights.scm",
"injections": "tree-sitter-markdown-inline/queries/injections.scm",
"external-files": [
"common/common.js"
]
} For this reason, I would be hesitant to try and do something like changing our The fact that Emacs expects the name With all this in mind, do you currently prefer that we a. go with something like the current PR or |
If it is indeed an upstream issue, i.e., it can be reproduced without Nixpkgs, then it would be good to report it to Emacs (and cc related people such as author of markdown-ts-mode and author of Emacs treesit infra).
Even if it is an upstream issue, we probably should merge this PR now as a quick fix/workaround. Thanks for those links. They are very helpful for me knowing little about tree sitter to get an overview for this. |
Successfully created backport PR for |
Recent revisions of Emacs
HEAD
have a newmarkdown-ts-mode
. This change allows Emacs to detect themarkdown-inline
grammar; to confirm, notice that on the latest nixpkgs, tryingmarkdown-ts-mode
will yield:The underscores seem to be there solely to placate
nvim-treesitter
(4623212).Fixes #348933.
Things done
nix.conf
? (See Nix manual)sandbox = relaxed
sandbox = true
nix-shell -p nixpkgs-review --run "nixpkgs-review rev HEAD"
. Note: all changes have to be committed, also see nixpkgs-review usage./result/bin/
)Add a 👍 reaction to pull requests you find important.