From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lxc-smtp2.ens-lyon.fr (lxc-smtp2.ens-lyon.fr [140.77.167.81]) by sourceware.org (Postfix) with ESMTP id D279738560BF; Thu, 28 Jul 2022 21:43:59 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org D279738560BF Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=ens-lyon.fr Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=ens-lyon.fr Received: from localhost (localhost [127.0.0.1]) by lxc-smtp2.ens-lyon.fr (Postfix) with ESMTP id ED46CE57CA; Thu, 28 Jul 2022 23:43:57 +0200 (CEST) X-Virus-Scanned: by amavisd-new-2.11.0 (20160426) (Debian) at ens-lyon.fr Received: from lxc-smtp2.ens-lyon.fr ([127.0.0.1]) by localhost (lxc-smtp2.ens-lyon.fr [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id OsPVuGa0HtSL; Thu, 28 Jul 2022 23:43:57 +0200 (CEST) Received: from webmail.ens-lyon.fr (lxc-m2-webmail1.ens-lyon.fr [140.77.167.52]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client did not present a certificate) by lxc-smtp2.ens-lyon.fr (Postfix) with ESMTPSA id F24DFE57C7; Thu, 28 Jul 2022 23:43:56 +0200 (CEST) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII; format=flowed Content-Transfer-Encoding: 7bit Date: Fri, 29 Jul 2022 06:43:56 +0900 From: Iannetta Paul To: Alexander Monakov Cc: David Malcolm , gcc@gcc.gnu.org, Gcc Subject: Re: Setting up editors for the GNU/GCC coding style? In-Reply-To: References: Message-ID: X-Sender: paul.iannetta@ens-lyon.fr User-Agent: Roundcube Webmail/1.2.7 X-Spam-Status: No, score=-1.4 required=5.0 tests=BAYES_00, JMQ_SPF_NEUTRAL, KAM_DMARC_STATUS, SPF_HELO_NONE, SPF_PASS autolearn=no autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org X-BeenThere: gcc@gcc.gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gcc mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 28 Jul 2022 21:44:01 -0000 On 2022-07-28 21:00, Alexander Monakov via Gcc wrote: > On Thu, 28 Jul 2022, David Malcolm via Gcc wrote: > > The tricky part is setting it up so it doesn't die indexing the > codebase > (e.g. adding the entire toplevel directory probably won't work: it will > try to index the testsuites). > > FWIW, CLion documentation shows how to select GNU coding style, but as > above, that's not the main worry: > https://www.jetbrains.com/help/clion/predefined-code-styles.html > > Alexander Unless I am mistaken, I don't think that modern editors have support for autotools based projects, so they won't even attempt indexing the files. For the indexing, I produce a compile_commands.json file (recording only the files compiled by `make all', this includes auto-generated files such as config.h, and the insn-something.{h,c} files) with the help of https://github.com/gicmo/cdcc, this file is then picked up by the language server, which then provides nice autocompletion features. About configuring recent editors to follow the GNU coding style, I don't really know but it should always be possible to register a hook that will run `indent` when the file is saved. Paul