On 8/1/25 9:38 AM, Peter Maydell wrote:
On Fri, 1 Aug 2025 at 17:31, Pierrick Bouvier
<pierrick.bouv...@linaro.org> wrote:
On 8/1/25 1:34 AM, Peter Maydell wrote:
On Thu, 31 Jul 2025 at 19:30, Pierrick Bouvier
<pierrick.bouv...@linaro.org> wrote:
Regarding the "modern" completion support, I recommend you take a look
at it. Even though you wrote or reviewed most of the code you navigate
in everyday, and thus don't need it, it has become a standard tool for
any developer, like sanitizers or omniscient debugging. It's especially
interesting since those tools are based on compilers (clangd is the
standard for C/C++ nowadays) and not a bunch of clunky regexps.
It's even more interesting when you learn a new language, like Rust.
I do actually have clangd enabled at the moment in emacs:
but my experience is not good, because typically what happens
is that clangd runs itself out of memory and falls over
fairly frequently, or it produces obscure error messages like
"LSP :: Error from the Language Server: trying to get AST for
non-added document (Invalid Parameter)"...
So I mostly continue to investigate code the way I always have
done, with grep.
By any chance, are you using an old version of clangd (or an old
distro)? It has been a few years since I didn't run into any issue with
it, and it's quite easy to update it using llvm apt repositories without
updating your whole system [1].
I use the Ubuntu 24.04 version. In general I try to avoid
using tooling that isn't packaged by the distro: it
tends to result in headaches later on.
You should be good with it I think.
Maybe you can try to delete clangd caches, in case there is a problem there:
- ~/.cache/clangd/index/
- (in qemu build folder): build/.cache/clangd/index
-- PMM