Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error highlighting on method calls #2011

Open
harry-xi opened this issue May 27, 2024 · 1 comment
Open

Error highlighting on method calls #2011

harry-xi opened this issue May 27, 2024 · 1 comment

Comments

@harry-xi
Copy link

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

  • OS: Windows
  • .NET SDK version: 8.0.300
  • Ionide version: 7.20.1
@MangelMaxime
Copy link
Contributor

MangelMaxime commented May 27, 2024

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:

  • "".Replace
  • ("{","{{").Replace

but they should be split in several smaller ranges:

  • ""
  • .
  • Replace
  • etc.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants