From b903b78912f3cd4f3a0858026674ac1856abe8b9 Mon Sep 17 00:00:00 2001 From: Michael Bottini Date: Fri, 22 Dec 2023 01:11:43 -0800 Subject: [PATCH] Fix ionide#209: Remove (* *) from brackets config language-configuration.json lets you define various pairs of brackets and braces for autoclosing, surrounding selected text with characters, and, as it turns out, dictating which brackets get colorized by the native bracket colorizer. As far as I can tell, putting the block comment brackets inside the `brackets` field is pointless. We color our comments green anyway, so the colors don't show anyway. It is true that F# provides support for nested comment blocks, but we aren't taking advantage of the color feature anyway (and I'm unsure if it's even possible to do so). The block comments should, however, remain in the other fields that control autocomplete and surrounding selected text. --- fsharp.syntaxtest/language-configuration.json | 1 - sample-code/SimpleTypes.fs | 6 +++++- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/fsharp.syntaxtest/language-configuration.json b/fsharp.syntaxtest/language-configuration.json index 52734c5..4edfa68 100644 --- a/fsharp.syntaxtest/language-configuration.json +++ b/fsharp.syntaxtest/language-configuration.json @@ -36,7 +36,6 @@ "brackets": [ ["(", ")"], - ["(*", "*)"], ["{", "}"], ["[", "]"], ["[|", "|]"], diff --git a/sample-code/SimpleTypes.fs b/sample-code/SimpleTypes.fs index 5a5dc38..a54c470 100644 --- a/sample-code/SimpleTypes.fs +++ b/sample-code/SimpleTypes.fs @@ -44,6 +44,11 @@ module Test = let b = "" let double = (*) 2 // *) was being captured as a comment + + // Both of these operators should have the same syntax highlighting, + // specifically the inflix multiplication operator. + let foldSum xs = Seq.fold (+) 0 xs + let foldProduct xs = Seq.fold (*) xs (** This block is colorized because markdown can set up his context. @@ -62,7 +67,6 @@ file as markdown *) let d = "" - (* Unbalanced comment, which turn everything after itself into comment **) let e = (* comment// *) "not a comment"