mirror of
https://github.com/helix-editor/helix.git
synced 2025-04-04 11:27:46 +03:00
Add language support for Quint (#11898)
Co-authored-by: Michael Davis <mcarsondavis@gmail.com>
This commit is contained in:
parent
32ff0fce4a
commit
b8313da5a8
3 changed files with 109 additions and 0 deletions
|
@ -169,6 +169,7 @@
|
||||||
| purescript | ✓ | ✓ | | `purescript-language-server` |
|
| purescript | ✓ | ✓ | | `purescript-language-server` |
|
||||||
| python | ✓ | ✓ | ✓ | `ruff`, `jedi-language-server`, `pylsp` |
|
| python | ✓ | ✓ | ✓ | `ruff`, `jedi-language-server`, `pylsp` |
|
||||||
| qml | ✓ | | ✓ | `qmlls` |
|
| qml | ✓ | | ✓ | `qmlls` |
|
||||||
|
| quint | ✓ | | | `quint-language-server` |
|
||||||
| r | ✓ | | | `R` |
|
| r | ✓ | | | `R` |
|
||||||
| racket | ✓ | | ✓ | `racket` |
|
| racket | ✓ | | ✓ | `racket` |
|
||||||
| regex | ✓ | | | |
|
| regex | ✓ | | | |
|
||||||
|
|
|
@ -84,6 +84,7 @@ pyright = { command = "pyright-langserver", args = ["--stdio"], config = {} }
|
||||||
basedpyright = { command = "basedpyright-langserver", args = ["--stdio"], config = {} }
|
basedpyright = { command = "basedpyright-langserver", args = ["--stdio"], config = {} }
|
||||||
pylyzer = { command = "pylyzer", args = ["--server"] }
|
pylyzer = { command = "pylyzer", args = ["--server"] }
|
||||||
qmlls = { command = "qmlls" }
|
qmlls = { command = "qmlls" }
|
||||||
|
quint-language-server = { command = "quint-language-server", args = ["--stdio"] }
|
||||||
r = { command = "R", args = ["--no-echo", "-e", "languageserver::run()"] }
|
r = { command = "R", args = ["--no-echo", "-e", "languageserver::run()"] }
|
||||||
racket = { command = "racket", args = ["-l", "racket-langserver"] }
|
racket = { command = "racket", args = ["-l", "racket-langserver"] }
|
||||||
regols = { command = "regols" }
|
regols = { command = "regols" }
|
||||||
|
@ -3893,6 +3894,19 @@ indent = { tab-width = 4, unit = " " }
|
||||||
name = "cylc"
|
name = "cylc"
|
||||||
source = { git = "https://github.com/elliotfontaine/tree-sitter-cylc", rev = "30dd40d9bf23912e4aefa93eeb4c7090bda3d0f6" }
|
source = { git = "https://github.com/elliotfontaine/tree-sitter-cylc", rev = "30dd40d9bf23912e4aefa93eeb4c7090bda3d0f6" }
|
||||||
|
|
||||||
|
[[language]]
|
||||||
|
name = "quint"
|
||||||
|
scope = "source.quint"
|
||||||
|
file-types = ["qnt"]
|
||||||
|
language-servers = ["quint-language-server"]
|
||||||
|
comment-token = "//"
|
||||||
|
block-comment-tokens = { start = "/*", end = "*/" }
|
||||||
|
indent = { tab-width = 2, unit = " " }
|
||||||
|
|
||||||
|
[[grammar]]
|
||||||
|
name = "quint"
|
||||||
|
source = { git = "https://github.com/gruhn/tree-sitter-quint", rev = "eebbd01edfeff6404778c92efe5554e42e506a18" }
|
||||||
|
|
||||||
[[language]]
|
[[language]]
|
||||||
name = "spade"
|
name = "spade"
|
||||||
scope = "source.spade"
|
scope = "source.spade"
|
||||||
|
|
94
runtime/queries/quint/highlights.scm
Normal file
94
runtime/queries/quint/highlights.scm
Normal file
|
@ -0,0 +1,94 @@
|
||||||
|
[
|
||||||
|
"module"
|
||||||
|
"type"
|
||||||
|
"assume"
|
||||||
|
"const"
|
||||||
|
"var"
|
||||||
|
"val"
|
||||||
|
"nondet"
|
||||||
|
"def"
|
||||||
|
"pure"
|
||||||
|
"action"
|
||||||
|
"temporal"
|
||||||
|
"run"
|
||||||
|
] @keyword
|
||||||
|
|
||||||
|
(match_expr "match" @keyword.control.conditional)
|
||||||
|
|
||||||
|
(if_else_condition
|
||||||
|
"if" @keyword.control.conditional
|
||||||
|
"else" @keyword.control.conditional)
|
||||||
|
|
||||||
|
(import "import" @keyword.control.import)
|
||||||
|
(import "as" @keyword.control.import)
|
||||||
|
(import "from" @keyword.control.import)
|
||||||
|
(export "export" @keyword.control.import)
|
||||||
|
(export "as" @keyword.control.import)
|
||||||
|
|
||||||
|
[
|
||||||
|
"true"
|
||||||
|
"false"
|
||||||
|
"Int"
|
||||||
|
"Nat"
|
||||||
|
"Bool"
|
||||||
|
] @constant.builtin
|
||||||
|
|
||||||
|
[
|
||||||
|
";"
|
||||||
|
"."
|
||||||
|
","
|
||||||
|
] @punctuation.delimiter
|
||||||
|
|
||||||
|
[
|
||||||
|
"-"
|
||||||
|
"+"
|
||||||
|
"*"
|
||||||
|
"/"
|
||||||
|
"%"
|
||||||
|
"<"
|
||||||
|
"<="
|
||||||
|
"="
|
||||||
|
"=="
|
||||||
|
"!="
|
||||||
|
"=>"
|
||||||
|
">"
|
||||||
|
">="
|
||||||
|
"^"
|
||||||
|
"->"
|
||||||
|
] @operator
|
||||||
|
|
||||||
|
(infix_and "and" @operator)
|
||||||
|
(infix_or "or" @operator)
|
||||||
|
(infix_iff "iff" @operator)
|
||||||
|
(infix_implies "implies" @operator)
|
||||||
|
|
||||||
|
(braced_and "and" @keyword)
|
||||||
|
(braced_or "or" @keyword)
|
||||||
|
(braced_all "all" @keyword)
|
||||||
|
(braced_any "any" @keyword)
|
||||||
|
|
||||||
|
[
|
||||||
|
"("
|
||||||
|
")"
|
||||||
|
"["
|
||||||
|
"]"
|
||||||
|
"{"
|
||||||
|
"}"
|
||||||
|
] @punctuation.bracket
|
||||||
|
|
||||||
|
(polymorphic_type
|
||||||
|
(type) @type.parameter)
|
||||||
|
|
||||||
|
(variant_constructor) @type.enum.variant
|
||||||
|
|
||||||
|
(type) @type
|
||||||
|
(int_literal) @constant.numeric.integer
|
||||||
|
(comment) @comment
|
||||||
|
(string) @string
|
||||||
|
|
||||||
|
(operator_application
|
||||||
|
operator: (qualified_identifier) @function)
|
||||||
|
|
||||||
|
(operator_definition
|
||||||
|
name: (qualified_identifier) @function
|
||||||
|
arguments: (typed_argument_list))
|
Loading…
Add table
Add a link
Reference in a new issue