mirror of
https://github.com/helix-editor/helix.git
synced 2025-01-18 13:07:06 +04:00
Add language support for Quint (#11898)
Co-authored-by: Michael Davis <mcarsondavis@gmail.com>
This commit is contained in:
parent
32ff0fce4a
commit
b8313da5a8
@ -169,6 +169,7 @@
|
||||
| purescript | ✓ | ✓ | | `purescript-language-server` |
|
||||
| python | ✓ | ✓ | ✓ | `ruff`, `jedi-language-server`, `pylsp` |
|
||||
| qml | ✓ | | ✓ | `qmlls` |
|
||||
| quint | ✓ | | | `quint-language-server` |
|
||||
| r | ✓ | | | `R` |
|
||||
| racket | ✓ | | ✓ | `racket` |
|
||||
| regex | ✓ | | | |
|
||||
|
@ -84,6 +84,7 @@ pyright = { command = "pyright-langserver", args = ["--stdio"], config = {} }
|
||||
basedpyright = { command = "basedpyright-langserver", args = ["--stdio"], config = {} }
|
||||
pylyzer = { command = "pylyzer", args = ["--server"] }
|
||||
qmlls = { command = "qmlls" }
|
||||
quint-language-server = { command = "quint-language-server", args = ["--stdio"] }
|
||||
r = { command = "R", args = ["--no-echo", "-e", "languageserver::run()"] }
|
||||
racket = { command = "racket", args = ["-l", "racket-langserver"] }
|
||||
regols = { command = "regols" }
|
||||
@ -3893,6 +3894,19 @@ indent = { tab-width = 4, unit = " " }
|
||||
name = "cylc"
|
||||
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]]
|
||||
name = "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…
Reference in New Issue
Block a user