clangd
Bear
clangd | Bear | |
---|---|---|
53 | 52 | |
1,626 | 5,171 | |
3.3% | 2.6% | |
3.6 | 9.0 | |
about 2 months ago | 1 day ago | |
Shell | C++ | |
Apache License 2.0 | GNU General Public License v3.0 only |
Stars - the number of stars that a project has on GitHub. Growth - month over month growth in stars.
Activity is a relative number indicating how actively a project is being developed. Recent commits have higher weight than older ones.
For example, an activity of 9.0 indicates that a project is amongst the top 10% of the most actively developed projects that we are tracking.
clangd
-
Speeding up C++ build times
I'm still waiting for clangd support, e.g. [0] before trying modules.
- [0] https://github.com/clangd/clangd/issues/1293
-
Configure clangd in eglot to not add headers?
I know one way to do this, but hoping there's something simpler or more general. clangd (C++ LSP server) is over-aggressive about adding "helpful" #includes during completion. The way to turn that off is to pass -header-insertion=never on its cmd line.
-
A little help for a C++ newbie
Install the clangd language server using your system package manager, e.g. sudo apt-get install clangd
-
Effect of Perceptual Load on Performance Within IDE in People with ADHD Symptoms
> As a side note, I despise things like imports and aliases. I'd prefer that when I do jump to a function, I can read it without having to check if anything is imported or not.
One idea might be to use an LSP (Language Server Protocol) interface. It could describe the fully qualified symbol for you when you, say, select the abbreviated symbol or press a keyboard shortcut. I've been working on a moderately large C program with Emacs and clangd[1] recently and have been amazed at how 'immersive' it feels, and that's from someone who's used to the comfort of a Lisp REPL!
[1]: https://clangd.llvm.org/
-
#include Cleanup Available in Visual Studio 2022 17.7 Preview 3
FWIW, recent clangd also has this feature: "unused" as of 14, "missing" as of 16, works better in snapshots.
-
How to set up C++ in sublime text?
You need to install CMake (and use it to build your project - which you should do in any case) and clangd.
-
Guide for starting out C and C++ Programming in Visual Studio Code
First we would need the Clangd extension as well as the LSP itself You can download the extension from #here The extension provides its own Clangd LSP but in case of issues with that we would like to download and setup the clangd package from the official site for both Windows and Linux I daily drive Linux on my laptop, thus this guide works well for linux users, Windows users can use programs like Cygwin to replicate the process
-
Does C/C++ OpenMP pragmas break clangd LSP for you?
Few days ago I found a bug while using clangd LSP with neovim, and submitted a bug report to clangd: https://github.com/clangd/clangd/issues/1640
-
vscode alternative for C++ on M1 mac?
Come to the light side: VSCodium with clangd
-
Looking for projects to contribute to
If you use the clangd LSP: https://github.com/clangd/clangd/issues
Bear
- Bear is a tool that generates a compilation database for Clang tooling
-
Visual Studio Code is designed to fracture
There are generators for the compilation databases that work with Makefiles and other build systems, like Bear: https://github.com/rizsotto/Bear
-
emacs lsp-mode with MPLAB X project
Have you tried Bear? I used it for several projects and overall it works very well.
-
Eglot + clangd not working for NetHack code base
An update: I am now able to make everything work by generating `compile_commands.json` using compiledb. I'm aware that there is another tool Bear but for some reason it generates an empty `compile_commands.json` file for me.
-
I have an existing legacy build system. How do I leverage this with CLion to index my project?
Try https://github.com/rizsotto/Bear
-
New User C Setup Help?
Regarding the libraries, you might need to add it to clangd’s configuration. A convenient way is to have a compile_commands.json in your project (this is generated by some build tools like CMake, but if you don’t use them, have a look at bear).
-
vscode alternative for C++ on M1 mac?
Note that you need to have a compile_commands.json file. That file can easily be generated by CMake, Meson, etc. For other build systems checkout Bear https://github.com/rizsotto/Bear
-
I hope that cscope can make a comeback in the versions after 0.9
make a 'gcc' command/executable that do nothing and make it first in your PATH and then run bear with make: https://github.com/rizsotto/Bear/issues/219 It is unfortunate that bear doesn't catch the output of the make command with '--dry-run' as it still prints the compile commands, it seems not that hard to support this and I think many ppl would benefit..
-
CLion 2023.1 released
You could try to start with Bear: https://github.com/rizsotto/Bear In worst cases, I had to use strace to catch every gcc/g++ invocation and restructure the compile_commands.json out of the strace logs.
-
Is CMake necessary to set up a C++ "IDE" in neovim?
But it sounds like maybe you’re assuming for the purposes of using something like clangd (highly recommended for coding in cpp projects in general, you want to be using this in vscode or whatever else anyway, codelion notwithstanding I suppose) with neovim on a c++ project that you have to use cmake to produce a compilation database to use with neovim plugins (e.g. clangd via nvim-lsp et. al.). In this case, be aware that the https://github.com/rizsotto/Bear tool is a handy way to just tack it on to whatever command you’re using to run a c++ code build step, and it will give you a compile_commands.json, corresponding to the compiler commands it invoked, on a silver platter.
What are some alternatives?
ccls - C/C++/ObjC language server supporting cross references, hierarchies, completion and semantic highlighting
compiledb - Tool for generating Clang's JSON Compilation Database files for make-based build systems.
nvim-lspconfig - Quickstart configs for Nvim LSP
scan-build - Clang's scan-build re-implementation in python
include-what-you-use - A tool for use with clang to analyze #includes in C and C++ source files
coc-clangd - clangd extension for coc.nvim
eglot - A client for Language Server Protocol servers
vscode-cmake-tools - CMake integration in Visual Studio Code
nvim-treesitter - Nvim Treesitter configurations and abstraction layer
vscode-cpptools - Official repository for the Microsoft C/C++ extension for VS Code.
coc-diagnostic - diagnostic-languageserver extension for coc.nvim