top | item 26880395

(no title)

anand-bala | 4 years ago

In most cases, what you are looking for is a language server like `clangd` (works for most compilers) [1].

You can find a Language Server Protocol implementation for your editor at [2] (I don't think it lists __all__ clients, but it should include the most popular ones).

EDIT: I realized that this is a vague answer, so let me clarify.

An LSP implementation (especially clangd) provides actions like `go-to definition` or `find references` that you would find in full-featured IDEs like CLion (which is also amazing BTW). Since you mentioned vim, I am guessing you use it and don't necessarily want to let go of the hand-crafted vimrc you have created. Adding an LSP plugin to Vim is incredibly easy and gives you these "IDE" features with customizable mappings.

[1]: https://clangd.llvm.org/

[2]: https://langserver.org/#implementations-client

discuss

order

bradford|4 years ago

Thanks! I read about using LSP/Clangd with vim via [coc](https://github.com/clangd/coc-clangd) and I think that's the path I'll try going down.

Other responses, thanks for your input. Just want to clarify that I have tried VS and VSCode with limited success (sometimes search works, sometimes it doesn't, and my biggest gripe is an occasional lack of transparency into what's going on under the cover). I think any solution is going to require some investment on my part and LSP sounds like a good investment.