Skip to content
A c/c++ client/server indexer for c/c++/objc[++] with integration for Emacs based on clang.
Branch: master
Clone or download
cslux Some more travis.sh refactoring and performance improvements
OSx build is now faster than trusty build! Amazing!
Latest commit a3a9872 Apr 17, 2019
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
.github/ISSUE_TEMPLATE
bin Convert cc_prefix.sh and gcc-rtags-hook.sh to POSIX sh Feb 25, 2019
cmake check the one in the path first. Mar 29, 2019
man/man7 Bump version to 2.31 Mar 13, 2019
scripts Some more travis.sh refactoring and performance improvements Apr 17, 2019
share/etc
src Add initial ert test file for rtags.el Apr 16, 2019
tests Add initial ert test file for rtags.el Apr 16, 2019
web/youtube
.dir-locals.el RTags CI/CD setup Oct 13, 2018
.gitignore Remove lua. It was never made fully functional and if we ever wanted Mar 13, 2019
.gitmodules Remove lua. It was never made fully functional and if we ever wanted Mar 13, 2019
.travis.yml Some more travis.sh refactoring and performance improvements Apr 17, 2019
CHANGELOG Changelog for 2.31 Mar 13, 2019
CMakeLists.txt Add initial ert test file for rtags.el Apr 16, 2019
LICENSE.txt Put actual license text in LICENSE.txt Jul 20, 2018
README.org Documentation is now available in the wiki Jan 6, 2019
clang.sup Fix pch Mar 22, 2012
configure

README.org

MELPA MELPA
rtagsac-rtagscompany-rtagsflycheck-rtagshelm-rtagsivy-rtags
MELPAMELPAMELPAMELPAMELPAMELPA

Introduction

RTags is a client/server application that indexes C/C++ code and keeps a persistent file-based database of references, declarations, definitions, symbolnames etc. There’s also limited support for ObjC/ObjC++. It allows you to find symbols by name (including nested class and namespace scope). Most importantly we give you proper follow-symbol and find-references support. We also have neat little things like rename-symbol, integration with clang’s “fixits” (https://clang.llvm.org/diagnostics.html). We also integrate with flymake using clang’s vastly superior errors and warnings. Since RTags constantly will reindex “dirty” files you get live updates of compiler errors and warnings. Since we already know how to compile your sources we have a way to quickly bring up the preprocessed output of the current source file in a buffer.

While existing taggers like gnu global, cscope, etags, ctags etc do a decent job for C they often fall a little bit short for C++. With its incredible lexical complexity, parsing C++ is an incredibly hard task and we make no bones about the fact that the only reason we are able to improve on the current tools is because of clang (https://clang.llvm.org/). RTags is named RTags in recognition of Roberto Raggi on whose C++ parser we intended to base this project but he assured us clang was the way to go. The name stuck though.

TLDR Quickstart

Build RTags

git clone --recursive https://github.com/Andersbakken/rtags.git
cd rtags
cmake -DCMAKE_EXPORT_COMPILE_COMMANDS=1 .
make

Start the RTags daemon (rdm)

./bin/rdm &

Index the RTags project, and wait until rdm is silent

./bin/rc -J .

Open source file in emacs

emacs +73:34 src/rdm.cpp

Load rtags.el

M-: (load-file "rtags.el") RET

Ensure rc can be found

M-x set-variable RET rtags-path RET "../bin" RET

Call rtags-find-symbol-at-point

M-x rtags-find-symbol-at-point RET

Your location is now on the definition of Server::instance()

Documentation

The documentation can be found in the Wiki.

Disclaimer

RTags is still under development and is not the most stable piece of software you’ll ever find. We’re constantly working to improve on it.

You can’t perform that action at this time.