Commit d42ce16
committed
Add bracket indentation semantics to (* *)
Background: ionide/ionide-fsgrammar#209 and ionide/ionide-fsgrammar#210
This comes from a comment regarding a pull request that I made on the
ionide-fsgrammar repository, which removes the `(* *)` bracket pair
from the "brackets" field of language-configuration.json. One issue
with doing this is that we lose the bracket-like indentation that
VSCode provides by default for all bracket pairs.
Since I'd like to remove the block comment brackets from the
`language-configuration.json` file, this pull request re-adds
the same semantics to the indentation rules.
In other words, when I hit Enter in the following configuration,
cursor location represented by the white block:
(*█*)
It should indent the cursor and then put the `*)` on the next line
with the same indentation level as the `(*` as follows:
(*
█
*)
---
When I hit Enter with an unaccompanied `(*`:
(*█
It should simply indent as follows:
(*
█
---
Lastly, an unaccompanied `*)` should outdent. That is,
*)█
should become
*)█1 parent b0d2ebe commit d42ce16
1 file changed
+2
-2
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
12 | 12 | | |
13 | 13 | | |
14 | 14 | | |
15 | | - | |
| 15 | + | |
16 | 16 | | |
17 | 17 | | |
18 | | - | |
| 18 | + | |
19 | 19 | | |
20 | 20 | | |
21 | 21 | | |
| |||
0 commit comments