diff options
| author | Amaan Qureshi <amaanq12@gmail.com> | 2023-11-10 16:04:40 -0500 |
|---|---|---|
| committer | Amaan Qureshi <amaanq12@gmail.com> | 2023-11-10 19:08:12 -0500 |
| commit | c543ffae1c34a92fb647505f2165b35f68c113c4 (patch) | |
| tree | 0e40c52fef65ef2baebf7d5391f2925624e977fc /queries/ecma | |
| parent | fix(cpp): highlight constexpr (diff) | |
| download | nvim-treesitter-c543ffae1c34a92fb647505f2165b35f68c113c4.tar nvim-treesitter-c543ffae1c34a92fb647505f2165b35f68c113c4.tar.gz nvim-treesitter-c543ffae1c34a92fb647505f2165b35f68c113c4.tar.bz2 nvim-treesitter-c543ffae1c34a92fb647505f2165b35f68c113c4.tar.lz nvim-treesitter-c543ffae1c34a92fb647505f2165b35f68c113c4.tar.xz nvim-treesitter-c543ffae1c34a92fb647505f2165b35f68c113c4.tar.zst nvim-treesitter-c543ffae1c34a92fb647505f2165b35f68c113c4.zip | |
fix(ecma): prioritize builtins
Diffstat (limited to 'queries/ecma')
| -rw-r--r-- | queries/ecma/highlights.scm | 35 |
1 files changed, 19 insertions, 16 deletions
diff --git a/queries/ecma/highlights.scm b/queries/ecma/highlights.scm index 2c921b2b2..664421701 100644 --- a/queries/ecma/highlights.scm +++ b/queries/ecma/highlights.scm @@ -74,22 +74,6 @@ "TypeError" "URIError")) -((identifier) @namespace.builtin - (#eq? @namespace.builtin "Intl")) - -((identifier) @function.builtin - (#any-of? @function.builtin - "eval" - "isFinite" - "isNaN" - "parseFloat" - "parseInt" - "decodeURI" - "decodeURIComponent" - "encodeURI" - "encodeURIComponent" - "require")) - ; Function and method definitions ;-------------------------------- @@ -147,6 +131,25 @@ function: (member_expression property: [(property_identifier) (private_property_identifier)] @method.call)) +; Builtins +;--------- + +((identifier) @namespace.builtin + (#eq? @namespace.builtin "Intl")) + +((identifier) @function.builtin + (#any-of? @function.builtin + "eval" + "isFinite" + "isNaN" + "parseFloat" + "parseInt" + "decodeURI" + "decodeURIComponent" + "encodeURI" + "encodeURIComponent" + "require")) + ; Constructor ;------------ |
