Open sdoerner opened 3 weeks ago
One more question, the documentation says:
"The tokens to use as a comment token, either a single token "//"
or an array ["//", "///", "//!"]
(the first token will be used for commenting). Also configurable as comment-token for backwards compatibility"
It says that in the case of an array - the first token will be used.
I have .vue
files, in which there are 3 languages: html, js/ts, css. So there are 3 tokens used for commenting:
1) <!-- -->
2) //
3) /* */
How to make the correct token for comments be used? So far it only incorrectly uses comments for html - everywhere. Is it the tree sitter responsible for identifying the context in which the comment is being made - or is it an internal thing in rust? Please, clarify.
Using SQL as an example, but this applies more generally.
Some SQL comments start with "#" (e.g. Mysql I think). So I tried to modify my
languages.toml
:Result:
The default sql language definition includes
Possible solutions I looked at:
languages.toml
. (maybe there is one?)languages.toml
could be updated to list both tokens for SQL. This would fix the issue for SQL but doesn't solve the customization problem more generally.