GNU bug report logs - #65518
30.0.50; [FR Eglot] Completions over all workspace symbols

Previous Next

Package: emacs;

Reported by: Gerd Möllmann <gerd.moellmann <at> gmail.com>

Date: Fri, 25 Aug 2023 06:45:02 UTC

Severity: wishlist

Found in version 30.0.50

Full log


View this message in rfc822 format

From: Gerd Möllmann <gerd.moellmann <at> gmail.com>
To: Dmitry Gutov <dmitry <at> gutov.dev>, João Távora <joaotavora <at> gmail.com>
Cc: 65518 <at> debbugs.gnu.org
Subject: bug#65518: 30.0.50; [FR Eglot] Completions over all workspace symbols
Date: Mon, 28 Aug 2023 13:10:09 +0200
On 28.08.23 02:19, Dmitry Gutov wrote:
> On 25/08/2023 12:22, João Távora wrote:
>> You'll see Eglot sends the widest possible 'query' to the LSP server
>> which returns a limited number of names (clangd caps at exactly 100 by
>> default).
> 
> Perhaps it's worth documenting how this value could be increased 
> (argument --limit-results=, apparently).

I've tried that now, and it works pretty nicely for me.  Apple clang 
version 14.0.3 (clang-1403.0.22.14.1)

I now have

export CLANGD_FLAGS="--limit-results=1000 --limit-references=1000"

in my .zshenv, and I'm using exec-path-from-shell in Emacs to get
that setting into Emacs on macOS.

Also, and completely unrelatad, I found that one can add a .clangd, 
which made post-processing the compile_commands.json generated by bear 
unneccessary.

Put a .clangd in the toplevel directory of the Emacs tree with contents

---
If:
    PathMatch: "src/.*\.c"
CompileFlags:
    Add: [-include=config.h]

(Not sure if that first line is obligatory.  I'm not a YAML user.)




This bug report was last modified 1 year and 343 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.