all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: "Gerd Möllmann" <gerd.moellmann@gmail.com>
To: "João Távora" <joaotavora@gmail.com>
Cc: emacs-devel <emacs-devel@gnu.org>
Subject: Re: Lightning fast build
Date: Sun, 21 Aug 2022 12:24:53 +0200	[thread overview]
Message-ID: <m2czct7v2i.fsf@Mini.fritz.box> (raw)
In-Reply-To: <CALDnm53kyL+9XnY9MnH48oGjfjZVR4rsbPho4XWkUZXSiFokFw@mail.gmail.com> ("João Távora"'s message of "Sun, 21 Aug 2022 10:36:29 +0100")

João Távora <joaotavora@gmail.com> 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 (clangd, 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 

~/emacs/master/ > /opt/homebrew/opt/llvm/bin/clangd --version 
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 ‘lsp-mode.el’.

    (lsp-deferred)

    Entry point that defers server startup until buffer is visible.
    ‘lsp-deferred’ will wait until the buffer is visible before invoking ‘lsp’.
    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.



  reply	other threads:[~2022-08-21 10:24 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-08-19 12:44 Lightning fast build Gerd Möllmann
2022-08-19 12:59 ` Alan Mackenzie
2022-08-21  2:47 ` Pankaj Jangid
2022-08-21  9:36 ` João Távora
2022-08-21 10:24   ` Gerd Möllmann [this message]
2022-10-11  4:09   ` Emacs + bear + compile_commands.json + clangd Matt Armstrong
2022-10-11  5:39     ` Gerd Möllmann
2022-10-11 17:37       ` Matt Armstrong
2022-10-12  4:32         ` Gerd Möllmann

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=m2czct7v2i.fsf@Mini.fritz.box \
    --to=gerd.moellmann@gmail.com \
    --cc=emacs-devel@gnu.org \
    --cc=joaotavora@gmail.com \
    /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.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.