Skip to content

Commit

Permalink
Add OverpassQL (#7197)
Browse files Browse the repository at this point in the history
  • Loading branch information
nickswalker authored Jan 9, 2025
1 parent 5293d68 commit 07486a1
Show file tree
Hide file tree
Showing 8 changed files with 437 additions and 1 deletion.
3 changes: 3 additions & 0 deletions .gitmodules
Original file line number Diff line number Diff line change
Expand Up @@ -968,6 +968,9 @@
[submodule "vendor/grammars/openscad.tmbundle"]
path = vendor/grammars/openscad.tmbundle
url = https://github.com/tbuser/openscad.tmbundle
[submodule "vendor/grammars/overpassql-tmlanguage"]
path = vendor/grammars/overpassql-tmlanguage
url = https://github.com/nickswalker/overpassql-tmlanguage.git
[submodule "vendor/grammars/oz-tmbundle"]
path = vendor/grammars/oz-tmbundle
url = https://github.com/eregon/oz-tmbundle
Expand Down
2 changes: 2 additions & 0 deletions grammars.yml
Original file line number Diff line number Diff line change
Expand Up @@ -902,6 +902,8 @@ vendor/grammars/opa.tmbundle:
- source.opa
vendor/grammars/openscad.tmbundle:
- source.scad
vendor/grammars/overpassql-tmlanguage:
- source.overpassql
vendor/grammars/oz-tmbundle:
- source.oz
vendor/grammars/pact-atom:
Expand Down
11 changes: 10 additions & 1 deletion lib/linguist/languages.yml
Original file line number Diff line number Diff line change
Expand Up @@ -313,7 +313,7 @@ Answer Set Programming:
extensions:
- ".lp"
interpreters:
- "clingo"
- clingo
tm_scope: source.answersetprogramming
ace_mode: prolog
language_id: 433009171
Expand Down Expand Up @@ -5207,6 +5207,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 @@ -423,6 +423,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:** [nickswalker/overpassql-tmlanguage](https://github.com/nickswalker/overpassql-tmlanguage)
- **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/overpassql-tmlanguage
Submodule overpassql-tmlanguage added at b7ea3f
Loading

0 comments on commit 07486a1

Please sign in to comment.