You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: code-input.d.ts
+15-1Lines changed: 15 additions & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -76,6 +76,19 @@ export namespace plugins {
76
76
constructor();
77
77
}
78
78
79
+
/**
80
+
* Automatically closes pairs of brackets/quotes/other syntaxes in code, but also lets you choose the brackets this
81
+
* is activated for.
82
+
* Files: auto-close-brackets.js
83
+
*/
84
+
classAutoCloseBracketsextendsPlugin{
85
+
/**
86
+
* Create an auto-close brackets plugin to pass into a template
87
+
* @param {Object} bracketPairs Opening brackets mapped to closing brackets, default and example {"(": ")", "[": "]", "{": "}", '"': '"'}. All brackets must only be one character.
88
+
*/
89
+
constructor(bracketPairs: Object);
90
+
}
91
+
79
92
/**
80
93
* Display a popup under the caret using the text in the code-input element. This works well with autocomplete suggestions.
81
94
* Files: autocomplete.js / autocomplete.css
@@ -137,8 +150,9 @@ export namespace plugins {
137
150
* Create an indentation plugin to pass into a template
138
151
* @param {Boolean} defaultSpaces Should the Tab key enter spaces rather than tabs? Defaults to false.
139
152
* @param {Number} numSpaces How many spaces is each tab character worth? Defaults to 4.
153
+
* @param {Object} bracketPairs Opening brackets mapped to closing brackets, default and example {"(": ")", "[": "]", "{": "}"}. All brackets must only be one character, and this can be left as null to remove bracket-based indentation behaviour.
Adds indentation using the `Tab` key, and auto-indents after a newline, as well as making it possible to indent/unindent multiple lines using Tab/Shift+Tab. **Supports tab characters and custom numbers of spaces as indentation.**
47
+
Add indentation using the `Tab` key, and auto-indents after a newline, as well as making it possible to indent/unindent multiple lines using Tab/Shift+Tab. **Supports tab characters and custom numbers of spaces as indentation, as well as (optionally) brackets typed affecting indentation.**
bracketsOpenedStack=[];// Each item [closing bracket string, opening bracket location] Innermost at right so can know which brackets should be ignored when retyped
9
+
10
+
/**
11
+
* Create an auto-close brackets plugin to pass into a template
12
+
* @param {Object} bracketPairs Opening brackets mapped to closing brackets, default and example {"(": ")", "[": "]", "{": "}", '"': '"'}. All brackets must only be one character.
* Create a go-to-line command plugin to pass into a template
9
10
* @param {boolean} useCtrlG Should Ctrl+G be overriden for go-to-line functionality? If not, you can trigger it yourself using (instance of this plugin)`.showPrompt(code-input element)`.
bracketPairs=null;// No bracket-auto-indentation used
9
10
indentation="\t";
10
11
indentationNumChars=1;
11
12
12
13
/**
13
14
* Create an indentation plugin to pass into a template
14
15
* @param {Boolean} defaultSpaces Should the Tab key enter spaces rather than tabs? Defaults to false.
15
16
* @param {Number} numSpaces How many spaces is each tab character worth? Defaults to 4.
17
+
* @param {Object} bracketPairs Opening brackets mapped to closing brackets, default and example {"(": ")", "[": "]", "{": "}"}. All brackets must only be one character, and this can be left as null to remove bracket-based indentation behaviour.
0 commit comments