How to get this grammar working? Grammar doesn't seem to work, but no errors #13677
-
I've tried adding: [[language]]
name = "cobweb"
scope = "source.cobweb" # also tried "source.cob"
file-types = [ "cob", "cobweb" ]
auto-format = true
roots = []
#
[[grammar]]
name = "cobweb"
source = { git = "https://github.com/FabricSoul/tree-sitter-cobweb", rev = "main" } Also, I've tried a few variants to this, but whenever I open a .cob file, I don't seem to have any evidence that tree-sitter is working:
That seems to be using this version of tree-sitter: I've also tried opening a file with |
Beta Was this translation helpful? Give feedback.
Answered by
the-mikedavis
Jun 4, 2025
Replies: 1 comment 3 replies
-
See https://docs.helix-editor.com/master/guides/adding_languages.html#queries. You will also need to add a highlights.scm query in the runtime directory |
Beta Was this translation helpful? Give feedback.
3 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
That path is the clone of the tree-sitter-cobweb repo and it has queries. The queries in each grammar's repo can be useful as a reference but we maintain separate queries under
runtime/queries/<lang>/*.scm
since we use a custom set of captures https://docs.helix-editor.com/master/themes.html#syntax-highlightingAnd for the language version part you'll need to build from source - on master we have updated our dependency on the tree-sitter C library so that it supports grammars version 15+