Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions docs/release-notes/.VisualStudio/18.vNext.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
### Fixed

### Changed

* Rename "inline hints" to "inlay hints" in VS options for consistency with industry terminology. ([PR #19318](https://github.com/dotnet/fsharp/pull/19318))
8 changes: 4 additions & 4 deletions vsintegration/src/FSharp.Editor/FSharp.Editor.fsproj
Original file line number Diff line number Diff line change
Expand Up @@ -147,13 +147,13 @@
<Compile Include="AutomaticCompletion\BraceCompletionSessionProvider.fsi" />
<Compile Include="AutomaticCompletion\BraceCompletionSessionProvider.fs" />
<Compile Include="Hints\Hints.fs" />
<Compile Include="Hints\InlineTypeHints.fs" />
<Compile Include="hints\InlineReturnTypeHints.fs" />
<Compile Include="Hints\InlineParameterNameHints.fs" />
<Compile Include="Hints\InlayTypeHints.fs" />
<Compile Include="Hints\InlayReturnTypeHints.fs" />
<Compile Include="Hints\InlayParameterNameHints.fs" />
<Compile Include="Hints\HintService.fs" />
<Compile Include="Hints\NativeToRoslynHintConverter.fs" />
<Compile Include="Hints\OptionParser.fs" />
<Compile Include="Hints\FSharpInlineHintsService.fs" />
<Compile Include="Hints\FSharpInlayHintsService.fs" />
</ItemGroup>

<ItemGroup>
Expand Down
6 changes: 3 additions & 3 deletions vsintegration/src/FSharp.Editor/FSharp.Editor.resx
Original file line number Diff line number Diff line change
Expand Up @@ -222,10 +222,10 @@ Enable fast find references &amp; rename (restart required)</value>
Show structure guidelines for F# code;
Outlining;
Show outlining and collapsible nodes for F# code;
Inline hints;
Display inline type hints (preview);
Inlay hints;
Display inlay type hints (preview);
Display return type hints (preview);
Display inline parameter name hints (preview);
Display inlay parameter name hints (preview);
Use Transparent Compiler (experimental);
Live Buffers;
Use live (unsaved) buffers for analysis</value>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,11 +12,11 @@ open System.Threading.Tasks

// So the Roslyn interface is called IFSharpInlineHintsService
// but our implementation is called just HintsService.
// That's because we'll likely use this API for things other than inline hints,
// That's because we'll likely use this API for things other than inlay hints,
// e.g. signature hints above the line, pipeline hints on the side and so on.

[<Export(typeof<IFSharpInlineHintsService>)>]
type internal FSharpInlineHintsService [<ImportingConstructor>] (settings: EditorOptions) =
type internal FSharpInlayHintsService [<ImportingConstructor>] (settings: EditorOptions) =

static let userOpName = "Hints"

Expand Down
8 changes: 4 additions & 4 deletions vsintegration/src/FSharp.Editor/Hints/HintService.fs
Original file line number Diff line number Diff line change
Expand Up @@ -22,15 +22,15 @@ module HintService =
let getHintsPerKind hintKind =
match hintKind, symbol with
| HintKind.TypeHint, (:? FSharpMemberOrFunctionOrValue as symbol) ->
symbolUses |> Seq.collect (InlineTypeHints(parseResults, symbol)).GetHints
symbolUses |> Seq.collect (InlayTypeHints(parseResults, symbol)).GetHints
| HintKind.ReturnTypeHint, (:? FSharpMemberOrFunctionOrValue as symbol) ->
symbolUses |> Seq.collect (InlineReturnTypeHints(parseResults, symbol).GetHints)
symbolUses |> Seq.collect (InlayReturnTypeHints(parseResults, symbol).GetHints)
| HintKind.ParameterNameHint, (:? FSharpMemberOrFunctionOrValue as symbol) ->
symbolUses
|> Seq.collect (InlineParameterNameHints(parseResults).GetHintsForMemberOrFunctionOrValue sourceText symbol)
|> Seq.collect (InlayParameterNameHints(parseResults).GetHintsForMemberOrFunctionOrValue sourceText symbol)
| HintKind.ParameterNameHint, (:? FSharpUnionCase as symbol) ->
symbolUses
|> Seq.collect (InlineParameterNameHints(parseResults).GetHintsForUnionCase sourceText symbol)
|> Seq.collect (InlayParameterNameHints(parseResults).GetHintsForUnionCase sourceText symbol)
| _ -> []

hintKinds |> Set.toList |> List.map getHintsPerKind
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ open FSharp.Compiler.Text
open Hints
open CancellableTasks

type InlineParameterNameHints(parseResults: FSharpParseFileResults) =
type InlayParameterNameHints(parseResults: FSharpParseFileResults) =

let getTooltip (symbol: FSharpSymbol) _ =
cancellableTask {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ open FSharp.Compiler.Text
open Hints
open CancellableTasks

type InlineReturnTypeHints(parseFileResults: FSharpParseFileResults, symbol: FSharpMemberOrFunctionOrValue) =
type InlayReturnTypeHints(parseFileResults: FSharpParseFileResults, symbol: FSharpMemberOrFunctionOrValue) =

let getHintParts (symbolUse: FSharpSymbolUse) =
symbol.GetReturnTypeLayout symbolUse.DisplayContext
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ open FSharp.Compiler.Text.Position
open Hints
open CancellableTasks

type InlineTypeHints(parseResults: FSharpParseFileResults, symbol: FSharpMemberOrFunctionOrValue) =
type InlayTypeHints(parseResults: FSharpParseFileResults, symbol: FSharpMemberOrFunctionOrValue) =

let getHintParts (symbol: FSharpMemberOrFunctionOrValue) (symbolUse: FSharpSymbolUse) =

Expand Down
6 changes: 3 additions & 3 deletions vsintegration/src/FSharp.Editor/Hints/OptionParser.fs
Original file line number Diff line number Diff line change
Expand Up @@ -10,12 +10,12 @@ module OptionParser =
let inline getHintKinds options =
Set
[
if options.IsInlineTypeHintsEnabled then
if options.IsInlayTypeHintsEnabled then
HintKind.TypeHint

if options.IsInlineParameterNameHintsEnabled then
if options.IsInlayParameterNameHintsEnabled then
HintKind.ParameterNameHint

if options.IsInlineReturnTypeHintsEnabled then
if options.IsInlayReturnTypeHintsEnabled then
HintKind.ReturnTypeHint
]
Original file line number Diff line number Diff line change
Expand Up @@ -101,13 +101,13 @@ type internal FSharpWorkspaceServiceFactory
let enableFastFindReferences =
editorOptions.LanguageServicePerformance.EnableFastFindReferencesAndRename

let isInlineParameterNameHintsEnabled =
editorOptions.Advanced.IsInlineParameterNameHintsEnabled
let isInlayParameterNameHintsEnabled =
editorOptions.Advanced.IsInlayParameterNameHintsEnabled

let isInlineTypeHintsEnabled = editorOptions.Advanced.IsInlineTypeHintsEnabled
let isInlayTypeHintsEnabled = editorOptions.Advanced.IsInlayTypeHintsEnabled

let isInlineReturnTypeHintsEnabled =
editorOptions.Advanced.IsInlineReturnTypeHintsEnabled
let isInlayReturnTypeHintsEnabled =
editorOptions.Advanced.IsInlayReturnTypeHintsEnabled

let enablePartialTypeChecking =
editorOptions.LanguageServicePerformance.EnablePartialTypeChecking
Expand Down Expand Up @@ -139,9 +139,9 @@ type internal FSharpWorkspaceServiceFactory
nameof enableParallelReferenceResolution, enableParallelReferenceResolution
nameof enableInMemoryCrossProjectReferences, enableInMemoryCrossProjectReferences
nameof enableFastFindReferences, enableFastFindReferences
nameof isInlineParameterNameHintsEnabled, isInlineParameterNameHintsEnabled
nameof isInlineTypeHintsEnabled, isInlineTypeHintsEnabled
nameof isInlineReturnTypeHintsEnabled, isInlineReturnTypeHintsEnabled
nameof isInlayParameterNameHintsEnabled, isInlayParameterNameHintsEnabled
nameof isInlayTypeHintsEnabled, isInlayTypeHintsEnabled
nameof isInlayReturnTypeHintsEnabled, isInlayReturnTypeHintsEnabled
nameof enablePartialTypeChecking, enablePartialTypeChecking
nameof keepAllBackgroundResolutions, keepAllBackgroundResolutions
nameof keepAllBackgroundSymbolUses, keepAllBackgroundSymbolUses
Expand Down
12 changes: 6 additions & 6 deletions vsintegration/src/FSharp.Editor/Options/EditorOptions.fs
Original file line number Diff line number Diff line change
Expand Up @@ -115,9 +115,9 @@ type AdvancedOptions =
{
IsBlockStructureEnabled: bool
IsOutliningEnabled: bool
IsInlineTypeHintsEnabled: bool
IsInlineParameterNameHintsEnabled: bool
IsInlineReturnTypeHintsEnabled: bool
IsInlayTypeHintsEnabled: bool
IsInlayParameterNameHintsEnabled: bool
IsInlayReturnTypeHintsEnabled: bool
IsUseLiveBuffersEnabled: bool
UseTransparentCompiler: bool
TransparentCompilerSnapshotReuse: bool
Expand All @@ -129,9 +129,9 @@ type AdvancedOptions =
{
IsBlockStructureEnabled = true
IsOutliningEnabled = true
IsInlineTypeHintsEnabled = false
IsInlineParameterNameHintsEnabled = false
IsInlineReturnTypeHintsEnabled = false
IsInlayTypeHintsEnabled = false
IsInlayParameterNameHintsEnabled = false
IsInlayReturnTypeHintsEnabled = false
UseTransparentCompiler = false
TransparentCompilerSnapshotReuse = false
IsUseLiveBuffersEnabled = true
Expand Down
6 changes: 3 additions & 3 deletions vsintegration/src/FSharp.Editor/xlf/FSharp.Editor.cs.xlf

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 3 additions & 3 deletions vsintegration/src/FSharp.Editor/xlf/FSharp.Editor.de.xlf

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 3 additions & 3 deletions vsintegration/src/FSharp.Editor/xlf/FSharp.Editor.es.xlf

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 3 additions & 3 deletions vsintegration/src/FSharp.Editor/xlf/FSharp.Editor.fr.xlf

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 3 additions & 3 deletions vsintegration/src/FSharp.Editor/xlf/FSharp.Editor.it.xlf

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 3 additions & 3 deletions vsintegration/src/FSharp.Editor/xlf/FSharp.Editor.ja.xlf

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 3 additions & 3 deletions vsintegration/src/FSharp.Editor/xlf/FSharp.Editor.ko.xlf

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 3 additions & 3 deletions vsintegration/src/FSharp.Editor/xlf/FSharp.Editor.pl.xlf

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 3 additions & 3 deletions vsintegration/src/FSharp.Editor/xlf/FSharp.Editor.pt-BR.xlf

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 3 additions & 3 deletions vsintegration/src/FSharp.Editor/xlf/FSharp.Editor.ru.xlf

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 3 additions & 3 deletions vsintegration/src/FSharp.Editor/xlf/FSharp.Editor.tr.xlf

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
Expand Up @@ -24,14 +24,14 @@
<CheckBox x:Name="toggleOutlining" IsChecked="{Binding IsOutliningEnabled}"
Content="{x:Static local:Strings.Show_Outlining}"/>
</GroupBox>
<GroupBox Header="{x:Static local:Strings.Inline_Hints}">
<GroupBox Header="{x:Static local:Strings.Inlay_Hints}">
<StackPanel>
<CheckBox x:Name="toggleInlineTypeHints" IsChecked="{Binding IsInlineTypeHintsEnabled}"
Content="{x:Static local:Strings.Show_Inline_Type_Hints}"/>
<CheckBox x:Name="toggleReturnTypeHints" IsChecked="{Binding IsInlineReturnTypeHintsEnabled}"
<CheckBox x:Name="toggleInlayTypeHints" IsChecked="{Binding IsInlayTypeHintsEnabled}"
Content="{x:Static local:Strings.Show_Inlay_Type_Hints}"/>
<CheckBox x:Name="toggleReturnTypeHints" IsChecked="{Binding IsInlayReturnTypeHintsEnabled}"
Content="{x:Static local:Strings.Show_Return_Type_Hints}"/>
<CheckBox x:Name="toggleParameterNameHints" IsChecked="{Binding IsInlineParameterNameHintsEnabled}"
Content="{x:Static local:Strings.Show_Inline_Parameter_Name_Hints}"/>
<CheckBox x:Name="toggleParameterNameHints" IsChecked="{Binding IsInlayParameterNameHintsEnabled}"
Content="{x:Static local:Strings.Show_Inlay_Parameter_Name_Hints}"/>
</StackPanel>
</GroupBox>
<GroupBox Header="{x:Static local:Strings.LiveBuffers}">
Expand Down
Loading
Loading