diff options
| author | Raymond Ha <raymond@shraymonks.com> | 2022-11-24 11:12:38 -0800 |
|---|---|---|
| committer | Stephan Seitz <stephan.seitz@fau.de> | 2022-11-25 00:34:25 +0100 |
| commit | ef24c633f6945e87e8d5717d146ad6601cd7e99f (patch) | |
| tree | 1f8988edc9af4f6ae856a73e391bec429a49df46 | |
| parent | Update lockfile.json (diff) | |
| download | nvim-treesitter-ef24c633f6945e87e8d5717d146ad6601cd7e99f.tar nvim-treesitter-ef24c633f6945e87e8d5717d146ad6601cd7e99f.tar.gz nvim-treesitter-ef24c633f6945e87e8d5717d146ad6601cd7e99f.tar.bz2 nvim-treesitter-ef24c633f6945e87e8d5717d146ad6601cd7e99f.tar.lz nvim-treesitter-ef24c633f6945e87e8d5717d146ad6601cd7e99f.tar.xz nvim-treesitter-ef24c633f6945e87e8d5717d146ad6601cd7e99f.tar.zst nvim-treesitter-ef24c633f6945e87e8d5717d146ad6601cd7e99f.zip | |
highlights(typescript): Fix as highlight
| -rw-r--r-- | queries/typescript/highlights.scm | 2 | ||||
| -rw-r--r-- | tests/query/highlights/typescript/as.ts | 8 |
2 files changed, 10 insertions, 0 deletions
diff --git a/queries/typescript/highlights.scm b/queries/typescript/highlights.scm index 82151ef40..3df859058 100644 --- a/queries/typescript/highlights.scm +++ b/queries/typescript/highlights.scm @@ -17,6 +17,8 @@ "satisfies" ] @keyword +(as_expression "as" @keyword) + ; types (type_identifier) @type diff --git a/tests/query/highlights/typescript/as.ts b/tests/query/highlights/typescript/as.ts new file mode 100644 index 000000000..b1f1533b4 --- /dev/null +++ b/tests/query/highlights/typescript/as.ts @@ -0,0 +1,8 @@ +import * as foo from 'foo'; +// ^ include + +export { foo as bar }; +// ^ include + +const n = 5 as number; +// ^ keyword |
