From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: =?utf-8?Q?Gerd_M=C3=B6llmann?= Newsgroups: gmane.emacs.devel Subject: Re: Lightning fast build Date: Sun, 21 Aug 2022 12:24:53 +0200 Message-ID: References: Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="425"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/29.0.50 (darwin) Cc: emacs-devel To: =?utf-8?B?Sm/Do28gVMOhdm9yYQ==?= Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Sun Aug 21 12:27:58 2022 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 1oPiBS-000AXD-Fz for ged-emacs-devel@m.gmane-mx.org; Sun, 21 Aug 2022 12:27:58 +0200 Original-Received: from localhost ([::1]:60422 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1oPiBR-0004GS-Jz for ged-emacs-devel@m.gmane-mx.org; Sun, 21 Aug 2022 06:27:57 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:58074) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oPi8Y-0002c3-ML for emacs-devel@gnu.org; Sun, 21 Aug 2022 06:24:59 -0400 Original-Received: from mail-ed1-x529.google.com ([2a00:1450:4864:20::529]:33347) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1oPi8X-0003YN-3u for emacs-devel@gnu.org; Sun, 21 Aug 2022 06:24:58 -0400 Original-Received: by mail-ed1-x529.google.com with SMTP id c39so10525820edf.0 for ; Sun, 21 Aug 2022 03:24:56 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=content-transfer-encoding:mime-version:user-agent:message-id:date :references:in-reply-to:subject:cc:to:from:from:to:cc; bh=VtYs7lMJuQNSpTagf8qAPZatk4m1t5QjcZFdCQDrzto=; b=bxDuJiV3lsCOokSlI5g7X0gpmSFU5pQkbxWgqFH0uVAN1GAHIltIHHAtGP0tVJ+t0B QBWV+5M9seVptn1TGe1hV8Y8+sNNVfL3ikEPd1qUp0TfodPAl4P5Xe+C8wZ1YQQl4fxY TCaQkX/DMjf4WajD+bV473cL7PqG+kPywGRGFfrc+rAh0JvqhuWTaQCydZeko0qHeLvF vTnj3Y10yzY0aODVrhbVgT7DedDsF4oRbcTUGzsLfj4ioMksfDw6hE6xCHc4CkOAby+L qmjkfv13vbEjGJxYp5xlx8vsh4/eOZbPxwPJ86dquB8bKMzC6MZE2GqNzbZfUja6fw/L 3olg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:user-agent:message-id:date :references:in-reply-to:subject:cc:to:from:x-gm-message-state:from :to:cc; bh=VtYs7lMJuQNSpTagf8qAPZatk4m1t5QjcZFdCQDrzto=; b=N58L4n6PWQiY70LXnyWfQf0/t+mMrTnO5F2VpfF4EDoyLKBfsuoWAaTZeJH2mPlWVU 4g26RyaO5SItiNgGi1IZoRbwaL0QhOiTKge1GBIbL0iy3qnlyVUWDMTnMwEtFNFBnPVb 1YUQKgHQXPw6tTCnTot+3AgN1Wh3wXzwUPRIpLJ57royIwqlXCZFE9Op6QBBLbgMXain +wmTNNmzEhk5Vq5zE1R4hKjlA48iD79+kGvX2qG78Fte4nQiQn/l2MQcLkNJFMkdhHQe CSWX5A8Sob9eN3Mt9/nhXXMbhciXToHRiCS+Ya74F9FWEWSusJqMZbT2s/nda8FAq3Ck yDtA== X-Gm-Message-State: ACgBeo1DfVncvdE3AlRLyz8wyOgDcHbpNMcDDR1zqDrXtWQRaR7mMi9j 5lsO34es3gEprALnuZXVFmIehm3Ovmh/Kw== X-Google-Smtp-Source: AA6agR60kZGCZbe8y6jJrhm5h7lS+tNGCH49HTcXhM3zhxToQUdD6jdcfBJdxuM3Ll5M2wVqpoFhwQ== X-Received: by 2002:a05:6402:5292:b0:446:80b0:4a5d with SMTP id en18-20020a056402529200b0044680b04a5dmr4237028edb.285.1661077495101; Sun, 21 Aug 2022 03:24:55 -0700 (PDT) Original-Received: from Mini.fritz.box (p54b0cf60.dip0.t-ipconnect.de. [84.176.207.96]) by smtp.gmail.com with ESMTPSA id u10-20020a1709061daa00b0072b41776dd1sm4767982ejh.24.2022.08.21.03.24.54 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 21 Aug 2022 03:24:54 -0700 (PDT) In-Reply-To: (=?utf-8?Q?=22Jo=C3=A3o_T=C3=A1vora=22's?= message of "Sun, 21 Aug 2022 10:36:29 +0100") Received-SPF: pass client-ip=2a00:1450:4864:20::529; envelope-from=gerd.moellmann@gmail.com; helo=mail-ed1-x529.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=ham autolearn_force=no X-Spam_action: no action 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" Xref: news.gmane.io gmane.emacs.devel:293683 Archived-At: Jo=C3=A3o T=C3=A1vora writes: > > Hello Gerd. Out of curiosity, and speculation, is your use of 'bear' > intended to make a compilation database of Emacs sources for use with > a LSP server? Yes, exactly. > If so, how is that going? Last time I tried to do that, the server (clang= d, i think) was still very confused in many files. I can't complain. I'm using lsp-mode with clangd and bear because that were the first things I tried, and all of them just worked for me. I've also installed llvm14 in the meantime because of reasons and I'm using '(lsp-clients-clangd-executable "/opt/homebrew/opt/llvm/bin/clangd") which says=20 ~/emacs/master/ > /opt/homebrew/opt/llvm/bin/clangd --version=20 Homebrew clangd version 14.0.6 But it also worked for me before with the clangd coming with Xcode, which is version 13 something. In case it matters, another thing I did right from the start is ;; Activate Lsp in all C-like buffers. (add-hook 'c-mode-common-hook 'lsp-deferred) lsp-deferred is an autoloaded Lisp closure in =E2=80=98lsp-mode.el=E2= =80=99. (lsp-deferred) Entry point that defers server startup until buffer is visible. =E2=80=98lsp-deferred=E2=80=99 will wait until the buffer is visible be= fore invoking =E2=80=98lsp=E2=80=99. This avoids overloading the server with many files when starting Emacs. All this is on a Mac mini/M1, macOS 12.5.1 with 16G RAM. Others mentioned they had problems with clangd, I believe on GNU/Linux, not sure about that. But as I said, I personally can't complain.