GNU bug report logs - #66004
[PATCH] Offset ranges before applying embeded treesit parsers

Previous Next

Package: emacs;

Reported by: Danny Freeman <danny <at> dfreeman.email>

Date: Fri, 15 Sep 2023 15:57:01 UTC

Severity: normal

Tags: patch

Done: Stefan Kangas <stefankangas <at> gmail.com>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: help-debbugs <at> gnu.org (GNU bug Tracking System)
To: Stefan Kangas <stefankangas <at> gmail.com>
Cc: tracker <at> debbugs.gnu.org
Subject: bug#66004: closed ([PATCH] Offset ranges before applying embeded
 treesit parsers)
Date: Mon, 18 Sep 2023 22:53:02 +0000
[Message part 1 (text/plain, inline)]
Your message dated Mon, 18 Sep 2023 15:52:43 -0700
with message-id <CADwFkmkA4b65KYHc-8feyXramv7jOt62ypQRe4+HSf64uUCbOQ <at> mail.gmail.com>
and subject line Re: bug#66004: [PATCH] Offset ranges before applying embeded treesit parsers
has caused the debbugs.gnu.org bug report #66004,
regarding [PATCH] Offset ranges before applying embeded treesit parsers
to be marked as done.

(If you believe you have received this mail in error, please contact
help-debbugs <at> gnu.org.)


-- 
66004: https://debbugs.gnu.org/cgi/bugreport.cgi?bug=66004
GNU Bug Tracking System
Contact help-debbugs <at> gnu.org with problems
[Message part 2 (message/rfc822, inline)]
From: Danny Freeman <danny <at> dfreeman.email>
To: bug-gnu-emacs <at> gnu.org, Yuan Fu <casouri <at> gmail.com>
Subject: [PATCH] Offset ranges before applying embeded treesit parsers
Date: Fri, 15 Sep 2023 11:45:00 -0400
[Message part 3 (text/plain, inline)]
Background: In clojure-ts-mode I've been capturing docstrings and
applying some limited syntax highlighting using an embedded markdown
parser. I'm only able to capture the full string, "quotes included". I
would like to be able to easily adjust the ranges captured to only
include the contents of the string, delimiters excluded. I have a
similar desire to capture the contents of a regular expression literal
and apply a nested regex grammar.

I've seen an offset mechanism used by the neovim tree-sitter integration
for similar purposes.

I believe the javascript/typescript modes could take advantage of this
with template strings. I've included a small test in the patch that
demonstrates this.

[0001-Offset-ranges-before-applying-embedded-tree-sitter-p.patch (text/x-patch, attachment)]
[Message part 5 (text/plain, inline)]
Let me know what you think.

Thank you,
-- 
Danny Freeman
[Message part 6 (message/rfc822, inline)]
From: Stefan Kangas <stefankangas <at> gmail.com>
To: Yuan Fu <casouri <at> gmail.com>
Cc: 66004-done <at> debbugs.gnu.org, Danny Freeman <danny <at> dfreeman.email>
Subject: Re: bug#66004: [PATCH] Offset ranges before applying embeded treesit
 parsers
Date: Mon, 18 Sep 2023 15:52:43 -0700
Yuan Fu <casouri <at> gmail.com> writes:

> I made some minor changes and pushed to master, thanks again!

It seems like the patch was installed, but was left open in the bug
tracker.  I'm therefore closing it now.


This bug report was last modified 1 year and 250 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.