From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from smtp-out2.suse.de (smtp-out2.suse.de [195.135.220.29]) by sourceware.org (Postfix) with ESMTPS id 0A146385829E for ; Mon, 1 Aug 2022 10:50:47 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 0A146385829E Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=suse.cz Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=suse.cz Received: from imap2.suse-dmz.suse.de (imap2.suse-dmz.suse.de [192.168.254.74]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-521) server-digest SHA512) (No client certificate requested) by smtp-out2.suse.de (Postfix) with ESMTPS id DC1BC2065D; Mon, 1 Aug 2022 10:50:45 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.cz; s=susede2_rsa; t=1659351045; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=XYOsz2OLJGJs7fCxTC5geFwvLoitPhezWY+rRHpawmU=; b=zlkWiQokkNbaf8tVXeF+QMRfAMdCL9uPo1JURcUYq9GXx4bOFu9s9ORmohbvOiJAFfpE5Q hSwkH+R4UTgMYc8xrqOuyDkrqiXqsBF99Di82nF5CJ9uJlmay4o450TCWz3q9wldduWdCg O7YsJ8DRAIxkr21D2mkKBIqcp1HH+LQ= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.cz; s=susede2_ed25519; t=1659351045; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=XYOsz2OLJGJs7fCxTC5geFwvLoitPhezWY+rRHpawmU=; b=9ObTstX/vW8SoaXIvU+u8HLuDYCHIPz0ycyPAdxvib6lrWw8FoRmTyLSsgxtywpAn4BbM8 TxTMGG6Yf/+lfqAA== Received: from imap2.suse-dmz.suse.de (imap2.suse-dmz.suse.de [192.168.254.74]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-521) server-digest SHA512) (No client certificate requested) by imap2.suse-dmz.suse.de (Postfix) with ESMTPS id C208513A72; Mon, 1 Aug 2022 10:50:45 +0000 (UTC) Received: from dovecot-director2.suse.de ([192.168.254.65]) by imap2.suse-dmz.suse.de with ESMTPSA id FjZzLgWw52IdcAAAMHmgww (envelope-from ); Mon, 01 Aug 2022 10:50:45 +0000 Message-ID: Date: Mon, 1 Aug 2022 12:50:45 +0200 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.11.0 Subject: Re: Setting up editors for the GNU/GCC coding style? Content-Language: en-US To: Tim Lange , David Malcolm Cc: gcc@gcc.gnu.org References: <2QXQFR.JX7MU9S88TL03@tim-lange.me> From: =?UTF-8?Q?Martin_Li=c5=a1ka?= In-Reply-To: <2QXQFR.JX7MU9S88TL03@tim-lange.me> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-5.9 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, NICE_REPLY_A, SPF_HELO_NONE, SPF_PASS, TXREP autolearn=ham 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: Mon, 01 Aug 2022 10:50:49 -0000 On 7/28/22 21:49, Tim Lange wrote: > > > On Thu, Jul 28 2022 at 02:46:58 PM -0400, David Malcolm via Gcc wrote: >> Is there documentation on setting up text editors to work with our >> coding style?  A lot of the next generation of developers aren't using >> vi or emacs; they's using VS Code, CLion, and other editors.  Does >> anyone have docs on e.g. how to set up VS Code, CLion, etc (IntelliJ ?) >> to work well on GCC's own code base.  FWIW I use Emacs; I've dabbed >> with VS Code but haven't used it "for real". > > I did prepare my first patch(es) with vscode. For debugging, I set up vscode to launch gcc with gdbserver as wrapper and then let the vscode debugger to connect to the gdbserver. At first, I tried to get the gnu coding style to work in the hacky way by using tabSize=8 and rebinding tab to 2 spaces but later ditched that because it bothered me more than doing just spaces and replacing 8 spaces with 1 tab before sending the patch. That still wastes time because all files that I didn't touch look ugly unless I temporarily change the tabSize and some comments don't use tabs so I can't just replace all 8 spaces with 1 tab. For reference, my config files for gcc are available at [0]. There's a vscode issue that is about the unsupported expansion of 8 spaces to a tab: https://github.com/microsoft/vscode/issues/42740 Btw. can we for the future leave this weird mix usage? Is it really an useful selection? Cheers, Martin > > - Tim > > [0] https://gist.github.com/timll/1c4c542c7c98e3610c14aec19cdf7e91 > >> >> I'm hoping to add this to my newbies guide. >> >> Thanks >> Dave >> > >