[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Detecting tree-sitter based major-modes for end-user customization a
From: |
Stefan Monnier |
Subject: |
Re: Detecting tree-sitter based major-modes for end-user customization and third party functions/packages |
Date: |
Tue, 20 Dec 2022 15:03:25 -0500 |
User-agent: |
Gnus/5.13 (Gnus v5.13) |
>>> Looking at (treesit-major-mode-setup), I can't see it leaving any traces to
>>> be reliably detected later. Should we add some (documented) buffer-local
>>> variables to be able to detect this later? Should we create a mostly empty
>>> minor-mode for easy detection and ability to add hooks?
>> (treesit-parser-list) seems like a good first approximation, tho I guess
>> it depends exactly what they want to do with that info.
> That name isn't very intuitive for what it does,
AFAIK what it does is return a list of parsers currently setup in the
buffer, so its name seems very intuitive.
Maybe you're thinking of using it for some other purpose?
If so, please describe which one.
Stefan