We simply remove all the CUSTOM_MARKERS before attempting to parse the file.
This allows for the syntax selection to work with most of the test strings.
This allows us to select a string or portions of it and try parsing it as rust
syntax. This is mostly helpful when developing tests where the test
itself contains some rust syntax as a string.
908: Enable markup for hover on expressions which resolve using type_of r=matklad a=vipentti
This adds highlighting when hovering over items which are resolved using
`type_of`.
This adds basic highlighting, discussed in #904.
Co-authored-by: Ville Penttinen <villem.penttinen@gmail.com>
915: Bring BodySyntaxMapping in line with other source-map instances r=flodiebold a=matklad
* rename to SourceMap
* don't store the actual body inline, just return a pair
r? @flodiebold
Co-authored-by: Aleksey Kladov <aleksey.kladov@gmail.com>
906: Add support for goto definition and hover for struct fields r=matklad a=vipentti
This works partially towards fixing #512
Co-authored-by: Ville Penttinen <villem.penttinen@gmail.com>
900: Add new trait ast::TypeAscriptionOwner r=vipentti a=vipentti
This trait should be implemented for nodes which have an ascribed type,
e.g. thing : Type. Such as let, const, static, param, named struct fields.
In addition, we update some places where previously we used node + node.type_ref() with `TypeAscriptionOwner` in the trait bounds.
Co-authored-by: Ville Penttinen <villem.penttinen@gmail.com>
901: Add basic support for showing fn signature when hovering r=matklad a=vipentti
This adds basic support for displaying function signature when hovering over a usage of a function.
Additionally refactored `hover` to return `HoverResult` to ease with testing and in general to be more robust.
Co-authored-by: Ville Penttinen <villem.penttinen@gmail.com>
vscode would report "A request has failed" when it got "Content modified"
message and this would cause a pop-up to appear. This works around the issue by
returning an "empty" response that vscode can ignore.