emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Initial fontification in sh-mode with tree-sittter


From: Eli Zaretskii
Subject: Re: Initial fontification in sh-mode with tree-sittter
Date: Wed, 02 Nov 2022 21:17:52 +0200

> From: João Paulo Labegalini de Carvalho <jaopaulolc@gmail.com>
> Date: Wed, 2 Nov 2022 12:34:56 -0600
> 
> Yes, the fontification in the buffer is still not updated correctly.
> 
> With the step below, the definition of function foo is not re-fontified and 
> remains with string-face until C-x x f is
> executed.
> 
> emacs -Q from top of the feature/tree-sitter branch
> M-: (require 'treesit)
> M-x customize-variable treesit-settings RET
> Set "Activate" to "Yes" and apply the change.
> C-x b sample.py RET
> M-x python-mode
> Write the following program:
> 
> def main():
>     return 0
> 
> M-<
> """
> M->
> """ (at this point everything is in string-face, as expected)
> C-a
> C-k (everything is still fontified as string)
> C-x x f (leading """ is not fontified and definition of foo is correctly 
> fontified)
> 
> I am interested in understanding what is causing this as a similar thing 
> happens with heredocs in sh-mode &
> tree-sitter.

Yuan, can you look into this?  It sounds like some general problem
with integration of tree-sitter with jit-lock.  Or maybe something is
missing from the way tree-sitter nodes are mapped into face text
properties.  Are the faces actually being put on the relevant text,
for starters?



reply via email to

[Prev in Thread] Current Thread [Next in Thread]