-
Notifications
You must be signed in to change notification settings - Fork 4.9k
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
rtags support #2834
rtags support #2834
Conversation
Should probably rename this PR. I thought this was one of those spam PRs that are @robbyoconnor's worst nightmares :) |
So, only the last commit is useful, right? |
Yes, that is the one with relevant changes to it. |
Should probably rebase as well...You shouldn't see merge commits -- always do |
Also, you should probably use feature branches and not work directly on |
Also why is rtags better than both gtags and ctags (both of which spacemacs has support for)? Like seriously -- This should be its own layer -- not packaged in the c-c++ layer... |
The helper functions in the rtags-post-init utilize gtags as a fallback when there is not a compilation database available for rtags, and it utilizes the helm-gtags functions directly within those helper functions. Like with company-clang, rtags utilizes clang's compilation database for auto-completion, quick movement within and outside of semantic contexts, and has a helm-like interface for presenting and narrowing information. Rtags also has support for objective-c and objective-c++ in addition to its semantic motions and autocompletion and database querying functionality. Rtags provides either an autocomplete or company front end but is configured in the pull request to utilize company. |
@mheathr you might want to rebase this so it's cleaner :P |
Okay, will do. Would you like for me to include documentation on the keybindings that rtags uses like what is done with semantic-refactor? Rtags has around 25 interactive functions that are provided, so it would make the documentation significantly longer as it results it at minimum a 26 x 3 table. One thing I left off about rtags is that it also provides an interface to clang's fixits. |
Always document (it's one of the things that makes spacemacs amazing) -- if you add stuff -- Document it! :) |
@robbyoconnor rtags supports all the deep dark corners of C++. It can follow template instantiations, virtual function calls, overloaded functions, etc... It's incredibly valuable for most medium to large scale C++ projects. C++ is complex ;) @mheathr do we want to make this a bit more integrated, like |
This should apply cleanly -- but a simply |
What happened to this commit, will it merge into the spacemacs? |
You should probably clean up merge conflicts ;) |
Also, it sometimes takes awhile for things to get merged...be patient -- it's basically a one-man show...and that man has a day job! |
@robbyoconnor Thanks for the answer. I just want to make sure we want rtags in C/C++ private layer. If @mheathr does not have time for this. I can test the tags code here and submit a clean pull request later. |
There was some discussion of the future of tags support in #3273. The implementation of that idea is still a ways off, however. I don't see why we can't do this in the meantime. |
I tried this out - the rtags reference find is pretty accurate but pressing Enter on any of the references does not take me to the code. |
Is someone still working on this, seems it could be integrated if the conflicts are resolved :)? |
I've made an attempt to rebase this onto
|
Hi @magthe and all the others, thank you for working on this. I just migrated from plain emacs wonder how to install rtags. In my old My old configuration looks as follows:
It is taken from rtags #218 PS: I just found spacemacs #2327 where this is already discussed. Sorry for the noise. |
Status on this? |
Judging from the lack of activity on this PR, no one is actively working on this anymore? To get this moving again and to make it easier for someone to possibly take-over this task: What is the current stance on how rtags should be integrated into Spacemacs? Since it is basically limited to C/C++, it should imho really go into the c-c++ layer itself, be coupled with cmakes-ide and be compiled/installed/updated locally for the user by Spacemacs, to have a great out of the box experience because most dists simply don't carry rtags in their official repositories. |
No, better to predicate the enabling of rtags support on whether rtags is installed rather than compiling it automatically. We're having enough trouble supporting the different varieties of systems even with Emacs acting as an abstraction layer. |
@TheBB: Was there anything in particular holding this pull request back from being actually merged or are there any open points of criticism that haven't been addressed? If no one picks this up, I might have a look at it after I have finished my current projects. It would be nice to have this merged for 0.200.0 along with cmake-ide which would make this a bit more comfortable to use. Is there a time-frame when 0.200.0 is going to be released? |
I will have a look at the C/C++ layer soon™, including this and the cmake-ide PR. |
cmake-ide nicely orchestrates between cmake, flycheck, company-clang and RTags by using cmake to generate a compile_commands.json that it uses to set the appropriate compile flags for flycheck and company-clang. This nicely centralizes all build related settings where they belong: in the build system itself. It comes with a zero need for configuration and usually works just out of the box. Nevertheless, and recommended as well, build directory and additional compile flags (...) can also be set through directory local variables. In the future, we could improve here on the user experience by providing an automatic and predicable naming scheme for build dirs that the user can partially influence through a base directory variable. With that in place, those build directories would be fully automatic and still reusable by cmake-ide. Since cmake-ide makes it a breeze to use RTags by automating much of the necessary setup, I see this as a precursor to proper RTags support which also requires the rtags lisp package to be installed and required along with the RTags client/server counterpart (see pull request syl20bnr#2834).
What is the status on this one? |
Bump please. The existing C++ layer is pretty useless imo |
rtags package have been separated into several packages. Please check it. |
@TheBB I'm going have a go at adding support for rtags in the
|
Any updates on getting rtags support for the C++ layer? |
@deepankarsharma - dead unless @mheathr rebases. Otherwise contribute it. |
Hi All, First of all thanks for your work on such a great project! Thanks! |
Hi @sserdyuk1991, I think rtags support is currently on hold - I did preparing PR with cmake-ide.( #9432 ) I'm using rtags locally - I took that and probably somebody's else PR and blended it together. |
Hi @myrgy, Thanks for prompt reply! I'm new to emacs and lisp so unfortunately I can't help with it right now. |
Second try to integrate rtags: #9956 |
Adds support for rtags to spacemacs' c-c++ layer. https://github.com/Andersbakken/rtags