mirror of
https://github.com/masscollaborationlabs/emacs.git
synced 2025-07-06 20:29:36 +00:00
Fix python-ts-mode built-in functions and attributes (bug#70478)
* lisp/progmodes/python.el (python--treesit-settings): Change the treesitter query to fetch the correct type of node for built-in functions and attributes and highlight them with corresponding font-lock face.
This commit is contained in:
parent
dc720decc3
commit
afd0b548fc
1 changed files with 9 additions and 7 deletions
|
@ -1187,13 +1187,15 @@ fontified."
|
||||||
|
|
||||||
:feature 'builtin
|
:feature 'builtin
|
||||||
:language 'python
|
:language 'python
|
||||||
`(((identifier) @font-lock-builtin-face
|
`((call function: (identifier) @font-lock-builtin-face
|
||||||
(:match ,(rx-to-string
|
(:match ,(rx-to-string
|
||||||
`(seq bol
|
`(seq bol (or ,@python--treesit-builtins) eol))
|
||||||
(or ,@python--treesit-builtins
|
@font-lock-builtin-face))
|
||||||
,@python--treesit-special-attributes)
|
(attribute attribute: (identifier) @font-lock-builtin-face
|
||||||
eol))
|
(:match ,(rx-to-string
|
||||||
@font-lock-builtin-face)))
|
`(seq bol
|
||||||
|
(or ,@python--treesit-special-attributes) eol))
|
||||||
|
@font-lock-builtin-face)))
|
||||||
|
|
||||||
:feature 'decorator
|
:feature 'decorator
|
||||||
:language 'python
|
:language 'python
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue