#clangd is has issues when module import is in a header file, and not the cpp file. This is not a problem for clang, its all in the same translation unit. AFAICT this is legal and fine C++20 module code, clangd shouldn't have this issue.
#clangd is has issues when module import is in a header file, and not the cpp file. This is not a problem for clang, its all in the same translation unit. AFAICT this is legal and fine C++20 module code, clangd shouldn't have this issue.
Other projects I use every day:
#Matrix spec & clients like #FluffyChat and #nheko
#Bitwarden & #Vaultwarden password manager
#Neovim text editor
#clangd LSP
I'd love to encourage these projects to jump ship, and I celebrate those that do. I am much more likely to provide quality contributions if you host on your own forge, or a free one, and I am sure I'm not alone in this.
GitHub is hostile to FOSS and, despite giving away lots of free-of-cost stuff I believe ultimately hurts us.
Random pro-tip: if you want use clangd on project, make sure it builds with clang when generating the compile-commands.json file.
But sometimes the projects don't build with clang (I was recently looking at ipxe), and working with gcc build commands might be enough, at least on x86_64.
But on arm64, a specific flags was passed, -mabi=lp64. You can configure clangd to skip those flags on a per-project basis:
https://github.com/clangd/clangd/issues/734#issuecomment-814978138
With clangd as an lsp how do you deal with any but the simplest build systems?
For instance, in MicroPython there are 24 "ports" and most of them have multiple "boards" or "variants". Altogether there are 200+ boards and variants put together.
There are probably a half dozen different compilers used for different CPU architectures, different builds have radically different compiler flags, and some files are included in all 200+ of those builds.
Oh and did I mention that some use make and some use cmake? (besides the ones that use west, but I am gonna just choose not to care about those right now)
I know how to pick ONE make-based build and make a complier_commands.json for it using bear, but it's going to only give me a tiny sliver of the whole picture.
Yes, one encounters the same problems when trying to validate changes via compiling, but since I'm new to language servers and clangd in particular I feel like I should ask.
(If it makes a difference I'm using neovim 0.11.3)
@pythno Try ...
1. Install #clangd but don't setup LSP. This will disable auto completions.
2. Use #codelldb for debugging -> https://igorlfs.github.io/neovim-cpp-dbg