unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: Yuan Fu <casouri@gmail.com>
To: ronisbr@ronanarraes.com
Cc: 60223@debbugs.gnu.org
Subject: bug#60223: 29.0.60; Improve how tree-sitter changes to  treesit--font-lock-fast-mode
Date: Sat, 24 Dec 2022 01:33:01 -0800	[thread overview]
Message-ID: <A183112E-93ED-4464-8171-328BCFA063CD@gmail.com> (raw)
In-Reply-To: <2e1e12123516721aed9e7e4ba8fe5409@ronanarraes.com>


ronisbr <ronisbr@ronanarraes.com> writes:

> Hi Yuan!
>
> Em 2022-12-21 01:17, Yuan Fu escreveu:
>> Thanks for the report!
>> The "fast mode" should be buffer-local, so that particular file
>> shouldn’t affect other buffers. Just to make sure, you said that if you
>> open print.jl first, all other files are affected?
>
> Sorry for the misunderstanding. Indeed, only print.jl is affected.
>
> The behavior is:
>
>     1. If I open `print.jl` as the first file, the fast mode is
>     activated,
>        and the buffer shows a very strange font lock. All other buffers
>        (including Julia files) work as expected.
>     2. If I open any other Julia file and then I open `print.jl`, the
>     fast
>        mode is not activated, and everything works as expected.

Cool, that makes much more sence.

>> And I agree that the 0.01 second criterion is a crude one, but a long
>> string shouldn’t affect the _query_ time, and that string is not
>> long at
>> all, far from enough to make tree-sitter query to slow down. Let me
>> investigate and see what’s the real cause, and if this can be solved by
>> better solutions than making the threshold customizable. We can’t
>> expect
>> everyone to be able to pinpoint the culprit like you did :-)
>> Yuan
>
> Thanks! Let me know if I can help debugging :)

Which julia parser are you using? I installed the "official" one at
here: https://github.com/tree-sitter/tree-sitter-julia

but some queries in julia-ts-mode.el are not accepted by it, like the
(true) pattern: the parser I downloaded wants "true" instead.

Also julia-ts-mode has this code

(set-electric! 'julia-ts-mode
    :words '("catch"
             "else"
             "elseif"
             "finally"
             "end"))

which seems like a doom macro or something, since I don’t have doom
Emacs complains about undefined function. I commented it out so no
biggy, just FYI.

Yuan





  parent reply	other threads:[~2022-12-24  9:33 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-12-20 14:08 bug#60223: 29.0.60; Improve how tree-sitter changes to treesit--font-lock-fast-mode ronisbr via Bug reports for GNU Emacs, the Swiss army knife of text editors
2022-12-21  4:17 ` Yuan Fu
2022-12-21 15:59   ` ronisbr via Bug reports for GNU Emacs, the Swiss army knife of text editors
2022-12-24  9:33 ` Yuan Fu [this message]
2022-12-27  3:16   ` ronisbr via Bug reports for GNU Emacs, the Swiss army knife of text editors

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=A183112E-93ED-4464-8171-328BCFA063CD@gmail.com \
    --to=casouri@gmail.com \
    --cc=60223@debbugs.gnu.org \
    --cc=ronisbr@ronanarraes.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).