Unnamed repository; edit this file 'description' to name the repository.
-rw-r--r--book/src/generated/lang-support.md1
-rw-r--r--languages.toml12
-rw-r--r--runtime/queries/eiffel/highlights.scm108
-rw-r--r--runtime/queries/eiffel/indents.scm30
-rw-r--r--runtime/queries/eiffel/textobjects.scm15
5 files changed, 166 insertions, 0 deletions
diff --git a/book/src/generated/lang-support.md b/book/src/generated/lang-support.md
index a0cc5c52..8fa9aed2 100644
--- a/book/src/generated/lang-support.md
+++ b/book/src/generated/lang-support.md
@@ -57,6 +57,7 @@
| earthfile | ✓ | ✓ | ✓ | | | `earthlyls` |
| edoc | ✓ | | | | | |
| eex | ✓ | | | | | |
+| eiffel | ✓ | ✓ | ✓ | | | `eiffel-language-server` |
| ejs | ✓ | | | | | |
| elisp | ✓ | | | ✓ | | |
| elixir | ✓ | ✓ | ✓ | ✓ | ✓ | `elixir-ls`, `expert` |
diff --git a/languages.toml b/languages.toml
index 1d5c1a50..f46e8c43 100644
--- a/languages.toml
+++ b/languages.toml
@@ -38,6 +38,7 @@ docker-compose-langserver = { command = "docker-compose-langserver", args = ["--
dot-language-server = { command = "dot-language-server", args = ["--stdio"] }
dts-lsp = { command = "dts-lsp" }
earthlyls = { command = "earthlyls" }
+eiffel-language-server = {command = "eiffel-language-server"}
elixir-ls = { command = "elixir-ls", config = { elixirLS.dialyzerEnabled = false } }
elm-language-server = { command = "elm-language-server" }
elp = { command = "elp", args = ["server"] }
@@ -423,6 +424,17 @@ name = "textproto"
source = { git = "https://github.com/PorterAtGoogle/tree-sitter-textproto", rev = "568471b80fd8793d37ed01865d8c2208a9fefd1b"}
[[language]]
+name = "eiffel"
+scope = "source.eiffel"
+file-types = ["e"]
+comment-token = "--"
+language-servers = ["eiffel-language-server"]
+
+[[grammar]]
+name = "eiffel"
+source = { git = "https://github.com/imustafin/tree-sitter-eiffel", rev = "d934fb44f1d22bb76be6b56a7b2425ab3b1daf8b" }
+
+[[language]]
name = "elixir"
scope = "source.elixir"
injection-regex = "(elixir|ex)"
diff --git a/runtime/queries/eiffel/highlights.scm b/runtime/queries/eiffel/highlights.scm
new file mode 100644
index 00000000..90b0cfdb
--- /dev/null
+++ b/runtime/queries/eiffel/highlights.scm
@@ -0,0 +1,108 @@
+[
+ "alias"
+ "convert"
+ "inherit"
+ "redefine"
+ "undefine"
+ "rename"
+ "select"
+ "note"
+ "create"
+] @keyword.control.import
+
+["export"] @keyword.control.export
+
+[
+ "do"
+ "end"
+ "once"
+ "attribute"
+] @keyword.control
+
+[
+ "class"
+ "local"
+] @keyword.storage.type
+
+[
+ "feature"
+ "agent"
+] @keyword.function
+
+[
+ "frozen"
+ "deferred"
+ "detachable"
+ "expanded"
+ "attached"
+ "old"
+ "like"
+] @keyword.storage.modifier
+
+(conditional ["if" "elseif" "end"] @keyword.control.conditional)
+(else_part ["else"] @keyword.control.conditional)
+(then_part ["then"] @keyword.control.conditional)
+
+(conditional_expression ["if" "else" "elseif" "end"] @keyword.control.conditional)
+(else_part_expression ["else"] @keyword.control.conditional)
+(then_part_expression ["then"] @keyword.control.conditional)
+
+(multi_branch "inspect" @keyword.control.conditional)
+(when_part ["when" "then"] @keyword.control.conditional)
+
+(multi_branch_expression "inspect" @keyword.control.conditional)
+(when_part_expression ["when" "then"] @keyword.control.conditional)
+
+(quantifier_loop ["∀" "∃" ":" "¦"] @keyword.control.repeat)
+(quantifier_loop_body ["all" "some"] @keyword.control.repeat)
+(iteration ["across" "as"] @keyword.control.repeat)
+(initialization "from" @keyword.control.repeat)
+(exit_condition "until" @keyword.control.repeat)
+(loop_body "loop" @keyword.control.repeat)
+(variant "variant" @keyword.control.repeat)
+(loop (invariant "invariant" @keyword.control.repeat))
+(loop ["⟳" ":" "¦" "⟲"]@keyword.control.repeat)
+(loop "end" @keyword.control.repeat)
+
+[
+ "require"
+ "ensure"
+ "invariant"
+ "check"
+] @keyword.control.exception
+
+["(" ")" "[" "]" "<<" ">>"] @punctuation.bracket
+["," ":" ";"] @punctuation.delimiter
+
+[
+ (unary)
+ ":="
+ (binary_caret)
+ (binary_mul_div)
+ (binary_plus_minus)
+ (binary_comparison)
+ (binary_and)
+ (binary_or)
+ (binary_implies)
+ (comparison)
+ (unary_not)
+] @operator
+
+(result) @variable.builtin
+(anchored (call (_) @variable))
+[(verbatim_string) (basic_manifest_string)] @string
+[(integer_constant) (real_constant)] @constant.numeric
+(boolean_constant) @constant.builtin.boolean
+(void) @constant.builtin
+(current) @variable.builtin
+(extended_feature_name (identifier) @function.method)
+
+(iteration (identifier) @variable)
+(quantifier_loop (identifier) @variable)
+(entity_declaration_group (identifier) @variable)
+
+(class_name) @type
+(formal_generic) @type.parameter
+
+(comment) @comment.line
+(header_comment) @comment.line.documentation
diff --git a/runtime/queries/eiffel/indents.scm b/runtime/queries/eiffel/indents.scm
new file mode 100644
index 00000000..5be4cb42
--- /dev/null
+++ b/runtime/queries/eiffel/indents.scm
@@ -0,0 +1,30 @@
+[
+ (notes)
+ (class_declaration)
+ (inheritance)
+ (feature_adaptation)
+ (creation_clause)
+ (converters)
+
+ (feature_declaration)
+
+ (attribute_or_routine)
+
+ (precondition)
+ (local_declarations)
+ (feature_body)
+
+ (check)
+ (multi_branch)
+ (multi_branch_expression)
+ (conditional)
+ (conditional_expression)
+ (loop)
+ (quantifier_loop)
+ (iteration)
+
+ (postcondition)
+ (rescue)
+
+ (invariant)
+] @indent
diff --git a/runtime/queries/eiffel/textobjects.scm b/runtime/queries/eiffel/textobjects.scm
new file mode 100644
index 00000000..34693a02
--- /dev/null
+++ b/runtime/queries/eiffel/textobjects.scm
@@ -0,0 +1,15 @@
+[
+ (comment)+
+ (header_comment)+
+] @comment.around
+[
+ (comment)
+ (header_comment)
+] @comment.inside
+(formal_arguments) @parameter.around
+(entity_declaration_group) @parameter.inside
+(attribute_or_routine) @function.around
+(feature_body) @function.inside
+(class_declaration) @class.around
+(feature_clause) @class.inside
+