• Stars
    star
    1,809
  • Rank 25,671 (Top 0.6 %)
  • Language
    C++
  • License
    GNU General Publi...
  • Created over 13 years ago
  • Updated over 1 year ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

A client/server indexer for c/c++/objc[++] with integration for Emacs based on clang.
MELPA MELPA
rtags
MELPA
rtags-xrefac-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.

Tarball releases are available here: https://github.com/Andersbakken/rtags/releases/

TLDR Quickstart

We assume you have something to generate a JSON Compilation Database for your project. Your build system probably has a way to generate it, or you can look at something like Bear.

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 +74: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.

More Repositories

1

openssl-examples

stuff
C
35
star
2

LazyTextEdit

A Qt based text editor that lazily loads data from disk when necessary.
C++
24
star
3

rct

A set of c++ tools that provide nicer (more Qt-like) APIs on top of stl classes with a friendly license.
C++
19
star
4

emacs-backup-file

Automatically back up all changes made from emacs to a git repo in ~/.backups
Emacs Lisp
12
star
5

nrdp-scripts

nrdp-scripts
Emacs Lisp
7
star
6

fisk

Fisk, a distributed compile system
C++
5
star
7

maddy

A naive c++ lexer
C++
4
star
8

check-coding-style

Fork of webkit's check-webkit-style script and friends
3
star
9

qlc-svn

This is a copy of https://qlc.svn.sourceforge.net/svnroot/qlc/trunk
C++
3
star
10

clang

clone of clang
C++
2
star
11

MasterBandit

A terminal emulator
C++
2
star
12

hash

A hash table implementation in c++
C
2
star
13

CPlusPlus

CPlusPlus
C++
2
star
14

qlc

This is a git-svn copy of https://qlc.svn.sourceforge.net/svnroot/qlc/trunk
C++
2
star
15

dot.el

Naive minor mode to provide similar functionality to vim's dot command
Emacs Lisp
2
star
16

wss

A little convenience websocket server
JavaScript
1
star
17

pixeltool

Fork of Qt's pixeltool with some slight modifications
C++
1
star
18

NetflixScripts

Scripts used
Python
1
star
19

pf

pf
C++
1
star
20

curltest

testing curl
C
1
star
21

libupnp

libupnp
C
1
star
22

fisk-scheduler-ui

Fisk scheduler UI
TypeScript
1
star
23

ihunk

ignore diff hunks based on regexps
C++
1
star
24

xtab

A tabbed xterm using x11 embed
C++
1
star
25

hls

highlight a certain thing in a file
C++
1
star
26

Scrobble

Scrobble
C++
1
star
27

parselib

generate json description from a list of headers
C++
1
star
28

agbakken

My stuff
1
star
29

WebKit-mirror

Mirror of git.webkit.org/WebKit.org
C++
1
star
30

blockingserver

blocking tcp server
C++
1
star
31

rtags-releases

Releases for rtags
1
star
32

google-diff-match-patch

Clone of google-diff-match-patch from here http://google-diff-match-patch.googlecode.com
Python
1
star
33

Jeopardy

Jeopardy written with Qt
C++
1
star
34

strerror

Dump out strerror for input argument
C
1
star
35

xmms-shell-hack

I couldn't build xmms-shell since it seems to rely on old versions of autotools so I quickly hacked this together.
C++
1
star
36

rjs

RJS is (http://www.rtags.net) rtags' annoying little brother that indexes javascript
JavaScript
1
star
37

DataBufferPool

DataBufferPool
C++
1
star
38

vp2

View picture vs 2
C++
1
star
39

Genesis

Launch applications
C++
1
star