Improve position:sticky nestingRange info for rust code by augmenting rust save-analysis data with AST ranges of compound statement braces
Categories
(Webtools :: Searchfox, enhancement)
Tracking
(Not tracked)
People
(Reporter: asuth, Unassigned)
References
()
Details
The initial position:sticky nestingRange generation for rust is very poor because we basically only have the locations of the token for a given definition. We don't actually know the extent of its body. So the hack I went with was at least inferring that a parent definition must be at least as large as all of its children, providing coverage through at least the first line of its last child definition.
I'll file a rust issue for tracking in a sec once I have a bug number for this.
| Reporter | ||
Comment 1•6 years ago
|
||
I filed https://github.com/rust-lang/rust/issues/61596 for what we want from rust.
Comment 2•6 years ago
|
||
Note that the fix for bug 1556234 effectively means we have a wrapper around rustc and so can access more compiler internals than what's emitted to the save-analysis files. That would enable us to fix this bug more easily.
| Reporter | ||
Comment 3•6 years ago
|
||
Awesome!
| Reporter | ||
Comment 6•9 months ago
•
|
||
Thanks for your attention; this was addressed by my changes in bug 1859373 where we use a tree-sitter parse tree for context information. (Noting that SCIP did evolve to contain information on containing symbols, although I don't believe it's available in all languages that emit SCIP; I believe I had a question about that in some PR and Nicolas indicated that we do still need tree-sitter's help for at least some languages.)
Description
•