From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.devel Subject: Re: c-ts-mode Date: Fri, 08 Sep 2023 21:23:27 +0300 Message-ID: <83bkecwmlc.fsf@gnu.org> References: <5F73CB5D-DB00-439F-AD7C-7E209EC83A35@gmail.com> <83jzt2z5mk.fsf@gnu.org> <83y1hhykni.fsf@gnu.org> <877cp1lvih.fsf@gmail.com> <83v8clyhqi.fsf@gnu.org> <83tts5ygv2.fsf@gnu.org> <83msxxxkc0.fsf@gnu.org> <871qf9ktxd.fsf@gmail.com> <838r9gykia.fsf@gnu.org> <83pm2sx10t.fsf@gnu.org> <83msxwx02s.fsf@gnu.org> <83jzt0wueo.fsf@gnu.org> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="8317"; mail-complaints-to="usenet@ciao.gmane.io" Cc: theo@thornhill.no, casouri@gmail.com, spacibba@aol.com, emacs-devel@gnu.org To: =?utf-8?B?Sm/Do28gVMOhdm9yYQ==?= Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Fri Sep 08 20:24:25 2023 Return-path: Envelope-to: ged-emacs-devel@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1qeg9Y-0001oO-TK for ged-emacs-devel@m.gmane-mx.org; Fri, 08 Sep 2023 20:24:25 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qeg8p-0000XX-Bt; Fri, 08 Sep 2023 14:23:39 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1qeg8n-0000X3-55 for emacs-devel@gnu.org; Fri, 08 Sep 2023 14:23:37 -0400 Original-Received: from fencepost.gnu.org ([2001:470:142:3::e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1qeg8l-0005Ny-Pa; Fri, 08 Sep 2023 14:23:35 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=MIME-version:References:Subject:In-Reply-To:To:From: Date; bh=DxHvcxx7HonxZTma5XGRaLAq9FaMMJS8XWkwfuZ9+8Q=; b=kR0UmviECRftuuv7TJOS x41fgmDSNqTnOP3WiM3M+wa3mVeSb3m9uHv2XP3We2f090aXKKWVIB+WmiKBHY/jX0eLkRw89aVfU 53KiiWZWqsGAYi0B6wFxJeKC12HZvWv/yXohc82w2J7Gy0NqD/UIHp8HRZunR0mfgV1iKajTL1pQA pRq8vye0Y2g+Ly0mJFV/RZ9atYuM2G774WgObhn6LVc7+fZHC9epmIuqJDETIX3jbgQ1cm9AZfG1/ JIKGwbJaileO7o5cAizPRN4X6TuhcppCSWcMrjZR/QXE6JPuMAa+9BaK53iHSA3sxetWi8eKhbxsT q/PIOOR7PuU+DA==; In-Reply-To: (message from =?utf-8?B?Sm/Do28gVMOhdm9yYQ==?= on Fri, 8 Sep 2023 16:56:20 +0100) X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.devel:310348 Archived-At: > From: João Távora > Date: Fri, 8 Sep 2023 16:56:20 +0100 > Cc: theo@thornhill.no, casouri@gmail.com, spacibba@aol.com, > emacs-devel@gnu.org > > OK, but then you'll have to deal with the abstraction problem which > is being solved by LSP servers at the moment, quite effectively. > It's fine to want this but the motivation you'll find > for working on this item is affected That's because that "minimum > command" you mention already exists in practice > > Are you aware of eslint, prettier, gofmt, rustfmt, and whatever > other formatter programs are out there? Or do you just want > to support clang-format for the Emacs project and other C/C++ > projects? I'd start with the latter. But that's something for the volunteer who takes up that job to figure out. > Anyway, do you also want to support this without external tools > at all (i.e. without relying on the clang-format program at all?) > Your TODO item seems to say so. Yes, if possible. > If so, then going that route means basically writing a translator > of clang-format -> Emacs treesitter rules. Maybe it's easier than > I think, and the main advantage is it will plug into > indent-line-function and indent-region-function rather easily. > And, who knows, some code can be reused for writing translators of > other formatters. Yes. > Anyway I wouldn't discard the "LSP shortcut" idea. I didn't discard it.