ionide / ionide-vscode-fsharp

VS Code plugin for F# development
http://ionide.io
MIT License
849 stars 276 forks source link

WIP: Support editor features for nested languages #1973

Open baronfel opened 6 months ago

baronfel commented 6 months ago

Closes #1912

This branch relies on using a locally-built version of FSAC from fsharp/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.