Skip to content

Add tlaplus#44

Open
carlthuringer wants to merge 3 commits intoemacs-tree-sitter:masterfrom
carlthuringer:add-tlaplus
Open

Add tlaplus#44
carlthuringer wants to merge 3 commits intoemacs-tree-sitter:masterfrom
carlthuringer:add-tlaplus

Conversation

@carlthuringer
Copy link

@carlthuringer carlthuringer commented Oct 3, 2021

I was able to utilize this fork in my bare-bones tla-mode for syntax highlighting of TLA+. I hope you can accept my contribution!

Now, as for the strange config.json, while I was trying to get this all working I kept crashing into an error:

No such file or directory (os error 2)

(more at my readme
Eventually I figured out that in tree-sitter-tlaplus @ahelwer is using a fork of version 0.20 of tree-sitter-cli. But the important bit is not the fork, but that in that version the CLI looks for a config.json when TREE_SITTER_DIR is set in the environment. Because this package sets that env to the source directory during compile, it tries to find this config and fails, then crashes.

Uh, possibly the more correct thing to do is make another PR over there so they don't crash if there's no config file rather than to put an empty config file here, but at any rate it does compile correctly and fine with 0.20. If I put the empty config file.

At least, that's what I think is happening. I don't really know Rust so I can't be certain of whom is at fault, or how to fix it. I already stretched my knowledge of elisp this time, which was fun!

@ahelwer
Copy link

ahelwer commented Oct 3, 2021

Related: tree-sitter/tree-sitter#1336

[submodule "repos/tlaplus"]
path = repos/tlaplus
url = https://github.com/tlaplus-community/tree-sitter-tlaplus.git
branch = master
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think the default branch on the repo is main, not master

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants