[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Standardizing tree-sitter fontification features
From: |
Theodor Thornhill |
Subject: |
Re: Standardizing tree-sitter fontification features |
Date: |
Mon, 05 Dec 2022 09:58:03 +0100 |
Mattias Engdegård <mattias.engdegard@gmail.com> writes:
> 3 dec. 2022 kl. 02.12 skrev Yuan Fu <casouri@gmail.com>:
>
>> - doc-comment seems rather non-standards, and could even be different
>> from project to project.
>
> They actually tend to be quite well standardised for most
> languages. Main exceptions are C and C++, but even there Doxygen seems
> to dominate.
>
>> So I tend to think it should be turned on/off by a major mode
>> variable in major modes that support this feature. And user can
>> enable/disable it with dir-local or file-local variables.
>
> I definitely think doc comments should be painted differently from
> other comments by default, at least for languages where there is a
> clear standard.
I agree - but in most tree-sitter languages it seems like there usually
is no distinction between them. We need to implement some heuristics to
locate a comment above method etc, if I'm not mistaken.
Theo