WIP: Support editor features for nested languages #1973
+408
−27
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Closes #1912
This branch relies on using a locally-built version of FSAC from ionide/FsAutoComplete#1159 to actually get the information about nested languages in a document.
The approach taken here is to
So far, the majority of this seems to work, at least in theory. I am creating and updating the virtual documents on each typecheck of a file, and the middleware functions I've defined are being invoked. However the end-to-end isn't quite working. I'm trying to get
Hover
working because it's the easiest to see working, but ideally we'd be able to get Hover, Completion, and Highlighting working before merging this.cc @alfonsogarciacaro for heads-up - I think if we get this right then https://github.com/alfonsogarciacaro/vscode-template-fsharp-highlight could be deprecated, as long as library authors update their libraries to add
[<StringSyntax("css")>]
or whatever language is appropriate.