Skip to content
Merged
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
24 changes: 24 additions & 0 deletions vsintegration/src/FSharp.Editor/CommentUncommentService.fs
Original file line number Diff line number Diff line change
@@ -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
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

are all these namespaces needed?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

no idea. errors are not highlighted in vs 2015 on this project. Ionide highlight almost everything as errors...


[<Shared>]
[<ExportLanguageService(typeof<ICommentUncommentService>, 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
3 changes: 3 additions & 0 deletions vsintegration/src/FSharp.Editor/FSharp.Editor.fsproj
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,9 @@
<Compile Include="GoToDefinitionService.fs">
<Link>GoToDefinition\GoToDefinitionService.fs</Link>
</Compile>
<Compile Include="CommentUncommentService.fs">
<Link>BlockComment\CommentUncommentService.fs</Link>
</Compile>
<Compile Include="ContentType.fs" />
</ItemGroup>
<ItemGroup>
Expand Down