Uh oh!
There was an error while loading. Please reload this page.
[WIP] use Layout as a source data of classification related tasks - #2070
Conversation
dungpa
commented
Dec 21, 2016
Woohoo! I've been waiting for this PR for so long. |
vasily-kirichenko
commented
Dec 21, 2016
It's just fantastic 🥇 🥇 🥇 |
vasily-kirichenko
commented
Dec 21, 2016
saul
commented
Dec 21, 2016
vasily-kirichenko
commented
Dec 22, 2016
@vladima do I understand right that this color information can be used for normal semantic code highlighting in the editor? |
vladima
commented
Dec 22, 2016
I'm not sure that I understand the question: compiler uses layouts to pretty print various kinds of messages but it is not used to format the source text itself. For classification in the editor one should use |
saul
commented
Dec 25, 2016
cloudRoutine
commented
Dec 25, 2016
@saul including the apostrophe is correct, the current highlighting in the editor is wrong |
vladima
commented
Dec 27, 2016
per F# spec:
so I read it as |
vladima
commented
Dec 27, 2016
Another small issue - I've noticed that "Full name: XXX" seems to be indented by a couple of spaces. This is not the case on master without your PR, so looks like a bug |
dsyme
commented
Dec 30, 2016
Wow, this is fantastic! |
This is OK as long as FSharp.Core is stable - for various reasons we have been making pretty regular breaking changes in the surface arera of FSharp.Compiler.Service, and bumping major version numbers on the nuget package when we do. |
dsyme
commented
Dec 30, 2016
If anyone wants to make some basic improvements like
etc that would also be great |
vladima
commented
Dec 31, 2016
@dotnet-bot test this please |
vasily-kirichenko
commented
Dec 31, 2016
vladima
commented
Jan 1, 2017
Colors for module and namespace keywords are fixed. As for indentation I do agree that it is inconsistent with other cases however I'd prefer to fix this in a separate PR. Reasons:
// cc @KevinRansom and @dsyme for opinions. |
One last issue @vladima, see how the separators look in current master: Note that there are no blank lines around the separator, and there is no separator at the end of the tooltip. See @vasily-kirichenko's first screenshot in his last comment: |
cartermp
commented
Jan 1, 2017
@vladima Agreed re: indentation - unless it's a minor change, adding more improvements to this PR will make it more difficult to review and get merged. |
@vasily-kirichenko I've noticed the Async tooltip exploding in size in #1973 as well. Perhaps there's some strange code path executed for Async where it's not truncated, because in most situations it cuts off with a |
vladima
commented
Jan 1, 2017
dsyme
commented
Jan 2, 2017
This looks good to me. Unless there are other concerns I think we should accept this |
KevinRansom
commented
Jan 3, 2017
Thank you this is awesome work ... Kevin |
…tnet#2070) * use Layout as a source data of classification related tasks * fix indentation * parse xml doc by hand instead of relying on VS service * revert back old API * fix portable build * fix output in FSI * fix printing of operators * update Surface test * internalize new types and modules * tag module/namespace as keywords * fix tooltip formatting for types with hidden representation * fix separator placement














Early WIP
F# compiler uses
Layoutstructure for pretty printing but ultimately outputs result as a string. This become a culprit in classification related scenarios since in order to colorize everything nicely we have to effectively recover originalLayout. This PR introducesTaggedTextannotations for text chunks inLayout. Later annotated text chunks can easily be converted from theLayoutto RoslynTaggedText.Remaining items:
Layoutshould be added instead of replacing existing ones.per @vasily-kirichenko' comment:
Quick info:

Signature help:

Completion details:
