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: João Paulo Labegalini de Carvalho
Subject: Re: Initial fontification in sh-mode with tree-sittter
Date: Fri, 28 Oct 2022 10:34:56 -0600



On Fri, Oct 28, 2022 at 10:15 AM Stefan Monnier <monnier@iro.umontreal.ca> wrote:
Indeed, it's sad.  It's goes against the idea being
`treesit-font-lock-feature-list` which is to map features to levels.

It doesn't make much sense to call a highlight feature "moderate".
Highlight feature names should be things like "function names", "nested
functions", "multiline docstrings", "punctuation".

I agree with that. It seems that the initial effort on using tree-sitter was following font-lock notions too closely.

For instance, if we are creating features such as "function names", "nested functions", and "punctuation" does it still make sense to have something like `font-lock-maximum-decoration'? Because, it is not clear to me how we can say that fontifying "multiline docstrings" is a *higher* decoration than fontifying "function names".

Maybe the items in the list should not have a priority of particular order, their presence just serves to enable, while their absence disables, the fontification of a particular feature.

I will isolate the queries to mirror the idea of each feature map to program constructs as suggested.


--
João Paulo L. de Carvalho
Ph.D Computer Science |  IC-UNICAMP | Campinas , SP - Brazil
Postdoctoral Research Fellow | University of Alberta | Edmonton, AB - Canada
joao.carvalho@ic.unicamp.br
joao.carvalho@ualberta.ca

reply via email to

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