Skip to content

Commit

Permalink
Fix ionide#209: Remove (* *) from brackets config
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
mbottini committed Dec 22, 2023
1 parent 7d029a4 commit b903b78
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
1 change: 0 additions & 1 deletion fsharp.syntaxtest/language-configuration.json
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,6 @@

"brackets": [
["(", ")"],
["(*", "*)"],
["{", "}"],
["[", "]"],
["[|", "|]"],
Expand Down
6 changes: 5 additions & 1 deletion sample-code/SimpleTypes.fs
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand All @@ -62,7 +67,6 @@ file as markdown
*)
let d = ""


(* Unbalanced comment, which turn everything after itself into comment **)
let e = (* comment// *) "not a comment"

Expand Down

0 comments on commit b903b78

Please sign in to comment.