bug-gnu-emacs
[Top][All Lists]
Advanced

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

bug#67061: [PATCH] Improve syntax highlighting for python-ts-mode


From: Dmitry Gutov
Subject: bug#67061: [PATCH] Improve syntax highlighting for python-ts-mode
Date: Thu, 14 Dec 2023 03:31:12 +0200
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.13.0

On 13/12/2023 23:16, Stefan Kangas wrote:
Dmitry Gutov <dmitry@gutov.dev> writes:

I don't know at what stage we're going to start worrying when adding new
elements to the queries, though, in fear of breaking compatibility with
some potential older version of the grammar.

Right.  But can we really stop installing support for new language
features that users expect?

Some less important ones -- maybe. E.g. syntax highlighting is less essential than indentation. Though it's usually easier to implement (with tree-sitter, at least).

I'm not super close to the tree-sitter stuff to be honest, so apologies
if I misunderstood something.  But IIUC, the current situation means
that we can't depend on concrete versions of grammars, which means we
can't depend on that to make adaptions.  But that situation is not
really caused by us, right?

We made our choices here too:

- Trying to support different versions of grammars, not just the latest ones. Or a "pinned" revision.
- Adding treesit modes to the core, rather than publishing them to ELPA.

So maybe at the point when we find problems in practice, we should just
throw up our hands and urge users to upgrade.  Perhaps it'll encourage
more work on improving the situation with grammar versioning.

Simply asking our users to upgrade to the latest grammar won't work if the major mode they are using is only compatible with some older grammar version. And it's not upgradable because the major mode is not in ELPA.

We might solve this in the future with a two-step: "throwing up our hands" and publishing major modes to "ELPA core". treesit.el will probably need to stabilize a bit more before that, though.





reply via email to

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