helix
helix copied to clipboard
Update scala treesitter grammar
This should address #4352.
This doesn't seem to fix the syntax highlighting for me with the test file mentioned:
$ cat << EOF >> ~/.config/helix/languages.toml
[[grammar]]
name = "scala"
source = { git = "https://github.com/tree-sitter/tree-sitter-scala", rev = "140c96cf398693189d4e50f76d19ddfcd8a018f8" }
EOF
$ hx -g fetch
$ hx -g build
It looks like this is the block that fails to be parsed correctly:
def updateModel[Model](f: Model => Model): Action[Model, Unit] = for {
$model <- ops[Model].ask.map(_.$model)
_ <- ops.delay($model.update(f))
} yield {}
I think it's the _.$model but I don't know much about scala.
Fixing #4352 will need more changes to tree-sitter-scala. We could still merge this as-is though, it looks like there have been a few changes to the parser code that may fix parsing in some other cases.
Yeah, that's what I was thinking. There are other glitches that I've seen, and so I think this will fix something.