From 4eda48e0949cf7dcd744d4a1fcf04eafca7fb504 Mon Sep 17 00:00:00 2001 From: Eduard Minasyan Date: Tue, 2 Jun 2026 16:27:18 +0400 Subject: [PATCH 1/3] RSRP-502745 [dotnet]: add IsClosed class property to F# PSI See C#/F# unions compatibility discussion at https://github.com/fsharp/fslang-suggestions/discussions/1463 GitOrigin-RevId: 8a04a2b5545ba4dae98ab1155980d589ddb5246b --- .../src/Impl/Cache2/FSharpGenerativeProvidedNestedClass.cs | 1 + .../DeclaredElement/CompilerGenerated/FSharpUnionTagsClass.cs | 1 + 2 files changed, 2 insertions(+) diff --git a/ReSharper.FSharp/src/FSharp/FSharp.Psi/src/Impl/Cache2/FSharpGenerativeProvidedNestedClass.cs b/ReSharper.FSharp/src/FSharp/FSharp.Psi/src/Impl/Cache2/FSharpGenerativeProvidedNestedClass.cs index 068f035b8d..56705ad328 100644 --- a/ReSharper.FSharp/src/FSharp/FSharp.Psi/src/Impl/Cache2/FSharpGenerativeProvidedNestedClass.cs +++ b/ReSharper.FSharp/src/FSharp/FSharp.Psi/src/Impl/Cache2/FSharpGenerativeProvidedNestedClass.cs @@ -65,6 +65,7 @@ public bool HasMemberWithName(string shortName, bool ignoreCase) => public override AccessRights GetAccessRights() => ProvidedType.IsPublic || ProvidedType.IsNestedPublic ? AccessRights.PUBLIC : AccessRights.PRIVATE; + public bool IsClosed => false; public override bool IsAbstract => ProvidedType.IsAbstract; public override bool IsSealed => ProvidedType.IsSealed; public override string XMLDocId => XMLDocUtil.GetTypeElementXmlDocId(this); diff --git a/ReSharper.FSharp/src/FSharp/FSharp.Psi/src/Impl/DeclaredElement/CompilerGenerated/FSharpUnionTagsClass.cs b/ReSharper.FSharp/src/FSharp/FSharp.Psi/src/Impl/DeclaredElement/CompilerGenerated/FSharpUnionTagsClass.cs index 46d31be663..cc609aa355 100644 --- a/ReSharper.FSharp/src/FSharp/FSharp.Psi/src/Impl/DeclaredElement/CompilerGenerated/FSharpUnionTagsClass.cs +++ b/ReSharper.FSharp/src/FSharp/FSharp.Psi/src/Impl/DeclaredElement/CompilerGenerated/FSharpUnionTagsClass.cs @@ -58,6 +58,7 @@ public IPsiSourceFile GetSingleOrDefaultSourceFile() => Union.GetSingleOrDefaultSourceFile(); public override bool IsStatic => true; + public bool IsClosed => false; public IEnumerable Constants { From 8cc710200f71c23e6c7be21efa11fdd74a02eabd Mon Sep 17 00:00:00 2001 From: Alex Berezhnykh Date: Fri, 5 Jun 2026 20:04:43 +0000 Subject: [PATCH 2/3] RIDER-68663: fix hover doc style for simple definitions Merge-request: IJ-MR-207088 Merged-by: Alexey Berezhnykh GitOrigin-RevId: 82f66e8aed5bd0ece9f642cbacc6bd1768dafe31 --- .../src/QuickDoc/FSharpQuickDocProvider.fs | 9 ++------- .../test/data/features/quickdoc/Let Binding 02.fs.gold | 2 +- .../test/data/features/quickdoc/Let Binding 03.fs.gold | 2 +- .../test/data/features/quickdoc/Let Binding 04.fs.gold | 2 +- .../test/data/features/quickdoc/Let Binding 05.fs.gold | 2 +- .../test/data/features/quickdoc/Line 01.fs.gold | 2 +- .../data/features/quickdoc/Source directory 01.fs.gold | 2 +- .../test/data/features/quickdoc/Source file 01.fs.gold | 2 +- .../test hover docs for a parameter/gold/Program.gold | 2 +- .../test hover docs for a shorthand/gold/Program.gold | 2 +- .../test hover docs for a submodule/gold/Program.gold | 2 +- 11 files changed, 12 insertions(+), 17 deletions(-) diff --git a/ReSharper.FSharp/src/FSharp/FSharp.Psi.Daemon/src/QuickDoc/FSharpQuickDocProvider.fs b/ReSharper.FSharp/src/FSharp/FSharp.Psi.Daemon/src/QuickDoc/FSharpQuickDocProvider.fs index fb1a8c0528..a29b575049 100644 --- a/ReSharper.FSharp/src/FSharp/FSharp.Psi.Daemon/src/QuickDoc/FSharpQuickDocProvider.fs +++ b/ReSharper.FSharp/src/FSharp/FSharp.Psi.Daemon/src/QuickDoc/FSharpQuickDocProvider.fs @@ -86,12 +86,6 @@ type FSharpQuickDocPresenter(xmlDocService: FSharpXmlDocService, identifier: IFS richTextEscapeToHtml text + "" - let createToolTip (header: RichText) (body: RichText) = - if body.IsEmpty then - asContent header - else - (asDefinition header).Append(body) - member x.CreateRichTextTooltip() = FSharpQuickDoc.getFSharpToolTipText identifier |> Option.map (fun (ToolTipText layouts) -> @@ -110,6 +104,7 @@ type FSharpQuickDocPresenter(xmlDocService: FSharpXmlDocService, identifier: IFS if not overload.TypeMapping.IsEmpty then yield overload.TypeMapping |> List.map richText |> richTextJoin "\n" ] |> richTextJoin "\n\n" + |> asDefinition let body = [ match xmlDocService.GetXmlDoc(overload.XmlDoc, overload.Symbol, identifier.GetPsiModule()) with @@ -122,7 +117,7 @@ type FSharpQuickDocPresenter(xmlDocService: FSharpXmlDocService, identifier: IFS | _ -> () ] |> richTextJoin "\n\n" - createToolTip header body)) + header.Append(body))) |> richTextJoin IdentifierTooltipProvider.RIDER_TOOLTIP_SEPARATOR ) |> Option.defaultValue null diff --git a/ReSharper.FSharp/test/data/features/quickdoc/Let Binding 02.fs.gold b/ReSharper.FSharp/test/data/features/quickdoc/Let Binding 02.fs.gold index e7b558b907..5710746fea 100644 --- a/ReSharper.FSharp/test/data/features/quickdoc/Let Binding 02.fs.gold +++ b/ReSharper.FSharp/test/data/features/quickdoc/Let Binding 02.fs.gold @@ -1 +1 @@ -
val a: int
\ No newline at end of file +
val a: int
\ No newline at end of file diff --git a/ReSharper.FSharp/test/data/features/quickdoc/Let Binding 03.fs.gold b/ReSharper.FSharp/test/data/features/quickdoc/Let Binding 03.fs.gold index 7005db0ed6..7ff81936f1 100644 --- a/ReSharper.FSharp/test/data/features/quickdoc/Let Binding 03.fs.gold +++ b/ReSharper.FSharp/test/data/features/quickdoc/Let Binding 03.fs.gold @@ -1 +1 @@ -
val b: int
\ No newline at end of file +
val b: int
\ No newline at end of file diff --git a/ReSharper.FSharp/test/data/features/quickdoc/Let Binding 04.fs.gold b/ReSharper.FSharp/test/data/features/quickdoc/Let Binding 04.fs.gold index e7b558b907..5710746fea 100644 --- a/ReSharper.FSharp/test/data/features/quickdoc/Let Binding 04.fs.gold +++ b/ReSharper.FSharp/test/data/features/quickdoc/Let Binding 04.fs.gold @@ -1 +1 @@ -
val a: int
\ No newline at end of file +
val a: int
\ No newline at end of file diff --git a/ReSharper.FSharp/test/data/features/quickdoc/Let Binding 05.fs.gold b/ReSharper.FSharp/test/data/features/quickdoc/Let Binding 05.fs.gold index 7005db0ed6..7ff81936f1 100644 --- a/ReSharper.FSharp/test/data/features/quickdoc/Let Binding 05.fs.gold +++ b/ReSharper.FSharp/test/data/features/quickdoc/Let Binding 05.fs.gold @@ -1 +1 @@ -
val b: int
\ No newline at end of file +
val b: int
\ No newline at end of file diff --git a/ReSharper.FSharp/test/data/features/quickdoc/Line 01.fs.gold b/ReSharper.FSharp/test/data/features/quickdoc/Line 01.fs.gold index f6983c984a..db7009aa4c 100644 --- a/ReSharper.FSharp/test/data/features/quickdoc/Line 01.fs.gold +++ b/ReSharper.FSharp/test/data/features/quickdoc/Line 01.fs.gold @@ -1 +1 @@ -
3
\ No newline at end of file +
3
\ No newline at end of file diff --git a/ReSharper.FSharp/test/data/features/quickdoc/Source directory 01.fs.gold b/ReSharper.FSharp/test/data/features/quickdoc/Source directory 01.fs.gold index b0132ae5ad..8d8963c0b4 100644 --- a/ReSharper.FSharp/test/data/features/quickdoc/Source directory 01.fs.gold +++ b/ReSharper.FSharp/test/data/features/quickdoc/Source directory 01.fs.gold @@ -1 +1 @@ -
""
\ No newline at end of file +
""
\ No newline at end of file diff --git a/ReSharper.FSharp/test/data/features/quickdoc/Source file 01.fs.gold b/ReSharper.FSharp/test/data/features/quickdoc/Source file 01.fs.gold index d79152f53f..1560495c01 100644 --- a/ReSharper.FSharp/test/data/features/quickdoc/Source file 01.fs.gold +++ b/ReSharper.FSharp/test/data/features/quickdoc/Source file 01.fs.gold @@ -1 +1 @@ -
"Source file 01.fs"
\ No newline at end of file +
"Source file 01.fs"
\ No newline at end of file diff --git a/rider-fsharp/src/test/testData/markup/FSharpHoverDocTest/test hover docs for a parameter/gold/Program.gold b/rider-fsharp/src/test/testData/markup/FSharpHoverDocTest/test hover docs for a parameter/gold/Program.gold index 16eec13f6c..0013449911 100644 --- a/rider-fsharp/src/test/testData/markup/FSharpHoverDocTest/test hover docs for a parameter/gold/Program.gold +++ b/rider-fsharp/src/test/testData/markup/FSharpHoverDocTest/test hover docs for a parameter/gold/Program.gold @@ -1 +1 @@ -
val argv: string array
\ No newline at end of file +
val argv: string array
\ No newline at end of file diff --git a/rider-fsharp/src/test/testData/markup/FSharpHoverDocTest/test hover docs for a shorthand/gold/Program.gold b/rider-fsharp/src/test/testData/markup/FSharpHoverDocTest/test hover docs for a shorthand/gold/Program.gold index f1f29377ba..8e4033b132 100644 --- a/rider-fsharp/src/test/testData/markup/FSharpHoverDocTest/test hover docs for a shorthand/gold/Program.gold +++ b/rider-fsharp/src/test/testData/markup/FSharpHoverDocTest/test hover docs for a shorthand/gold/Program.gold @@ -1 +1 @@ -
val _arg1: 'a
\ No newline at end of file +
val _arg1: 'a
\ No newline at end of file diff --git a/rider-fsharp/src/test/testData/markup/FSharpHoverDocTest/test hover docs for a submodule/gold/Program.gold b/rider-fsharp/src/test/testData/markup/FSharpHoverDocTest/test hover docs for a submodule/gold/Program.gold index 7689d20ef9..ef8b56551d 100644 --- a/rider-fsharp/src/test/testData/markup/FSharpHoverDocTest/test hover docs for a submodule/gold/Program.gold +++ b/rider-fsharp/src/test/testData/markup/FSharpHoverDocTest/test hover docs for a submodule/gold/Program.gold @@ -1 +1 @@ -
module Submodule

from Module
\ No newline at end of file +
module Submodule

from Module
\ No newline at end of file From b09415ddaa60ff4d98bdfc5ce9785ae084821e13 Mon Sep 17 00:00:00 2001 From: Eugene Auduchinok Date: Fri, 5 Jun 2026 17:24:30 +0200 Subject: [PATCH 3/3] RIDER-139580 Structure: don't try to appeand non-matched nodes GitOrigin-RevId: 065bfb396c63dad1a751cd21e84aee0e09c60660 --- .../src/CodeStructure/FSharpCodeStructure.fs | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) diff --git a/ReSharper.FSharp/src/FSharp/FSharp.Psi.Features/src/CodeStructure/FSharpCodeStructure.fs b/ReSharper.FSharp/src/FSharp/FSharp.Psi.Features/src/CodeStructure/FSharpCodeStructure.fs index 62dda006f4..129a577834 100644 --- a/ReSharper.FSharp/src/FSharp/FSharp.Psi.Features/src/CodeStructure/FSharpCodeStructure.fs +++ b/ReSharper.FSharp/src/FSharp/FSharp.Psi.Features/src/CodeStructure/FSharpCodeStructure.fs @@ -28,18 +28,11 @@ open JetBrains.Util [] [, typeof, typeof)>] type FSharpExtendedFileStructureLanguage() = - let filters: IStructureTreeElementFilter array = [| StructureTreeElementFilter() |] - interface IExtendedFileStructureLanguage with member this.IsValid(languageType) = isNotNull languageType && languageType.Is() - member this.GetFilters() = filters - -type StructureTreeElementFilter() = - interface IStructureTreeElementFilter with - member this.IsVisibleInStructureTree(element) = - not (element :? IFSharpGeneratedElement) + member this.AppendNonMatchedNodes = false [)>]