diff --git a/vsintegration/src/FSharp.Editor/CommentUncommentService.fs b/vsintegration/src/FSharp.Editor/CommentUncommentService.fs new file mode 100644 index 00000000000..af292f54f8e --- /dev/null +++ b/vsintegration/src/FSharp.Editor/CommentUncommentService.fs @@ -0,0 +1,24 @@ +namespace Microsoft.VisualStudio.FSharp.Editor + +open System.ComponentModel.Composition +open Microsoft.CodeAnalysis.Editor +open Microsoft.CodeAnalysis.Shared.Extensions +open Microsoft.CodeAnalysis.Text +open Microsoft.CodeAnalysis.Text.Shared.Extensions +open Microsoft.VisualStudio.Text +open Microsoft.VisualStudio.Text.Operations +open Microsoft.VisualStudio.Utilities +open Microsoft.CodeAnalysis.Editor.Implementation.CommentSelection +open Microsoft.CodeAnalysis.Host.Mef +open Microsoft.CodeAnalysis +open System.Composition + +[] +[, FSharpCommonConstants.FSharpLanguageName)>] +type CommentUncommentService() = + interface ICommentUncommentService with + member this.SingleLineCommentString = "//" + member this.SupportsBlockComment = true + member this.BlockCommentStartString = "(*" + member this.BlockCommentEndString = "*)" + member this.Format(document, _changes, _cancellationToken) = document \ No newline at end of file diff --git a/vsintegration/src/FSharp.Editor/FSharp.Editor.fsproj b/vsintegration/src/FSharp.Editor/FSharp.Editor.fsproj index 39e8020135c..f874ffcc9f2 100644 --- a/vsintegration/src/FSharp.Editor/FSharp.Editor.fsproj +++ b/vsintegration/src/FSharp.Editor/FSharp.Editor.fsproj @@ -65,6 +65,9 @@ GoToDefinition\GoToDefinitionService.fs + + BlockComment\CommentUncommentService.fs +