@@ -50,19 +50,34 @@ export function activate(context: vscode.ExtensionContext): void {
50
50
[ '(' , ')' ] ,
51
51
] ,
52
52
53
- __electricCharacterSupport : {
54
- docComment : { scope : 'comment.documentation' , open : '/**' , lineStart : ' * ' , close : ' */' }
55
- } ,
56
-
57
- __characterPairSupport : {
58
- autoClosingPairs : [
59
- { open : '{' , close : '}' } ,
60
- { open : '[' , close : ']' } ,
61
- { open : '(' , close : ')' } ,
62
- { open : '"' , close : '"' , notIn : [ 'string' ] } ,
63
- { open : '\'' , close : '\'' , notIn : [ 'string' , 'comment' ] }
64
- ]
65
- }
53
+ onEnterRules : [
54
+ {
55
+ // e.g. /** | */
56
+ beforeText : / ^ \s * \/ \* \* (? ! \/ ) ( [ ^ \* ] | \* (? ! \/ ) ) * $ / ,
57
+ afterText : / ^ \s * \* \/ $ / ,
58
+ action : { indentAction : IndentAction . IndentOutdent , appendText : ' * ' }
59
+ } ,
60
+ {
61
+ // e.g. /** ...|
62
+ beforeText : / ^ \s * \/ \* \* (? ! \/ ) ( [ ^ \* ] | \* (? ! \/ ) ) * $ / ,
63
+ action : { indentAction : IndentAction . None , appendText : ' * ' }
64
+ } ,
65
+ {
66
+ // e.g. * ...|
67
+ beforeText : / ^ ( \t | ( \ \ ) ) * \ \* ( \ ( [ ^ \* ] | \* (? ! \/ ) ) * ) ? $ / ,
68
+ action : { indentAction : IndentAction . None , appendText : '* ' }
69
+ } ,
70
+ {
71
+ // e.g. */|
72
+ beforeText : / ^ ( \t | ( \ \ ) ) * \ \* \/ \s * $ / ,
73
+ action : { indentAction : IndentAction . None , removeText : 1 }
74
+ } ,
75
+ {
76
+ // e.g. *-----*/|
77
+ beforeText : / ^ ( \t | ( \ \ ) ) * \ \* [ ^ / ] * \* \/ \s * $ / ,
78
+ action : { indentAction : IndentAction . None , removeText : 1 }
79
+ }
80
+ ]
66
81
} ) ;
67
82
68
83
// Create the logger
0 commit comments