ionide / ionide-fsgrammar

Shared Textmate Regex Style F# Language Grammar
MIT License
35 stars 36 forks source link

Syntax highlighting breaks when returning a binding that begins with "use" #180

Closed enriquein closed 2 years ago

enriquein commented 2 years ago

Describe the bug Syntax highlighting breaks when you return a binding that begins with use. This started happening since the latest update to ionide.

To Reproduce Steps to reproduce the behaviour:

  1. Create a module or class and define two functions or methods
  2. Create a binding on the first function/method and make sure the name begins with use. For this repro I used user.
  3. Have the function return this binding.
  4. Syntax highlight breaks.

I am including a gif below so you can see it in action.

Expected behaviour Syntax highlighting should be able to work regardless of binding names.

Screenshots Minimal repro gif. Notice how as I'm renaming or changing the return value, the word user only has the use part highlighted as well.

highlight-bug-repro

Environment (please complete the following information):

Additional context For now I can work around it by avoiding the use prefix on bindings.

baronfel commented 2 years ago

This should be fixed by https://github.com/ionide/ionide-fsgrammar/pull/179, which just hasn't been released in an ionide update yet.