natebosch / vim-lsc

A vim plugin for communicating with a language server
BSD 3-Clause "New" or "Revised" License
693 stars 84 forks source link

Please use clangd to replace cquery in the wiki lsp server example for C/C++ #336

Open adam900710 opened 4 years ago

adam900710 commented 4 years ago

Example using external compile_commands directory, and remove the header insertion decorators to remove the strange dot.

let g:lsc_server_commands = {
 \ 'c': 'clangd --compile-commands-dir=~/compile_commands.d/kernel/ --header-insertion-decorators=false',
 \ 'cpp': 'clangd --compile-commands-dir=~/compile_commands.d/kernel/ --header-insertion-decorators=false',
 \ }

Cquery is not even provided by official repos in some distros, and clangd has much better features. (And the wiki already says clang, but still using cquery)

averms commented 4 years ago

The wiki is open for anyone to edit. I replaced the cquery section with what I use for clangd. Feel free to improve on it if you want.