Skip to content

Commit

Permalink
Add Overpass QL (#6709)
Browse files Browse the repository at this point in the history
* add OverpassQL as a language

* fix typo
  • Loading branch information
k-yle committed Jun 7, 2024
1 parent c808119 commit 6c26c74
Show file tree
Hide file tree
Showing 8 changed files with 434 additions and 0 deletions.
3 changes: 3 additions & 0 deletions .gitmodules
Original file line number Diff line number Diff line change
Expand Up @@ -1359,6 +1359,9 @@
[submodule "vendor/grammars/vscode_mikrotik_routeros_script"]
path = vendor/grammars/vscode_mikrotik_routeros_script
url = https://github.com/devMikeUA/vscode_mikrotik_routeros_script.git
[submodule "vendor/grammars/vscodium-overpassql-syntax"]
path = vendor/grammars/vscodium-overpassql-syntax
url = https://github.com/tqdv/vscodium-overpassql-syntax.git
[submodule "vendor/grammars/vue-syntax-highlight"]
path = vendor/grammars/vue-syntax-highlight
url = https://github.com/vuejs/vue-syntax-highlight
Expand Down
2 changes: 2 additions & 0 deletions grammars.yml
Original file line number Diff line number Diff line change
Expand Up @@ -1241,6 +1241,8 @@ vendor/grammars/vscode_cobol:
- source.utreport
vendor/grammars/vscode_mikrotik_routeros_script:
- source.rsc
vendor/grammars/vscodium-overpassql-syntax:
- source.overpassql
vendor/grammars/vue-syntax-highlight:
- text.html.vue
vendor/grammars/wdl-sublime-syntax-highlighter:
Expand Down
9 changes: 9 additions & 0 deletions lib/linguist/languages.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4997,6 +4997,15 @@ Org:
tm_scope: none
ace_mode: text
language_id: 267
OverpassQL:
type: programming
color: "#cce2aa"
wrap: true
extensions:
- ".overpassql"
tm_scope: source.overpassql
ace_mode: text
language_id: 689079655
Ox:
type: programming
extensions:
Expand Down
18 changes: 18 additions & 0 deletions samples/OverpassQL/complex.overpassql
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
[out:csv(
::"type",
::"id",
name,
network,
"network:wikidata"
)];

( node[noname=yes]; ) -> .var1;

(
node.var1[!name];
rel(bn.var1:"outer");
) -> ._;

(._; >;); // recurse

out skel qt;
17 changes: 17 additions & 0 deletions samples/OverpassQL/simple.overpassql
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
// Example comment

/**
* Multiline comment
*/

[out:json][timeout:25];
{{geocodeArea:Australia}}->.bbox;

(
way["highway"="motorway"](area.bbox);
nwr[highway="motorway"][surface!=paved](1, 2, 3, 4);
rel(bn.a)[highway~motorway]({{bbox}});
);

>;
out meta;
1 change: 1 addition & 0 deletions vendor/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -405,6 +405,7 @@ This is a list of grammars that Linguist selects to provide syntax highlighting
- **OpenStep Property List:** [atom/language-property-list](https://github.com/atom/language-property-list)
- **OpenType Feature File:** [Alhadis/language-fontforge](https://github.com/Alhadis/language-fontforge)
- **Option List:** [Alhadis/language-etc](https://github.com/Alhadis/language-etc)
- **OverpassQL:** [tqdv/vscodium-overpassql-syntax](https://github.com/tqdv/vscodium-overpassql-syntax)
- **Ox:** [andreashetland/sublime-text-ox](https://github.com/andreashetland/sublime-text-ox)
- **Oz:** [eregon/oz-tmbundle](https://github.com/eregon/oz-tmbundle)
- **P4:** [TakeshiTseng/atom-language-p4](https://github.com/TakeshiTseng/atom-language-p4)
Expand Down
1 change: 1 addition & 0 deletions vendor/grammars/vscodium-overpassql-syntax
Loading

0 comments on commit 6c26c74

Please sign in to comment.