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