emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Lightning fast build


From: Gerd Möllmann
Subject: Re: Lightning fast build
Date: Sun, 21 Aug 2022 12:24:53 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/29.0.50 (darwin)

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 via email to

[Prev in Thread] Current Thread [Next in Thread]