[Top][All Lists]

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

Re: Need for "-ts-mode" modes

From: Eli Zaretskii
Subject: Re: Need for "-ts-mode" modes
Date: Thu, 29 Dec 2022 19:42:08 +0200

> From: Philip Kaludercic <philipk@posteo.net>
> Date: Thu, 29 Dec 2022 17:08:09 +0000
> The issue has been discussed before, but I failed to understand the
> point of duplicating a lot of modes

Because this was the simplest way, that created no complications,
neither to users nor to the code, and could be added in
backward-compatible ways.

> or creating new modes that depend
> on tree-sitter and that don't work or even try to provide some fall-back
> if the library is not available.

I fail to see what's wrong with that.  It is entirely legitimate to
have a major mode which depends on an optional feature and doesn't
work without it.  Besides, we've lived this far without major modes
for those languages, so adding a tree-sitter based one cannot possibly
do any harm, it can only make things better for Emacs.

> Or the re-phrase the question, why can't tree-sitter support be
> implemented by extending `define-derived-mode', ideally in such a way
> that can be translated to some kind of font-lock rules for basic syntax
> if the library is not installed.

Because it doesn't work.  Tree-sitter supported modes are not derived
modes, they are completely different modes with different settings
which make no sense when tree-sitter is not used.

reply via email to

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