Many editors provide extensions and plugins with LSP Client functionality. Many of these are known to work with Clangd, this patch points users to the relevant resources for better experience.
Details
Diff Detail
Event Timeline
I need to
- Complete last two sections
- Make sure everything is rendered as expected
- Proof-read the text
Do we want to keep the docs for different editors separate or do we want to put them all into a single page in case we add more editors?
I would vouch for keeping them on a single page, but that's not a strong opinion. Wonder what other people think?
This one is pretty long and might scare some people off if we push this to the main documentation file IMO. However, creating a separate page for Vim integration might make it harder to discover the page itself, which is another problem. It seems like both options have their downsides, I'm not sure which one is better.
Looking at the length of the vim integration doc, I think it might make sense to keep the full vim integration doc separate. However, it might still make sense to have short/simplified quick start instructions plus a link to the full doc for more details in the main doc.
clang-tools-extra/docs/index.rst | ||
---|---|---|
29 ↗ | (On Diff #162660) | clangd-vim is not a top-level project. I think this should be linked from clangd documentation. |
clang/docs/ClangFormat.rst | ||
97 ↗ | (On Diff #162660) | We could recomend formatting with clangd in clangd doc, but advertising here seems a bit odd. I'd suggest dropping this. And to be fair, clang-format editor plugins seem to be provide finer controls than LSP clients. |
clang/docs/ClangFormat.rst | ||
---|---|---|
97 ↗ | (On Diff #162660) | I agree. clang-format plugins (e.g. vim-clang-format) aren't advertised here, though. But I was going to have another patch on that, this might be useful for clang-format users; for example I discovered that plugin long after I started using clang-format. |
Exactly the trade-off we're facing here. Not sure either. I'm personally not scared of big documents if there are links/TOCs to navigate to relevant parts. The "hard to find" bit looks like more of a problem to me.
Hi! Yeah, basically I wanted to follow up on the mailing list after I get some docs in, but you found this earlier :)
The good thing about Clangd (from my perspective) is that as long as the plugin has LSP integration, users are free to use whatever plugin they want (also, YCM decided that LSP support is out of the scope of their project).
I am personally using LanguageClient-neovim almost all the time and I certainly had the best experience out of every other plugin/workflow I tried so far (although, as you can see, the setup is not trivial and there are actually few downsides of the LanguageClient-neovim). The other thing is that I'm using NeoVim and while I have tried this setup for the "plain" Vim I don't have too much user experience from that perspective yet, but most of my team members use Vim and we're currently looking into that.
Very nice :)
I will try to get it running for vim 8.0 on ubuntu 18.04 (hopefully this
week!) and share if i had success :)
Am 27.08.2018 um 16:57 schrieb Kirill Bobyrev via Phabricator:
kbobyrev added a comment.
In https://reviews.llvm.org/D51297#1214321, @JonasToth wrote:
Very nice! Switching to clangd means that YCM is not necessary anymore?
Hi! Yeah, basically I wanted to follow up on the mailing list after I get some docs in, but you found this earlier :)
The good thing about Clangd (from my perspective) is that as long as the plugin has LSP integration, users are free to use whatever plugin they want (also, YCM decided https://github.com/Valloric/ycmd/issues/515 that LSP support is out of the scope of their project).
I am personally using LanguageClient-neovim almost all the time and I certainly had the best experience out of every other plugin/workflow I tried so far (although, as you can see, the setup is not trivial and there are actually few downsides of the LanguageClient-neovim). The other thing is that I'm using NeoVim and while I have tried this setup for the "plain" Vim I don't have too much user experience from that perspective yet, but most of my team members use Vim and we're currently looking into that.
Complete two last paragraphs, address few comments.
We haven't figured out whether we should suggest using this particular workflow at this point, but we're discussing the options.
Now that there's a Wiki page on how to use Clangd with LanguageClient-neovim, we should just redirect (Neo)Vim users to that page.
I would stamp this from my side, but concerns whether we should recommend YCM's LSP-based completer instead are probably still there.
@sammccall, WDYT?
Yes, I can see your point, but I think this is better than nothing (which we currently have). Also, having the guide in LanguageClient-neovim Wiki might be easier for the users since they can change something (e.g. when the plugin is updated and the docs become outdated) and have an easier time finding out about the option.
Would love to hear some feedback from @ioeric and @sammccall.
I also support having some instructions/pointers on editor integration. That said, I think we should have a section "Editor integration" with a list of editor clients that are known to work with clangd, instead of having a section just for vim. Something like:
#Editor (or client?) integration ##Vim Some LSP clients that are known to work with clangd: - nvim, LanguageClient-neovim .. - ... ## vscode ## emacs?
What do you think?
Outline the structure for "Editor Integration" section which is to be filled with other options later.
clang-tools-extra/docs/clangd.rst | ||
---|---|---|
111 | While we are here, would you mind including some other editors/plugins that are known to work with clangd (just so that people don't think vim is the only editor that works)? E.g. Eglot works on emacs, vscode apparently works as well. We should also mention that any other LSP clients should work with clangd in theory. |
clang-tools-extra/docs/clangd.rst | ||
---|---|---|
114 | Thanks! I would be nice if other editors can get their own sections like vim does :) For example: vscode (Something like vscode works well with clangd) Vim ... Emacs (Eglot) |
clang-tools-extra/docs/clangd.rst | ||
---|---|---|
114 | *It* would be nice... |
Create different sections for few editors, link web page with the complete list of LSP clients.
clang-tools-extra/docs/clangd.rst | ||
---|---|---|
135 | Maybe mention it is published in "Visual Studio Marketplace" and can be installed directly from VSCode? |
clang-tools-extra/docs/clangd.rst | ||
---|---|---|
135 | Right, I thought it might make sense to mention that it is developed in-tree here, but since it's the "Editor Integration" section it's probably not worth here and I also didn't notice this mention on top of the documentation page. |
While we are here, would you mind including some other editors/plugins that are known to work with clangd (just so that people don't think vim is the only editor that works)? E.g. Eglot works on emacs, vscode apparently works as well.
We should also mention that any other LSP clients should work with clangd in theory.