]> git.eshelyaron.com Git - emacs.git/commit
Add more/finer faces for tree-sitter
authorDmitry Gutov <dgutov@yandex.ru>
Sat, 25 Feb 2023 01:15:46 +0000 (03:15 +0200)
committerDmitry Gutov <dgutov@yandex.ru>
Sat, 25 Feb 2023 01:35:08 +0000 (03:35 +0200)
commita795c51f6053272de61bc1721305e3c15ff424ee
tree4dcc2aea937392b95296c4b943059f1d5c454800
parent146bce49321da3b65d0a0e0326bb54cf1e79551c
Add more/finer faces for tree-sitter

* doc/lispref/modes.texi (Faces for Font Lock):
Update the list of faces (bug#61655).

* etc/NEWS: Update the list of new faces.

* lisp/cus-theme.el (custom-theme--listed-faces): Update.

* lisp/font-lock.el (font-lock-function-call-face)
(font-lock-variable-ref-face, font-lock-property-ref-face):
New faces.
(font-lock-property-name-face):
Rename from 'font-lock-property-face'.

* lisp/progmodes/c-ts-mode.el (c-ts-mode--font-lock-settings):
Use new faces.  More 'enumerator' query to 'definition' feature.
(c-ts-mode--fontify-declarator, c-ts-mode--fontify-variable):
Use new faces.

* lisp/progmodes/cmake-ts-mode.el
(cmake-ts-mode--font-lock-settings): Use new faces.

* lisp/progmodes/csharp-mode.el
(csharp-ts-mode--font-lock-settings): Use new faces.

* lisp/progmodes/go-ts-mode.el (go-ts-mode--font-lock-settings):
Use new faces.

* lisp/progmodes/java-ts-mode.el
(java-ts-mode--font-lock-settings): Use new faces.

* lisp/progmodes/js.el (js--treesit-fontify-assignment-lhs)
(js--treesit-font-lock-settings): Use new faces.  Highlight
variable definitions inside array and object destructuring
patterns.

* lisp/progmodes/python.el (python--treesit-variable-p):
Exclude identifiers in parameters.
(python--treesit-settings): Use new faces.  Highlight function
parameters.  Move 'keyword' up to still highlight 'self' as
keyword.

* lisp/progmodes/ruby-ts-mode.el (ruby-ts--font-lock-settings):
Use new faces.

* lisp/progmodes/rust-ts-mode.el
(rust-ts-mode--font-lock-settings): Use new faces.

* lisp/progmodes/typescript-ts-mode.el
(typescript-ts-mode--font-lock-settings): Use new faces.

* lisp/textmodes/css-mode.el (css--treesit-settings):
Use font-lock-property-ref-face.

* lisp/textmodes/toml-ts-mode.el
(toml-ts-mode--font-lock-settings):
Use font-lock-property-ref-face.

* lisp/textmodes/yaml-ts-mode.el
(yaml-ts-mode--font-lock-settings): Same.
18 files changed:
doc/lispref/modes.texi
etc/NEWS
lisp/cus-theme.el
lisp/font-lock.el
lisp/progmodes/c-ts-mode.el
lisp/progmodes/cmake-ts-mode.el
lisp/progmodes/csharp-mode.el
lisp/progmodes/go-ts-mode.el
lisp/progmodes/java-ts-mode.el
lisp/progmodes/js.el
lisp/progmodes/json-ts-mode.el
lisp/progmodes/python.el
lisp/progmodes/ruby-ts-mode.el
lisp/progmodes/rust-ts-mode.el
lisp/progmodes/typescript-ts-mode.el
lisp/textmodes/css-mode.el
lisp/textmodes/toml-ts-mode.el
lisp/textmodes/yaml-ts-mode.el