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

Add support for EdgeQL languages #5780

Merged
merged 4 commits into from
Dec 5, 2023
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
3 changes: 3 additions & 0 deletions .gitmodules
Original file line number Diff line number Diff line change
Expand Up @@ -437,6 +437,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 @@ -356,6 +356,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 @@ -1724,6 +1724,17 @@ Ecmarkup:
aliases:
- ecmarkdown
language_id: 844766630
EdgeQL:
type: programming
color: "#31A7FF"
aliases:
- esdl
extensions:
- ".edgeql"
- ".esdl"
ace_mode: text
tm_scope: source.edgeql
language_id: 925235833
EditorConfig:
type: data
color: "#fff1f2"
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 @@ -151,6 +151,7 @@ This is a list of grammars that Linguist selects to provide syntax highlighting
- **Easybuild:** [MagicStack/MagicPython](https://github.com/MagicStack/MagicPython)
- **Ecere Projects:** [Nixinova/NovaGrammars](https://github.com/Nixinova/NovaGrammars)
- **Ecmarkup:** [Alhadis/language-etc](https://github.com/Alhadis/language-etc)
- **EdgeQL:** [edgedb/edgedb-editor-plugin](https://github.com/edgedb/edgedb-editor-plugin)
- **EditorConfig:** [sindresorhus/atom-editorconfig](https://github.com/sindresorhus/atom-editorconfig)
- **Edje Data Collection:** [textmate/c.tmbundle](https://github.com/textmate/c.tmbundle)
- **Eiffel:** [textmate/eiffel.tmbundle](https://github.com/textmate/eiffel.tmbundle)
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: []