Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
0 parents
commit b7d1d89
Showing
12 changed files
with
207 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
node_modules | ||
*.vsix | ||
vsc-extension-quickstart.md |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
// A launch configuration that launches the extension inside a new window | ||
// Use IntelliSense to learn about possible attributes. | ||
// Hover to view descriptions of existing attributes. | ||
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387 | ||
{ | ||
"version": "0.2.0", | ||
"configurations": [ | ||
{ | ||
"name": "Extension", | ||
"type": "extensionHost", | ||
"request": "launch", | ||
"runtimeExecutable": "${execPath}", | ||
"args": [ | ||
"--extensionDevelopmentPath=${workspaceFolder}" | ||
] | ||
} | ||
] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
.vscode/** | ||
.vscode-test/** | ||
.gitignore | ||
vsc-extension-quickstart.md | ||
examples/** |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
## 1.0.0 | ||
|
||
- Initial release |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
Copyright 2016 Josef Sin | ||
|
||
Licensed under the Apache License, Version 2.0 (the "License"); | ||
you may not use this file except in compliance with the License. | ||
You may obtain a copy of the License at | ||
|
||
http://www.apache.org/licenses/LICENSE-2.0 | ||
|
||
Unless required by applicable law or agreed to in writing, software | ||
distributed under the License is distributed on an "AS IS" BASIS, | ||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
See the License for the specific language governing permissions and | ||
limitations under the License. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
# Kusto Language Support | ||
|
||
Support for the Azure Log Analytics (Kusto) language syntax in Visual Studio Code. | ||
|
||
## Highlighting | ||
|
||
Adds highlighting support for Azure Log Analytics (Kusto) (`.csl` and `.kusto`). This syntax is based on [TextmateBundleInstaller](https://github.com/madskristensen/TextmateBundleInstaller) - [Kusto syntax](https://github.com/madskristensen/TextmateBundleInstaller/blob/master/src/Bundles/kusto/Syntaxes/kusto.plist). | ||
|
||
![Azure Log Analytics (Kusto) language syntax](/images/screenshot1.png?raw=true) | ||
|
||
## Bugs | ||
|
||
If you happen to see bugs or have suggestions for improvements visit the [issue section](https://github.com/josin/kusto-syntax-highlighting/issues) of the [repository](https://github.com/josin/kusto-syntax-highlighting). |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
StormEvents | ||
| where isnotempty(EndLocation) | ||
| summarize event_count=count() by EndLocation | ||
| top 10 by event_count | ||
| render columnchart |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
let Events = MyLogTable | where ... ; | ||
|
||
Events | ||
| where Name == "Start" | ||
| project Name, City, SessionId, StartTime=timestamp | ||
| join (Events | ||
| where Name="Stop" | ||
| project StopTime=timestamp, SessionId) | ||
on activityId | ||
| project City, SessionId, StartTime, StopTime, Duration = StopTime - StartTime |
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
{ | ||
"comments": { | ||
// symbol used for single line comment. Remove this entry if your language does not support line comments | ||
"lineComment": "//", | ||
// symbols used for start and end a block comment. Remove this entry if your language does not support block comments | ||
"blockComment": [ "/*", "*/" ] | ||
}, | ||
// symbols used as brackets | ||
"brackets": [ | ||
["{", "}"], | ||
["[", "]"], | ||
["(", ")"] | ||
], | ||
// symbols that are auto closed when typing | ||
"autoClosingPairs": [ | ||
["{", "}"], | ||
["[", "]"], | ||
["(", ")"], | ||
["\"", "\""], | ||
["'", "'"] | ||
], | ||
// symbols that that can be used to surround a selection | ||
"surroundingPairs": [ | ||
["{", "}"], | ||
["[", "]"], | ||
["(", ")"], | ||
["\"", "\""], | ||
["'", "'"] | ||
] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
{ | ||
"name": "kusto-syntax-highlighting", | ||
"displayName": "Azure Log Analytics (Kusto) Syntax Highlighting", | ||
"description": "Support for the Azure Log Analytics (Kusto) language syntax in Visual Studio Code.", | ||
"version": "0.0.1", | ||
"publisher": "josin", | ||
"homepage": "https://github.com/josin/kusto-syntax-highlighting", | ||
"repository": { | ||
"type": "git", | ||
"url": "https://github.com/josin/kusto-syntax-highlighting" | ||
}, | ||
"bugs": { | ||
"url": "https://github.com/josin/kusto-syntax-highlighting/issues" | ||
}, | ||
"engines": { | ||
"vscode": "^1.21.0" | ||
}, | ||
"categories": [ | ||
"Languages" | ||
], | ||
"keywords": [ | ||
"kusto", | ||
"azure", | ||
"language", | ||
"highlight", | ||
"syntax" | ||
], | ||
"license": "Apache-2.0", | ||
"contributes": { | ||
"languages": [{ | ||
"id": "kusto", | ||
"aliases": ["Kusto", "kusto"], | ||
"extensions": [".csl", ".kusto"], | ||
"configuration": "./language-configuration.json" | ||
}], | ||
"grammars": [{ | ||
"language": "kusto", | ||
"scopeName": "source.kusto", | ||
"path": "./syntaxes/kusto.tmLanguage" | ||
}] | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,65 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> | ||
<plist version="1.0"> | ||
<dict> | ||
<key>scopeName</key> | ||
<string>source.kusto</string> | ||
|
||
<key>fileTypes</key> | ||
<array> | ||
<string>csl</string> | ||
<string>kusto</string> | ||
</array> | ||
|
||
<key>name</key> | ||
<string>kusto file</string> | ||
|
||
<key>patterns</key> | ||
<array> | ||
<dict> | ||
<key>match</key> | ||
<string>\b(let|count|ingestion_time|and|or|max|min|iff|isempty|isnotempty|log|sum|extract|now|false|true|makeset|makelist|any|arg_max|arg_min|any|dcount|sumif|countif|avg|materialize|pack|database|strcat|translate|substring|tostring|toscalar|strlen|contains|in|startswith|endswith|split|typeof)\b</string> | ||
<key>name</key> | ||
<string>keyword.functions.kusto</string> | ||
</dict> | ||
<dict> | ||
<key>match</key> | ||
<string>\b(where|summarize|extend|mvexpand|project|sort|project|-away|join|union|limit|order|sort|top|print|datatable)\b</string> | ||
<key>name</key> | ||
<string>keyword.control.kusto</string> | ||
</dict> | ||
<dict> | ||
<key>match</key> | ||
<string>".*?"</string> | ||
<key>name</key> | ||
<string>string.constant.double</string> | ||
</dict> | ||
<dict> | ||
<key>match</key> | ||
<string>'.*?'</string> | ||
<key>name</key> | ||
<string>string.constant.single</string> | ||
</dict> | ||
<dict> | ||
<key>match</key> | ||
<string>//.*</string> | ||
<key>name</key> | ||
<string>comment</string> | ||
</dict> | ||
<dict> | ||
<key>match</key> | ||
<string>\{.*?\}</string> | ||
<key>name</key> | ||
<string>string.variable</string> | ||
</dict> | ||
<dict> | ||
<key>match</key> | ||
<string>\b((0(x|X)[0-9a-fA-F]*)|(([0-9]+\.?[0-9]*)|(\.[0-9]+))((e|E)(\+|-)?[0-9]+)?)(L|l|UL|ul|u|U|F|f|ll|LL|ull|ULL)?\b</string> | ||
<key>name</key> | ||
<string>constant.numeric</string> | ||
</dict> | ||
</array> | ||
<key>uuid</key> | ||
<string>FF0550E0-3A29-11E3-AA6E-0800200C9B77</string> | ||
</dict> | ||
</plist> |