Skip to content

Commit

Permalink
Add support for edgeql languages
Browse files Browse the repository at this point in the history
  • Loading branch information
DAlperin committed Feb 11, 2022
1 parent 97fa33e commit ac15105
Show file tree
Hide file tree
Showing 9 changed files with 70 additions and 0 deletions.
3 changes: 3 additions & 0 deletions .gitmodules
Original file line number Diff line number Diff line change
Expand Up @@ -398,6 +398,9 @@
[submodule "vendor/grammars/ecl-tmLanguage"]
path = vendor/grammars/ecl-tmLanguage
url = https://github.com/hpcc-systems/ecl-tmLanguage
[submodule "vendor/grammars/edgedb-editor-plugin"]
path = vendor/grammars/edgedb-editor-plugin
url = https://github.com/edgedb/edgedb-editor-plugin.git
[submodule "vendor/grammars/eiffel.tmbundle"]
path = vendor/grammars/eiffel.tmbundle
url = https://github.com/textmate/eiffel.tmbundle
Expand Down
2 changes: 2 additions & 0 deletions grammars.yml
Original file line number Diff line number Diff line change
Expand Up @@ -321,6 +321,8 @@ vendor/grammars/ec.tmbundle:
- source.c.ec
vendor/grammars/ecl-tmLanguage:
- source.ecl
vendor/grammars/edgedb-editor-plugin:
- source.edgeql
vendor/grammars/eiffel.tmbundle:
- source.eiffel
vendor/grammars/ejs-tmbundle:
Expand Down
11 changes: 11 additions & 0 deletions lib/linguist/languages.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7168,6 +7168,17 @@ eC:
tm_scope: source.c.ec
ace_mode: text
language_id: 413
EdgeQL:
type: programming
color: "#31A7FF"
aliases:
- esdl
extensions:
- ".edgeql"
- ".esdl"
ace_mode: text
tm_scope: source.edgeql
language_id: 925235833
edn:
type: data
ace_mode: clojure
Expand Down
8 changes: 8 additions & 0 deletions samples/EdgeQL/default.esdl
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
module default {
type Task {
required property text -> str;
required property completed -> bool{
default := false;
};
}
};
12 changes: 12 additions & 0 deletions samples/EdgeQL/migration.edgeql
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
CREATE MIGRATION m146naaaow4uwgbxpnjq5hyizixicxvg2ccpta24pxebzfn7xeppna
ONTO initial
{
CREATE EXTENSION edgeql_http VERSION '1.0';
CREATE EXTENSION graphql VERSION '1.0';
CREATE TYPE default::Task {
CREATE REQUIRED PROPERTY completed -> std::bool {
SET default := false;
};
CREATE REQUIRED PROPERTY text -> std::str;
};
};
1 change: 1 addition & 0 deletions test/test_language.rb
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ def test_find_by_alias
assert_equal Language['Common Lisp'], Language.find_by_alias('lisp')
assert_equal Language['Darcs Patch'], Language.find_by_alias('dpatch')
assert_equal Language['Dart'], Language.find_by_alias('dart')
assert_equal Language['EdgeQL'], Language.find_by_alias('esdl')
assert_equal Language['Emacs Lisp'], Language.find_by_alias('elisp')
assert_equal Language['Emacs Lisp'], Language.find_by_alias('emacs')
assert_equal Language['Emacs Lisp'], Language.find_by_alias('emacs-lisp')
Expand Down
1 change: 1 addition & 0 deletions vendor/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -553,6 +553,7 @@ This is a list of grammars that Linguist selects to provide syntax highlighting
- **desktop:** [Mailaender/desktop.tmbundle](https://github.com/Mailaender/desktop.tmbundle)
- **dircolors:** [jolkdarr/language-dircolors](https://github.com/jolkdarr/language-dircolors)
- **eC:** [ecere/ec.tmbundle](https://github.com/ecere/ec.tmbundle)
- **EdgeQL:** [edgedb/edgedb-editor-plugin](https://github.com/edgedb/edgedb-editor-plugin)
- **edn:** [atom/language-clojure](https://github.com/atom/language-clojure)
- **fish:** [l15n/fish-tmbundle](https://github.com/l15n/fish-tmbundle)
- **hoon:** [pkova/hoon-grammar](https://github.com/pkova/hoon-grammar)
Expand Down
1 change: 1 addition & 0 deletions vendor/grammars/edgedb-editor-plugin
Submodule edgedb-editor-plugin added at 56312c
31 changes: 31 additions & 0 deletions vendor/licenses/git_submodule/edgedb-editor-plugin.dep.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
---
name: edgedb-editor-plugin
version: 56312c127054a627404ed89316e5f642f24e8586
type: git_submodule
homepage: https://github.com/edgedb/edgedb-editor-plugin.git
license: mit
licenses:
- sources: LICENSE
text: |
The MIT License
Copyright (c) 2015-present MagicStack Inc. http://magic.io
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.
notices: []

0 comments on commit ac15105

Please sign in to comment.