]> git.eshelyaron.com Git - emacs.git/commit
Clean up font-lock rules in js-ts-mode
authorYuan Fu <casouri@gmail.com>
Thu, 29 Dec 2022 00:52:47 +0000 (16:52 -0800)
committerYuan Fu <casouri@gmail.com>
Thu, 29 Dec 2022 01:32:47 +0000 (17:32 -0800)
commite78e69b33189c653d1588b810283969ac3cca137
treef857e8c1e931c2101befe508aa3fba632919fabb
parent0a61e4e2b7189679df8ab3617e174b8b36afcf80
Clean up font-lock rules in js-ts-mode

Changes for each feature:

- string: Take out string-interpolation bits.
- string-interpolation: New.
- declaration: Rename to definition.
- identifier: Remove.
- property: Use a pred to filter out methods.
- expression: Rename to assignment.
- function: New.
- pattern: Merge into assignment.

* lisp/progmodes/js.el (js--treesit-font-lock-settings): See above.
(js--treesit-property-not-function-p)
(js--treesit-lhs-identifier-query): New variable.
(js--treesit-fontify-assignment-lhs): New functions.
(js-ts-mode): Update feature list.
lisp/progmodes/js.el