code-ls works by parsing a cscope database that is provided as input. code-ls will then locate the function definitions from that cscope database and
You must have a cscope database for your codebase. This must be uncompressed,
if you have cscope installed, then you can
run it on your codebase via cscope -Rbc -s=<path to your codebase>
. Note
that the '-c' flag disables compression, code-ls does not understand compressed
cscope databases. This will produce a file named cscope.out
.
Now you can use that database (cscope.out
) as input to code-ls:
cargo run -- -f cscope.out
cargo build
- rust,cargo: Rust and cargo.
- cscope: Cscope code indexing tool.
The cscope database format is internal to cscope and is not published. I did find an older man page published with the format specified, so that is what we are using for code-ls. This is that aforementioned manpage. https://codecat.tistory.com/entry/cscope-manpage
Matt Davis: https://github.com/enferex