mirror of
https://github.com/nvim-treesitter/nvim-treesitter.git
synced 2026-07-14 01:10:02 -04:00
refactor(unison): update to latest treesitter grammar
This commit is contained in:
parent
fba111f707
commit
c5be87ad3e
3 changed files with 33 additions and 23 deletions
2
.github/workflows/update-lockfile.yml
vendored
2
.github/workflows/update-lockfile.yml
vendored
|
|
@ -31,7 +31,7 @@ jobs:
|
||||||
|
|
||||||
- name: Update parsers
|
- name: Update parsers
|
||||||
env:
|
env:
|
||||||
SKIP_LOCKFILE_UPDATE_FOR_LANGS: "gnuplot,unison"
|
SKIP_LOCKFILE_UPDATE_FOR_LANGS: "gnuplot"
|
||||||
run: |
|
run: |
|
||||||
cp lockfile.json /tmp/old_lockfile.json
|
cp lockfile.json /tmp/old_lockfile.json
|
||||||
nvim -l scripts/write-lockfile.lua
|
nvim -l scripts/write-lockfile.lua
|
||||||
|
|
|
||||||
|
|
@ -837,7 +837,7 @@
|
||||||
"revision": "debd26fed283d80456ebafa33a06957b0c52e451"
|
"revision": "debd26fed283d80456ebafa33a06957b0c52e451"
|
||||||
},
|
},
|
||||||
"unison": {
|
"unison": {
|
||||||
"revision": "bc06e1eb100e1c0fab9bd89a9ca55d646ac80fc4"
|
"revision": "3c97db76d3cdbd002dfba493620c2d5df2fd6fa9"
|
||||||
},
|
},
|
||||||
"usd": {
|
"usd": {
|
||||||
"revision": "4e0875f724d94d0c2ff36f9b8cb0b12f8b20d216"
|
"revision": "4e0875f724d94d0c2ff36f9b8cb0b12f8b20d216"
|
||||||
|
|
|
||||||
|
|
@ -12,33 +12,32 @@
|
||||||
(literal_boolean) @boolean
|
(literal_boolean) @boolean
|
||||||
|
|
||||||
; Keywords
|
; Keywords
|
||||||
|
(type_kw) @keyword.type
|
||||||
|
|
||||||
[
|
[
|
||||||
(kw_forall)
|
(kw_forall)
|
||||||
(unique)
|
|
||||||
(type_kw)
|
|
||||||
(do)
|
(do)
|
||||||
(kw_let)
|
(kw_let)
|
||||||
(ability)
|
(ability)
|
||||||
(where)
|
(where)
|
||||||
] @keyword
|
] @keyword
|
||||||
|
|
||||||
(kw_equals) @keyword.operator
|
|
||||||
|
|
||||||
(structural) @keyword.modifier
|
(structural) @keyword.modifier
|
||||||
|
|
||||||
(unique) @keyword.modifier
|
(unique) @keyword.modifier
|
||||||
|
|
||||||
(type_constructor) @constructor
|
(type_constructor) @constructor
|
||||||
|
|
||||||
(doc_block) @comment.documentation
|
((doc_block) @comment.documentation @spell
|
||||||
|
(#set! priority 90))
|
||||||
|
|
||||||
[
|
[
|
||||||
(operator)
|
(operator)
|
||||||
(pipe)
|
(pipe)
|
||||||
(arrow_symbol)
|
(arrow_symbol)
|
||||||
">"
|
|
||||||
(or)
|
(or)
|
||||||
] @keyword.operator
|
(kw_equals)
|
||||||
|
] @operator
|
||||||
|
|
||||||
[
|
[
|
||||||
"if"
|
"if"
|
||||||
|
|
@ -53,23 +52,34 @@
|
||||||
|
|
||||||
(pattern) @variable
|
(pattern) @variable
|
||||||
|
|
||||||
(constructor_or_variable_pattern) @type
|
|
||||||
|
|
||||||
(use_clause) @keyword.import
|
(use_clause) @keyword.import
|
||||||
|
|
||||||
; Types
|
; Types
|
||||||
(record_field
|
(record_field
|
||||||
name: (wordy_id) @variable
|
(field_name) @variable.member
|
||||||
type: (wordy_id) @type)
|
type: (regular_identifier) @type)
|
||||||
|
|
||||||
(type_name) @type
|
(type_name) @type
|
||||||
|
|
||||||
|
(type_declaration
|
||||||
|
(regular_identifier) @type)
|
||||||
|
|
||||||
|
(ability_name
|
||||||
|
(path)? @module
|
||||||
|
(regular_identifier) @type)
|
||||||
|
|
||||||
(ability_declaration
|
(ability_declaration
|
||||||
(ability_name) @type
|
(ability_name) @type
|
||||||
(type_argument) @variable.parameter)
|
(type_argument) @variable.parameter)
|
||||||
|
|
||||||
|
(constructor
|
||||||
|
(constructor_name) @constructor)
|
||||||
|
|
||||||
|
(constructor
|
||||||
|
type: (regular_identifier) @type)
|
||||||
|
|
||||||
(effect
|
(effect
|
||||||
(wordy_id) @attribute) ; NOTE: an effect is a special type
|
(regular_identifier) @attribute) ; NOTE: an effect is a special type
|
||||||
|
|
||||||
; Namespaces
|
; Namespaces
|
||||||
(path) @module
|
(path) @module
|
||||||
|
|
@ -79,22 +89,21 @@
|
||||||
; Terms
|
; Terms
|
||||||
(type_signature
|
(type_signature
|
||||||
term_name: (path) @module
|
term_name: (path) @module
|
||||||
term_name: (wordy_id) @variable)
|
term_name: (regular_identifier) @variable)
|
||||||
|
|
||||||
(type_signature
|
(type_signature
|
||||||
term_name: (wordy_id) @variable)
|
term_name: (regular_identifier) @variable)
|
||||||
|
|
||||||
(term_type) @type
|
(term_type) @type
|
||||||
|
|
||||||
(function_application
|
(term_definition
|
||||||
function_name: (path)
|
name: (path) @module)
|
||||||
function_name: (wordy_id) @function)
|
|
||||||
|
|
||||||
(term_definition
|
(term_definition
|
||||||
name: (wordy_id) @variable)
|
name: (regular_identifier) @variable)
|
||||||
|
|
||||||
(term_definition
|
(term_definition
|
||||||
param: (wordy_id) @variable.parameter)
|
param: (regular_identifier) @variable.parameter)
|
||||||
|
|
||||||
; Punctuation
|
; Punctuation
|
||||||
[
|
[
|
||||||
|
|
@ -111,5 +120,6 @@
|
||||||
"]"
|
"]"
|
||||||
] @punctuation.bracket
|
] @punctuation.bracket
|
||||||
|
|
||||||
(test_watch_expression
|
(watch_expression) @keyword.directive
|
||||||
(wordy_id) @keyword.directive)
|
|
||||||
|
(test_watch_expression) @keyword.directive
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue