Language
Language =
object
Defined in: types.ts:51
Properties
Section titled “Properties”autoIndent?
Section titled “autoIndent?”
optional
autoIndent: [(selection
,value
,editor
) =>boolean
?, (selection
,value
,editor
) =>boolean
?]
Defined in: types.ts:67
Callbacks controlling the automatic indentation on new lines. First function should return whether indentation should be increased. Second function should return whether to add an extra line after the cursor.
comments?
Section titled “comments?”
optional
comments:CommentTokens
Defined in: types.ts:53
Comment tokens used by the language.
Methods
Section titled “Methods”autoCloseTags()?
Section titled “autoCloseTags()?”
optional
autoCloseTags(selection
,value
,editor
):undefined
|string
Defined in: types.ts:75
Function called when the user types >
. Intended to auto close tags.
Parameters
Section titled “Parameters”selection
Section titled “selection”string
editor
Section titled “editor”Returns
Section titled “Returns”undefined
| string
string which will get inserted behind the cursor.
getComments()?
Section titled “getComments()?”
optional
getComments(editor
,position
,value
):CommentTokens
Defined in: types.ts:61
Method called when a user executes a comment toggling command.
Parameters
Section titled “Parameters”editor
Section titled “editor”The editor the user is interacting with.
position
Section titled “position”number
Where in the code the comment is being toggled.
string
Current code in the editor.
Returns
Section titled “Returns”The comment tokens that should be used for this command.