public inbox for gcc@gcc.gnu.org
 help / color / mirror / Atom feed
From: Marc Poulhies <poulhies@adacore.com>
To: David Malcolm <dmalcolm@redhat.com>
Cc: Alexander Monakov <amonakov@ispras.ru>,
	 gcc@gcc.gnu.org,
	 Gcc <gcc-bounces+paul.iannetta=ens-lyon.fr@gcc.gnu.org>,
	Iannetta Paul <paul.iannetta@ens-lyon.fr>
Subject: Re: Setting up editors for the GNU/GCC coding style?
Date: Fri, 29 Jul 2022 09:36:41 +0200	[thread overview]
Message-ID: <8735ekmkty.fsf@adacore.com> (raw)
In-Reply-To: <c8e42ea425cf665d0d3fe27b22ee1b17@ens-lyon.fr> (Iannetta Paul's message of "Fri, 29 Jul 2022 06:43:56 +0900")

Iannetta Paul <paul.iannetta@ens-lyon.fr> 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

  reply	other threads:[~2022-07-29  7:36 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-07-28 18:46 David Malcolm
2022-07-28 19:00 ` Alexander Monakov
2022-07-28 21:43   ` Iannetta Paul
2022-07-29  7:36     ` Marc Poulhies [this message]
2022-07-29  9:29       ` Thomas Schwinge
2022-07-29 12:34     ` Richard Earnshaw
2022-07-28 19:49 ` Tim Lange
2022-07-28 19:53   ` Jonathan Wakely
2022-08-01  8:24     ` Stefan Schulze Frielinghaus
2022-08-01 11:25       ` Jonathan Wakely
2022-08-01 12:16         ` Stefan Schulze Frielinghaus
2022-08-01 16:17           ` Jonathan Wakely
2022-08-01 10:50   ` Martin Liška

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

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=8735ekmkty.fsf@adacore.com \
    --to=poulhies@adacore.com \
    --cc=amonakov@ispras.ru \
    --cc=dmalcolm@redhat.com \
    --cc=gcc-bounces+paul.iannetta=ens-lyon.fr@gcc.gnu.org \
    --cc=gcc@gcc.gnu.org \
    --cc=paul.iannetta@ens-lyon.fr \
    /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.
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).