emacs-devel
[Top][All Lists]
Advanced

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

Re: Tree sitter support for C-like languages


From: Theodor Thornhill
Subject: Re: Tree sitter support for C-like languages
Date: Sat, 12 Nov 2022 21:03:19 +0100

Stefan Kangas <stefankangas@gmail.com> writes:

> Theodor Thornhill via "Emacs development discussions."
> <emacs-devel@gnu.org> writes:
>
>> See below patch.  Please note that I now have merged C and C++ into one
>> file, and both inherit from a new parent mode: 'c-ts-mode--base-mode'.
>> I simplified some of the indentation rules as well.
>
> Is it really a good idea to put C and C++ support in the same file?
>

Initially I thought no, but I have no strong opinions on this

> Also, the patch seems to be adding two files, but the commit message
> only mentions one of them?
>

You are correct.  Forgot to remove the old mode.  I'll fix it in
upcoming patch... Sorry, but thanks for the nice catch!

>> From 0d6e144b9a90cfd72f5cdc8480d5bbe70c281fc5 Mon Sep 17 00:00:00 2001
>> From: Theodor Thornhill <theo@thornhill.no>
>> Date: Thu, 10 Nov 2022 17:15:49 +0100
>> Subject: [PATCH] Add Tree Sitter modes for C-like languages
>>
>> * etc/NEWS: Mention the new modes
>> * lisp/progmodes/c-ts-mode.el: New major mode with Tree Sitter support
>> for C and C++.
>> * lisp/progmodes/java-ts-mode.el: New major mode with Tree Sitter support.
>> * lisp/progmodes/json-ts-mode.el: New major mode with Tree Sitter support.
>> * lisp/progmodes/css-ts-mode.el: New major mode with Tree Sitter support.
>> ---
>>  etc/NEWS                       |  32 ++-
>>  lisp/progmodes/c++-ts-mode.el  | 424 +++++++++++++++++++++++++++++++
>>  lisp/progmodes/c-ts-mode.el    | 445 +++++++++++++++++++++++++++++++++
>>  lisp/progmodes/css-ts-mode.el  | 131 ++++++++++
>>  lisp/progmodes/java-ts-mode.el | 289 +++++++++++++++++++++
>>  lisp/progmodes/json-ts-mode.el | 150 +++++++++++
>>  6 files changed, 1467 insertions(+), 4 deletions(-)
>>  create mode 100644 lisp/progmodes/c++-ts-mode.el
>>  create mode 100644 lisp/progmodes/c-ts-mode.el
>>  create mode 100644 lisp/progmodes/css-ts-mode.el
>>  create mode 100644 lisp/progmodes/java-ts-mode.el
>>  create mode 100644 lisp/progmodes/json-ts-mode.el
> [...]

-- 
Theo



reply via email to

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