Syntax highlighting for console

sql-parser
Thorsten Muerell 7 years ago
parent a07b3ccdba
commit 56704ac257

@ -143,10 +143,7 @@ export function activate(context: vscode.ExtensionContext) {
context.subscriptions.push(disposable, registration);
vscode.commands.registerCommand('selectConnection', (node: ConnectionNode) => {
vscode.window.showInformationMessage(`You want to change the connection to '${node.name}'. Sure?`, 'Yes')
.then( (selection) => {
if (selection == 'Yes') {
function changeSession(node: ConnectionNode) {
currentConnection = node;
statusBarItem.text = node.name;
if (dbSession) {
@ -154,7 +151,18 @@ export function activate(context: vscode.ExtensionContext) {
dbSession = null;
}
}
vscode.commands.registerCommand('selectConnection', (node: ConnectionNode) => {
if (!dbSession) {
changeSession(node)
} else {
vscode.window.showInformationMessage(`You want to change the connection to '${node.name}'. Sure?`, 'Yes')
.then( (selection) => {
if (selection == 'Yes') {
changeSession(node);
}
}, (reason) => {})
}
})
}

@ -19,6 +19,30 @@
<key>name</key>
<string>string.quoted</string>
</dict>
<dict>
<key>match</key>
<string>Query successful.</string>
<key>name</key>
<string>keyword</string>
</dict>
<dict>
<key>match</key>
<string>Exception.*</string>
<key>name</key>
<string>invalid.illegal</string>
</dict>
<dict>
<key>match</key>
<string>Errors found:.*</string>
<key>name</key>
<string>invalid.illegal</string>
</dict>
<dict>
<key>match</key>
<string>^\d+:.*</string>
<key>name</key>
<string>invalid.illegal</string>
</dict>
</array>
</dict>
</plist>
Loading…
Cancel
Save