diff options
| author | Andrew Helwer <ahelwer@users.noreply.github.com> | 2022-02-03 13:12:22 -0500 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2022-02-03 19:12:22 +0100 |
| commit | b12c10778c4eb16bdaaed3a4b11397039b81d9f5 (patch) | |
| tree | 729e4b1a992bae2b0ecb2e00d3326d01c78b62b8 | |
| parent | fix(utils): adjust truncation condition (diff) | |
| download | nvim-treesitter-b12c10778c4eb16bdaaed3a4b11397039b81d9f5.tar nvim-treesitter-b12c10778c4eb16bdaaed3a4b11397039b81d9f5.tar.gz nvim-treesitter-b12c10778c4eb16bdaaed3a4b11397039b81d9f5.tar.bz2 nvim-treesitter-b12c10778c4eb16bdaaed3a4b11397039b81d9f5.tar.lz nvim-treesitter-b12c10778c4eb16bdaaed3a4b11397039b81d9f5.tar.xz nvim-treesitter-b12c10778c4eb16bdaaed3a4b11397039b81d9f5.tar.zst nvim-treesitter-b12c10778c4eb16bdaaed3a4b11397039b81d9f5.zip | |
Updated TLA+ version, queries, maintainers (#2442)
| -rw-r--r-- | lockfile.json | 2 | ||||
| -rw-r--r-- | lua/nvim-treesitter/parsers.lua | 2 | ||||
| -rw-r--r-- | queries/tlaplus/highlights.scm | 20 |
3 files changed, 13 insertions, 11 deletions
diff --git a/lockfile.json b/lockfile.json index 3ebfcbb7c..f96d991d9 100644 --- a/lockfile.json +++ b/lockfile.json @@ -258,7 +258,7 @@ "revision": "fcc5f6f4d194dede4e676834ff28a506e39e17b4" }, "tlaplus": { - "revision": "6cd9e3e24d02d4311cc0bc79da9b415712648a34" + "revision": "dde405e5128c3c47ab8aa014d21b6e5296ca450f" }, "toml": { "revision": "8bd2056818b21860e3d756b5a58c4f6e05fb744e" diff --git a/lua/nvim-treesitter/parsers.lua b/lua/nvim-treesitter/parsers.lua index 1ec1748f3..fa1b0b895 100644 --- a/lua/nvim-treesitter/parsers.lua +++ b/lua/nvim-treesitter/parsers.lua @@ -469,7 +469,7 @@ list.tlaplus = { url = "https://github.com/tlaplus-community/tree-sitter-tlaplus", files = { "src/parser.c", "src/scanner.cc" }, }, - maintainers = { "@ahelwer" }, + maintainers = { "@ahelwer", "@susliko" }, filetype = "tla", } diff --git a/queries/tlaplus/highlights.scm b/queries/tlaplus/highlights.scm index 01b302f23..98901ef61 100644 --- a/queries/tlaplus/highlights.scm +++ b/queries/tlaplus/highlights.scm @@ -1,8 +1,7 @@ -; ; highlights.scm -; ; Default capture names for tree-sitter highlight found here: +; ; Intended for consumption by nvim-treesitter +; ; Default capture names for nvim-treesitter found here: ; ; https://github.com/nvim-treesitter/nvim-treesitter/blob/e473630fe0872cb0ed97cd7085e724aa58bc1c84/lua/nvim-treesitter/highlight.lua#L14-L104 - ; Keywords [ "ACTION" @@ -78,6 +77,7 @@ ; Pluscal keywords [ (pcal_algorithm_start) + "algorithm" "assert" "await" "begin" @@ -133,6 +133,7 @@ (real_number) @number (real_number_set) @type (string) @string +(escape_char) @string.escape (string_set) @type ; Namespaces and includes @@ -205,12 +206,12 @@ ; Proofs (proof_step_id "<" @punctuation.bracket) -(proof_step_id (level) @number) -(proof_step_id (name) @constant) +(proof_step_id (level) @label) +(proof_step_id (name) @label) (proof_step_id ">" @punctuation.bracket) (proof_step_ref "<" @punctuation.bracket) -(proof_step_ref (level) @number) -(proof_step_ref (name) @constant) +(proof_step_ref (level) @label) +(proof_step_ref (name) @label) (proof_step_ref ">" @punctuation.bracket) ; Comments and tags @@ -219,8 +220,9 @@ (block_comment_text) @comment (comment) @comment (single_line) @comment -(_ label: (identifier) @tag) -(pcal_goto statement: (identifier) @tag) +(_ label: (identifier) @label) +(label name: (_) @label) +(pcal_goto statement: (identifier) @label) ; Reference highlighting with the same color as declarations. ; `constant`, `operator`, and others are custom captures defined in locals.scm |
