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


Message #8 received at 66004 <at> debbugs.gnu.org (full text, mbox):

From: Eli Zaretskii <eliz <at> gnu.org>
To: Danny Freeman <danny <at> dfreeman.email>
Cc: casouri <at> gmail.com, 66004 <at> debbugs.gnu.org
Subject: Re: bug#66004: [PATCH] Offset ranges before applying embeded treesit
 parsers
Date: Sun, 17 Sep 2023 13:07:54 +0300
> Date: Fri, 15 Sep 2023 11:45:00 -0400
> From:  Danny Freeman via "Bug reports for GNU Emacs,
>  the Swiss army knife of text editors" <bug-gnu-emacs <at> gnu.org>
> 
> 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.

Yuan, any comments?




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.