Open jennybc opened 2 months ago
We'd really like to make tree-sitter-r play as nicely as possible with tree-sitter's error recovery, but to do that we need an example of the code that caused the squiggles in the image above. If you can recreate that state or a similar one and provide a reprex for it, we can see if it is the same problem as the ones mentioned in https://github.com/r-lib/tree-sitter-r/issues/90, which would provide even more motivation for putting the work in to fix that
Yes I definitely think it was an unmatched delimiter. In the test file in the screenshot, if I delete any parenthesis or brace, the entire file immediately lights up with the diagnostic. So yes the same problem as https://github.com/r-lib/tree-sitter-r/issues/90.
Another case where the whole editor gets linted: insert this somewhere in the file: (a &&)
Summarizing a slack discussion.
This screenshot is me in the middle of a "copy/paste/edit" maneuver where I'm creating a new test from an existing one. It's easy for the code to travel through an invalid state while you're finishing what you started. I find the diagnostics that appear so overwhelming that it actually makes it harder for me to get back to the happy state of syntactically valid code.
Three possible angles on this: