-
-
Notifications
You must be signed in to change notification settings - Fork 37
Open
Labels
Description
Describe the bug
The syntax highlighting gets confused in the .fsi files and does not highlight the relevant keywords correctly. The textual description of the issues is provided below. There are also screenshots to help understand what the problem is, but it comes down to the following class definition form (verbose syntax):
type Example =
class
member Property: int with get, set
end
- Auto properties are not highlighted correctly in the .fsi files.
with getgets highlighted as if it is part of the type, whilesetis, for some reason, highlighted asSet<'T>. It is worth noting that theSet<'T>issue is also present in Visual Studio, so it is unclear if the issue is fixable (see screenshots) - The
endkeyword is not highlighted the same way as the precedingclasskeyword - When defining two or more types in the same .fsi files, the
typekeywords are not highlighted correctly after the firsttypekeyword. Seemingly connected to issue no. 2, as this happens after theendkeyword (see screenshots)
Steps to reproduce
- Create a simple F# project
- Create a .fsi file
- Define a class using the verbose syntax (
class ... end) - Define an auto property inside the class
- Define other types, classes, or records in the same file
Link to sample reproduction
Expected behaviour
with getshould not be highlighted as part of the type, andsetshould not referenceSet<'T>- The
endkeyword should be highlighted the same way as the precedingclasskeyword - Each
typedeclaration should be highlighted the same way
Screenshots
The Set<'T> issue:
Machine infos
Tested on WIndows 11 with .NET 9.0 and on WSL with .NET 8.0. More specifically:
- OS: [ Windows 11; WSL with Ubuntu 22.04 ]
- .NET SDK version: [ 9.0.201; 8.0.115 ]
- Ionide version: 7.25.7
Additional context
N/A
EDIT: several edits for better readability



