-
Notifications
You must be signed in to change notification settings - Fork 15
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Highlight variants as constructors * Add set of built-in types * Update @namespace to @module It's what's in the neovim docs right now * Update @parameter to @variable.parameter * Update string interpolation and char * Update parameter to @variable.parameter * Update annotation to attribute * Complete change of polyvar as constructors * Specialize some of the keywords * Move the => arrow to operators This is how it's in the ecma parser (JS) * Specialize ternary operator * Highlight function name in bindings * Highlight function calls * Highlight members of records and modules * Highlight unit as built-in constant * Highlight labeled parameters names as properties * Fix existing tests * Fix pipe operator call highlighting to work with simple values too * Add highlight tests for function names and calls * Add tests for module and record members * Change record field expression to member * Add test for labeled argument as property * Add test for unit highlight * Adapt to new tree-sitter last match wins * Move template highlight rule * Add string interpolation test * Remove member highlight as property * Change highlight of variable from module * Change highlight of destructured variables * Change highlight of labeled arguments * Fix highlight of variables in string interpolation * Fix parameter highlights * Move "as" to keyword.operator * Move async/await to coroutine * Fix test * Add missing punctutation highlights * Remove metadata from unit highlight * (true) and (false) as boolean --------- Co-authored-by: Pedro Castro <aspeddro@gmail.com>
- Loading branch information
1 parent
5e2a44a
commit d77653c
Showing
7 changed files
with
179 additions
and
90 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
@name | ||
//<- annotation | ||
//<- attribute | ||
|
||
@@name | ||
//<- annotation | ||
//<- attribute |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,16 +1,13 @@ | ||
let inc = n => n + 1 | ||
// ^ parameter | ||
// ^ variable.parameter | ||
// ^ punctuation.special | ||
// ^ function | ||
|
||
let fn = (a, (b, c), {d, e}, [f, g]) => a + b + c + d + e + f + g | ||
// ^ parameter | ||
// ^ parameter | ||
// ^ parameter | ||
// ^ parameter | ||
|
||
let uncurry = (. u, .x) => (u, x) | ||
// ^ operator | ||
// ^ operator | ||
// ^ variable.parameter | ||
// ^ variable.parameter | ||
// ^ variable.parameter | ||
// ^ variable.parameter | ||
|
||
let get = async (id) => id | ||
// ^ keyword | ||
// ^ keyword.coroutine |
Oops, something went wrong.