andreas.openEditorAtIndex(index: number)
Open editor/tab at given index. Negative indices are counted from the back.
andreas.focusTab(hint: string)
Focus tab by hint. Hints range [A-ZZ].
andreas.goToLine(line: number)
Go to line number.
andreas.selectTo(line: number)
Select from current location to specified line.
andreas.lineMiddle()
Move cursor to middle of the current line.
Text commands
andreas.getDocumentText(): string | null
Get document text.
andreas.getSelectedText(): string[] | null
Get selected text.
andreas.getDictationContext(): {before: string, after: string} | null
Get text before and after selection. Used for context sensitive dictation.
andreas.getClassName(): string | null
Get class name. Useful for inserting constructors in C++/Java.
andreas.getOpenTagName(): string | null
Get name for open tag. Useful to close tag in HTML/XML.
Git commands
andreas.getGitFileURL({ useSelection: boolean, useBranch: boolean }): string
Get URL to Git repository file webpage. Optionally include selected line numbers.
andreas.getGitRepoURL(): string
Get URL to Git repository webpage.
andreas.getGitIssuesURL(): string
Get URL to Git repository issues webpage.
andreas.getGitNewIssueURL(): string
Get URL to Git repository new issue webpage.
andreas.getGitPullRequestsURL(): string
Get URL to Git repository pull requests webpage.
Other commands
andreas.getSetting(section: string, defaultValue?: T): T | undefined
Get setting from vscode
andreas.setSetting(section: string, value: any)
Set setting for vscode
andreas.executeCommands(commands: string[])
Sequentially execute multiple commands. Useful for keybindings.
andreas.printCommands()
Print available commands.
Talon language features
Adds document formatter for Talon files.
Adds (go to) definitions for Talon actions, lists and captures.
Adds hover for Talon actions, lists and captures.
Adds code completion for Talon actions, lists and captures.
Disable formatting on save for Talon files
"[talon]": {
"editor.formatOnSave": false
}
Quick fix code actions
Convert line and block comments to JS/Java doc comments
Tree-sitter Query(.scm) language features
Adds document formatter for scm files.
Snippet(.snippet) language features
Adds syntax highlight for snippet files.
Adds document formatter for snippet files.
Talon command examples
Focus tab
tab {self.letter} [{self.letter}]:
user.run_rpc_command("andreas.focusTab", "{letter_1}{letter_2 or ''}")
Generate range
generate range [from <number_small>]:
user.run_rpc_command("andreas.generateRange", number_small or 1)