mirror of
https://github.com/helix-editor/helix.git
synced 2025-01-18 21:17:08 +04:00
Add Unison support (#7724)
This commit is contained in:
parent
f01ca107fb
commit
294aa669a2
@ -155,6 +155,7 @@
|
|||||||
| twig | ✓ | | | |
|
| twig | ✓ | | | |
|
||||||
| typescript | ✓ | ✓ | ✓ | `typescript-language-server` |
|
| typescript | ✓ | ✓ | ✓ | `typescript-language-server` |
|
||||||
| ungrammar | ✓ | | | |
|
| ungrammar | ✓ | | | |
|
||||||
|
| unison | ✓ | | | |
|
||||||
| uxntal | ✓ | | | |
|
| uxntal | ✓ | | | |
|
||||||
| v | ✓ | ✓ | ✓ | `v-analyzer` |
|
| v | ✓ | ✓ | ✓ | `v-analyzer` |
|
||||||
| vala | ✓ | | | `vala-language-server` |
|
| vala | ✓ | | | `vala-language-server` |
|
||||||
|
@ -2713,3 +2713,26 @@ injection-regex = "wren"
|
|||||||
file-types = ["wren"]
|
file-types = ["wren"]
|
||||||
roots = []
|
roots = []
|
||||||
indent = { tab-width = 2, unit = " "}
|
indent = { tab-width = 2, unit = " "}
|
||||||
|
|
||||||
|
[[language]]
|
||||||
|
name = "unison"
|
||||||
|
scope = "source.unison"
|
||||||
|
injection-regex = "unison"
|
||||||
|
file-types = ["u"]
|
||||||
|
shebangs = []
|
||||||
|
roots = []
|
||||||
|
auto-format = false
|
||||||
|
comment-token = "--"
|
||||||
|
indent = { tab-width = 4, unit = " " }
|
||||||
|
|
||||||
|
[language.auto-pairs]
|
||||||
|
'(' = ')'
|
||||||
|
'{' = '}'
|
||||||
|
'[' = ']'
|
||||||
|
'"' = '"'
|
||||||
|
'`' = '`'
|
||||||
|
|
||||||
|
[[grammar]]
|
||||||
|
name = "unison"
|
||||||
|
source = { git = "https://github.com/kylegoetz/tree-sitter-unison", rev = "98c4e8bc5c9f5989814a720457cf36963cf4043d" }
|
||||||
|
|
||||||
|
72
runtime/queries/unison/highlights.scm
Normal file
72
runtime/queries/unison/highlights.scm
Normal file
@ -0,0 +1,72 @@
|
|||||||
|
;; Primitives
|
||||||
|
(comment) @comment
|
||||||
|
(nat) @constant.numeric
|
||||||
|
(unit) @constant.builtin
|
||||||
|
(literal_char) @constant.character
|
||||||
|
(literal_text) @string
|
||||||
|
(literal_boolean) @constant.builtin.boolean
|
||||||
|
|
||||||
|
;; Keywords
|
||||||
|
[
|
||||||
|
(kw_forall)
|
||||||
|
(unique_kw)
|
||||||
|
(type_kw)
|
||||||
|
(kw_equals)
|
||||||
|
(do)
|
||||||
|
] @keyword
|
||||||
|
|
||||||
|
(kw_let) @keyword.function
|
||||||
|
(type_kw) @keyword.storage.type
|
||||||
|
(unique) @keyword.storage.modifier
|
||||||
|
("use") @keyword.control.import
|
||||||
|
|
||||||
|
|
||||||
|
[
|
||||||
|
(type_constructor)
|
||||||
|
] @constructor
|
||||||
|
|
||||||
|
[
|
||||||
|
(operator)
|
||||||
|
(pipe)
|
||||||
|
(arrow_symbol)
|
||||||
|
(">")
|
||||||
|
(or)
|
||||||
|
(bang)
|
||||||
|
] @operator
|
||||||
|
|
||||||
|
[
|
||||||
|
"if"
|
||||||
|
"else"
|
||||||
|
"then"
|
||||||
|
(match)
|
||||||
|
(with)
|
||||||
|
(cases)
|
||||||
|
] @keyword.control.conditional
|
||||||
|
|
||||||
|
(blank_pattern) @variable.builtin
|
||||||
|
|
||||||
|
;; Types
|
||||||
|
(record_field name: (wordy_id) @variable.other.member type: (wordy_id) @type)
|
||||||
|
[
|
||||||
|
(type_name)
|
||||||
|
(type_signature)
|
||||||
|
(effect)
|
||||||
|
] @type
|
||||||
|
|
||||||
|
(term_definition) @variable
|
||||||
|
|
||||||
|
;; Punctuation
|
||||||
|
[
|
||||||
|
(type_signature_colon)
|
||||||
|
":"
|
||||||
|
] @punctuation.delimiter
|
||||||
|
|
||||||
|
[
|
||||||
|
"("
|
||||||
|
")"
|
||||||
|
"{"
|
||||||
|
"}"
|
||||||
|
"["
|
||||||
|
"]"
|
||||||
|
] @punctuation.bracket
|
||||||
|
|
1
runtime/queries/unison/injections.scm
Normal file
1
runtime/queries/unison/injections.scm
Normal file
@ -0,0 +1 @@
|
|||||||
|
((doc_block) @injection.content (#set! injection.language "markdown"))
|
Loading…
Reference in New Issue
Block a user