-
Notifications
You must be signed in to change notification settings - Fork 183
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Discussion on a simpler C++ user experience #921
Comments
While LSP avoids that, the LSP-* packages are a perfect fit for adding language-specific functionality, as far as I can tell. There doesn't seem to be a clang specific LSP-* package now but it should be no problem to create one. There might be limits to how much of LSP (core package) you can hook into from the LSP-* package but if you are talking about having more typical sublime plugin functionality as an extra then it should be fine, I think. Not sure what others think. BTW. I've loved your project back in the days when I was coding in C++, but I don't do that anymore so naturally, I've lost interest in it. But it's an impressive achievement on many fronts. :) |
@rchl I was wondering why you stopped contributing 😉 Thanks for the reply. That sounds interesting. I will have a look into creating a clang-based LSP package. Let's see how much of ECC I can squeeze in there with how much efforts. |
Thanks for showing interest and reaching out @niosus!
It sounds like a significant effort!
clangd already uses heuristics to match a header file with the corresponding cpp file for suitable compile commands. The docs are a bit out of date in that regard.
The Like @rchl mentioned langserver-specific stuff goes in an LSP-clangd package. Consider implementing the If you like, we can host a potential LSP-clangd package in the sublimelsp org making you the maintainer (if that's okay with @rchl, @predragnikolic, @tomv564). |
Thanks for such a full reply @rwols!
This is something that I already take care of in ECC. CMake seems to be working well. I have just added a script to generate a compilation database from Bazel following https://github.com/grailbio/bazel-compilation-database and all the others are left for manual generation. Surprisingly, I've had really few issues with that over the last 2 or so years.
That is great to hear! I will have to research a bit on that as I am not really familiar with what exactly happens under the hood in clangd. Also, thanks for the suggestions on where to start. I will have a look into the I think the best way would be for me to start having a look into this and then once I have a minimal proof of concept, I would be happy to move it into the LSP space if you guys think it makes sense. My main issue is that this would still be a hobby project, and I still don't want to let ECC die until there is a viable replacement + I start a new job from April on, which will eat into my free time significantly. |
Have you heard about bear? https://github.com/rizsotto/Bear |
Will close this discussion, because it is a bit stale. As noted, The only thing left is to create a plugin like that. |
@niosus if you ever want to continue this topic in the future, |
Thanks guys. As these things go, the time has become even more limited for me recently, so I probably won't undertake this. Also, because I need to mostly work through ssh nowadays, I actually had to switch to VSCode so I only have time to somewhat maintain the plugin I wrote before, but I don't have the time for a significant refactoring of the functionality that would need to be stripped out of it to fit in into what we discuss here. I am totally fine if somebody else ever sees the value and decides to build up on this discussion and would be happy to chat with them about it. Thanks for your time guys nevertheless. 🙏 |
LSP-clangd is now published on Package Control thanks to @LDAP 🙂 |
Hey guys.
I will start with a small disclaimer. I completely understand the logic behind this:
Nevertheless, I wanted to have a very open and open-ended conversation about the possible steps to improve the vanilla C++ pipeline. Also, feel free to point me where you would think such a discussion could take place if you feel like this is not a place for it. I looked into the #lsp chat in Discord, but I wanted some more permanent discussion.
For a couple of years now I've been developing EasyClangComplete (some of the contributors here have also been contributing over the years there, thanks!) and while I'm quite happy with the results it keeps feeling too specific for C++ with lots of hacky solutions all over the place and the LSP sounds like a more universal way to go. So I wanted to have a discussion on what you guys think would be possible to do in order to address a number of language-specific things that make or break user experience. I am talking about:
compile_commands.json
file generation. Currently, the proper backend would beclangd
which requires a generated compilation database. The issue is that generating the compilation database is a tedious manual step, that I've done my best to take off the user's hands in ECC. I believe this is really a number one issue that scares off new users.clangd
will spit out garbage when encountering headers as they would be canonically missing from the compilation database. I see a couple of ways to mitigate this:clangd
, especially in a sustainable manner.tldr: While I'm happy developing and using my own plugin, I feel this is a bit of a wasted effort as LSP seems to provide most of the functionality (show info, rename under cursor etc.) that is general and ideally should be used for any language. I'd say the main contribution of ECC now is the glue between libclang and the user. So I was wondering if you guys think there is a place for me to contribute smth like that here, i.e., some glue between clangd through LSP and the user. I am open to any suggestions.
The text was updated successfully, but these errors were encountered: