emacs-devel
[Top][All Lists]
Advanced

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

Re: Average-user-facing interface for tree-sitter


From: Stefan Monnier
Subject: Re: Average-user-facing interface for tree-sitter
Date: Thu, 20 Oct 2022 13:53:14 -0400
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/29.0.50 (gnu/linux)

>> Yes, sorry, I made some further changes to js-mode. Could you have a look
>> and see if it makes sense?
>>
> I'm not sure I really like the new changes.

[ Context: I'm largely to blame, I proposed the change.  ]

> Now we init everything in
> js-mode in addition to everything treesitter related.  So now stuff like
>
> ```
>   (setq-local font-lock-defaults
>               (list js--font-lock-keywords nil nil nil nil
>                     '(font-lock-syntactic-face-function
>                       . js-font-lock-syntactic-face-function)))
>   (setq-local syntax-propertize-function #'js-syntax-propertize)
>   (add-hook 'syntax-propertize-extend-region-functions
>             #'syntax-propertize-multiline 'append 'local)
>   (add-hook 'syntax-propertize-extend-region-functions
>             #'js--syntax-propertize-extend-region 'append 'local)
>   (setq-local prettify-symbols-alist js--prettify-symbols-alist)
>
>   (setq-local parse-sexp-ignore-comments t)
> ```

Hmm... yeah, undoing those add-hook settings of various other variables
which treesit-mode doesn't use is a problem.  We need to find
a better way.


        Stefan




reply via email to

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