Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Color code Autoit output window #80

Merged
merged 2 commits into from
Apr 7, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
50 changes: 49 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 59,13 @@
".au3"
],
"configuration": "./syntaxes/autoit-language-configuration.json"
},
{
"id": "vscode-autoit-output",
"aliases": [],
"mimetypes": [
"text/x-code-output"
]
}
],
"menus": {
Expand Down Expand Up @@ -180,7 187,12 @@
"language": "autoit",
"scopeName": "source.autoit",
"path": "./syntaxes/autoit.tmLanguage"
}
},
{
"language": "vscode-autoit-output",
"scopeName": "source.vscode_autoit_output",
"path": "syntaxes/vscode-autoit-output.tmLanguage.json"
}
],
"snippets": [
{
Expand Down Expand Up @@ -327,6 339,42 @@
"description": "The name that will be added as Author when Insert Function Header is used"
}
}
},
"configurationDefaults": {
"editor.tokenColorCustomizations": {
"textMateRules": [
{
"scope": "vscode-autoit-output-blue",
"settings": {
"foreground": "#3d85c6"
}
},
{
"scope": "vscode-autoit-output-red",
"settings": {
"foreground": "#f44336"
}
},
{
"scope": "vscode-autoit-output-green",
"settings": {
"foreground": "#6aa84f"
}
},
{
"scope": "vscode-autoit-output-orange",
"settings": {
"foreground": "#f6b26b"
}
},
{
"scope": "vscode-autoit-output-pink",
"settings": {
"foreground": "#f4cccc"
}
}
]
}
}
},
"scripts": {
Expand Down
2 changes: 1 addition & 1 deletion src/ai_commands.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 8,7 @@ const configuration = workspace.getConfiguration('autoit');
// Executable paths
const { aiPath, wrapperPath, tidyPath, checkPath, helpPath, infoPath, kodaPath } = configuration;

const aiOut = window.createOutputChannel('AutoIt');
const aiOut = window.createOutputChannel('AutoIt', 'vscode-autoit-output');

let runner;

Expand Down
2 changes: 1 addition & 1 deletion src/extension.js
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 30,7 @@ const checkAutoItCode = document => {

if (!fs.existsSync(checkPath)) {
vscode.window.showErrorMessage(
'Inavlid Check Path! Please review AutoIt settings (Check Path in UI, autoit.checkPath in JSON)',
'Invalid Check Path! Please review AutoIt settings (Check Path in UI, autoit.checkPath in JSON)',
);
return;
}
Expand Down
23 changes: 23 additions & 0 deletions syntaxes/vscode-autoit-output.tmLanguage.json
Original file line number Diff line number Diff line change
@@ -0,0 1,23 @@
{
"$schema": "https://raw.githubusercontent.com/martinring/tmlanguage/master/tmlanguage.json",
"name": "vscode-autoit-output",
"scopeName": "source.vscode_autoit_output",
"patterns": [
{
"match": "^[>].*",
"name": "vscode-autoit-output-blue"
},
{
"match": "^[ ].*",
"name": "vscode-autoit-output-green"
},
{
"match": "^[-].*",
"name": "vscode-autoit-output-orange"
},
{
"match": "^[!].*",
"name": "vscode-autoit-output-red"
}
]
}