ionide / ionide-vscode-fsharp

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

Error highlighting on method calls #2011

Open harry-xi opened 1 month ago

harry-xi commented 1 month ago

Describe the bug

When a method is called, the part that precedes it is incorrectly highlighted by the method's color

sample reproduction

value.Replace("{","{{").Replace("}","}}")

Expected behaviour

Correct highlighting for each step of the chained call

Screenshots

image

Machine info

MangelMaxime commented 1 month ago

This bug seems to be coming from FSAC.

When inspecting the tokens it seems like the range for the semantic token are off:

CleanShot 2024-05-27 at 17 44 31

CleanShot 2024-05-27 at 17 44 41

We have a range for:

but they should be split in several smaller ranges: