Make python-ts-mode's syntax-highlighting more standardized
This was brought up in a Reddit discussion. * lisp/progmodes/python.el (python--treesit-fontify-variable): Use font-lock-variable-use-face (since it applies to references). (python-ts-mode): Move 'property' from 3rd to 4th treesit-font-lock-level.
This commit is contained in:
parent
99658346d1
commit
1978b603bc
1 changed files with 3 additions and 3 deletions
|
@ -1225,7 +1225,7 @@ For NODE, OVERRIDE, START, END, and ARGS, see
|
|||
(when (python--treesit-variable-p node)
|
||||
(treesit-fontify-with-override
|
||||
(treesit-node-start node) (treesit-node-end node)
|
||||
'font-lock-variable-name-face override start end)))
|
||||
'font-lock-variable-use-face override start end)))
|
||||
|
||||
|
||||
;;; Indentation
|
||||
|
@ -6717,8 +6717,8 @@ implementations: `python-mode' and `python-ts-mode'."
|
|||
'(( comment definition)
|
||||
( keyword string type)
|
||||
( assignment builtin constant decorator
|
||||
escape-sequence number property string-interpolation )
|
||||
( bracket delimiter function operator variable)))
|
||||
escape-sequence number string-interpolation )
|
||||
( bracket delimiter function operator variable property)))
|
||||
(setq-local treesit-font-lock-settings python--treesit-settings)
|
||||
(setq-local imenu-create-index-function
|
||||
#'python-imenu-treesit-create-index)
|
||||
|
|
Loading…
Add table
Reference in a new issue