unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: Ergus via "Bug reports for GNU Emacs, the Swiss army knife of text editors" <bug-gnu-emacs@gnu.org>
To: 72388@debbugs.gnu.org
Cc: Yuan Fu <casouri@gmail.com>
Subject: bug#72388: 31.0.50; Use tree-sitter-cuda grammar but with tree-sitter-cpp's font-lock/indentation rules
Date: Tue, 13 Aug 2024 01:10:57 +0200	[thread overview]
Message-ID: <j77vrtrwipskv52jzhoilntlm2gqamvt7ledyeuxkugrsh7ojy@sl3msvhlp73y> (raw)
In-Reply-To: <4138B715-7C8D-4904-8D0A-616BA556AD4C@gmail.com>

Hi Yuan:

I am just trying to use the new treesit-language-remap-alist and so far
I understand your idea of how to make it work for the basics. But it is
not clear how can I use the new var to add the new syntax entries.

I mean, looking at the grammar:

https://github.com/tree-sitter-grammars/tree-sitter-cuda/blob/master/grammar.js

You can see that it is the inherited C++ syntax, with extra entries in
some fields (like _declaration_modifiers or delete_expression). For this
part the new variable may work perfectly.

However there are a few "new" entries like: kernel_call_expression,
kernel_call_syntax and launch_bounds that will need special handling.

What's your suggestion?

I mean, for the latest what we really need is to extend (partially
redefine) the c-ts-mode--indent-styles, c-ts-mode--keywords and so on.

Is that the intended approach?

Best,
Ergus





  reply	other threads:[~2024-08-12 23:10 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <j77vrtrwipskv52jzhoilntlm2gqamvt7ledyeuxkugrsh7ojy.ref@sl3msvhlp73y>
2024-07-31  0:05 ` bug#72388: 31.0.50; Use tree-sitter-cuda grammar but with tree-sitter-cpp's font-lock/indentation rules Yuan Fu
2024-08-12 23:10   ` Ergus via Bug reports for GNU Emacs, the Swiss army knife of text editors [this message]
2024-08-20  3:44     ` Yuan Fu

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=j77vrtrwipskv52jzhoilntlm2gqamvt7ledyeuxkugrsh7ojy@sl3msvhlp73y \
    --to=bug-gnu-emacs@gnu.org \
    --cc=72388@debbugs.gnu.org \
    --cc=casouri@gmail.com \
    --cc=spacibba@aol.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).