ttags generates ctags using Tree-sitter.
cargo install ttagsBinaries are also available on the releases page of the repo. Download the tar file, and place the executable in your path.
Requires Rust 1.90 or newer (Tree-sitter's minimum supported version).
git clone https://github.com/npezza93/ttags
cd ttags
cargo build --release
git ls-files -z | ./target/release/ttags --null --files-from -Give a list of file paths and/or directories to ttags to parse and generate.
git ls-files -z | ttags --null --files-from -The file list is read in a single invocation, avoiding the shell's argument-size limit. NUL separators preserve spaces, quotes, and newlines in input paths. File paths must be UTF-8. Tabs and newlines in generated tag paths are not escaped by the tags writer. Unsupported file extensions are skipped without reading their contents; extensionless files are still checked for a Ruby shebang.
Batch CLI generation parses files in parallel, using at most eight workers and
initializing only the language configurations each worker needs. Small batches
(up to 64 paths) use one parser. RAYON_NUM_THREADS can lower this limit;
RAYON_NUM_THREADS=1 runs parsing serially. Equal-name tags retain input
order. The public Tagger API and LSP continue using their existing parser and
caller-provided configurations.
-
-Lor--files-from=FILE- Read one path per line from a file, or from stdin whenFILEis-. May be combined with positional file paths and directories. -
-0or--null- Use NUL-separated paths with--files-from, as produced bygit ls-files -z. -
-aor--apend- Will keep your tag file in tact and only update the tags for the files passed. -
-ror--tag-relative- Make paths outputed in the tags file be relative to the current working directory (i.e. where you calledttags)? By default, the tag path is relative to thetag-filelocation. -
-for--tag-file=file- Path to the file where tags should be written. If-is passed, tags are outputted to stdout. -
lsp- Starts an LSP server that updates the tags for a file when the file is saved
- C
- C++
- D (
.dand.di, including alias declarations) - Haskell
- JavaScript
- Nix
- Ruby
- Rust
- Swift