From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-wr1-x432.google.com (mail-wr1-x432.google.com [IPv6:2a00:1450:4864:20::432]) by sourceware.org (Postfix) with ESMTPS id A794238582AA for ; Fri, 29 Jul 2022 07:36:45 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org A794238582AA Received: by mail-wr1-x432.google.com with SMTP id h8so4978476wrw.1 for ; Fri, 29 Jul 2022 00:36:45 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:in-reply-to:references:date :message-id:user-agent:mime-version; bh=cwv7cInCIjuC2iCKuOXRsot3H3n5/+CjH6Kknw25jMI=; b=7vUDqilVeLS4Bo4DfVdMgW6KUdXh0WhnEwKIlwalMq1WcYGGrQU0jHwoLgY+w9GX1x LKI0RVyWLB/dFSl3udovH1p1wB8I9iK+THY5YJ7ksi5RxTkWmrhxIcmgRxuLID7+TeX9 hQwRgj9MoDJgRUdW8FJe0a+5W94+Zyo2G1yl0XYldgy+fKR630asTEgk7PBcE27e4I7/ FF9NZ50HA3KUXjtODAMRVv21ujaVZfNRs5EggpIu1kFryIHzve2VGmpJctaFtpXvU98U 6AC1xlBdOp4QTGU4ylscygykl8HpbP9gZ3jLFMdD08XQpY+HIn4vTv4rIvy1H8LFBJ7O wy2w== X-Gm-Message-State: ACgBeo0mWqPISfNKooKVTgziu9DG2UvSLe9b+kqv4783MoeyuO6Tb0Tr 8rvs0MLlsCXdjFbZ9E/HoUTeEw== X-Google-Smtp-Source: AA6agR6CHixKrG1HlcdjPOiBcXb6WPYugTxrnb2Yu+camncfqAoketpbwkUEAq+DGV97BBMWtLBwzg== X-Received: by 2002:a5d:650c:0:b0:21e:9b19:497 with SMTP id x12-20020a5d650c000000b0021e9b190497mr1435011wru.541.1659080204086; Fri, 29 Jul 2022 00:36:44 -0700 (PDT) Received: from poulhies-Precision-5550 (static-176-191-105-132.ftth.abo.bbox.fr. [176.191.105.132]) by smtp.gmail.com with ESMTPSA id e6-20020a5d65c6000000b0021d888e1132sm2960872wrw.43.2022.07.29.00.36.43 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 29 Jul 2022 00:36:43 -0700 (PDT) From: Marc Poulhies To: David Malcolm Cc: Alexander Monakov , gcc@gcc.gnu.org, Gcc , Iannetta Paul Subject: Re: Setting up editors for the GNU/GCC coding style? In-Reply-To: (Iannetta Paul's message of "Fri, 29 Jul 2022 06:43:56 +0900") References: Date: Fri, 29 Jul 2022 09:36:41 +0200 Message-ID: <8735ekmkty.fsf@adacore.com> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/29.0.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Status: No, score=-3.2 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, RCVD_IN_DNSWL_NONE, SPF_HELO_NONE, SPF_PASS, TXREP autolearn=unavailable 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: Fri, 29 Jul 2022 07:36:47 -0000 Iannetta Paul writes: Hi Paul :) > 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. I'm using the same process, but with the 'bear' command: https://github.com/rizsotto/Bear I know other here are also using it. As creating the json file can be long, I usually do a non-parallel build (had issues with parallel jobs) when I'm not coding. > 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. There is a clang-format config file in contrib that one can symlink in the root dir as .clang-format. I hope/guess tools like CLion can pick it and use it? At least this can be used to indent using clang-format tools and derivatives (like git-clang-format). In the GCC Rust project, we are using it (but judging by Jakub's last review for Philip's patch, the config is maybe not exhaustive, or our setup is not correct). Marc