mirror of
https://github.com/MaskRay/ccls.git
synced 2024-11-24 16:45:07 +00:00
Misc
This commit is contained in:
parent
6a3cff6e50
commit
9ca095f49e
@ -11,7 +11,7 @@ ccls, which originates from [cquery](https://github.com/cquery-project/cquery),
|
|||||||
* formatting
|
* formatting
|
||||||
* hierarchies: [call (caller/callee) hierarchy](src/messages/ccls_call.cc), [inheritance (base/derived) hierarchy](src/messages/ccls_inheritance.cc), [member hierarchy](src/messages/ccls_member.cc)
|
* hierarchies: [call (caller/callee) hierarchy](src/messages/ccls_call.cc), [inheritance (base/derived) hierarchy](src/messages/ccls_inheritance.cc), [member hierarchy](src/messages/ccls_member.cc)
|
||||||
* [symbol rename](src/messages/textDocument_rename.cc)
|
* [symbol rename](src/messages/textDocument_rename.cc)
|
||||||
* [document symbols](src/messages/textDocument_document.cc) and approximate search of [workspace symbol](src/messages/workspace_symbol.cc)
|
* [document symbols](src/messages/textDocument_document.cc) and approximate search of [workspace symbol](src/messages/workspace.cc)
|
||||||
* [hover information](src/messages/textDocument_hover.cc)
|
* [hover information](src/messages/textDocument_hover.cc)
|
||||||
* diagnostics and code actions (clang FixIts)
|
* diagnostics and code actions (clang FixIts)
|
||||||
* semantic highlighting and preprocessor skipped regions
|
* semantic highlighting and preprocessor skipped regions
|
||||||
@ -24,8 +24,6 @@ Saving files will incrementally update the index.
|
|||||||
# >>> [Getting started](../../wiki/Home) (CLICK HERE) <<<
|
# >>> [Getting started](../../wiki/Home) (CLICK HERE) <<<
|
||||||
|
|
||||||
* [Build](../../wiki/Build)
|
* [Build](../../wiki/Build)
|
||||||
* [Emacs](../../wiki/Emacs)
|
|
||||||
* [LanguageClient-neovim](../../wiki/LanguageClient-neovim)
|
|
||||||
* [FAQ](../../wiki/FAQ)
|
* [FAQ](../../wiki/FAQ)
|
||||||
|
|
||||||
ccls can index itself (~180MiB RSS when idle, noted on 2018-09-01), FreeBSD, glibc, Linux, LLVM (~1800MiB RSS), musl (~60MiB RSS), ... with decent memory footprint. See [wiki/Project-Setup](../../wiki/Project-Setup) for examples.
|
ccls can index itself (~180MiB RSS when idle, noted on 2018-09-01), FreeBSD, glibc, Linux, LLVM (~1800MiB RSS), musl (~60MiB RSS), ... with decent memory footprint. See [wiki/Project-Setup](../../wiki/Project-Setup) for examples.
|
||||||
|
@ -459,7 +459,8 @@ public:
|
|||||||
info.usr = HashUsr(USR);
|
info.usr = HashUsr(USR);
|
||||||
if (auto *ND = dyn_cast<NamedDecl>(D)) {
|
if (auto *ND = dyn_cast<NamedDecl>(D)) {
|
||||||
info.short_name = ND->getNameAsString();
|
info.short_name = ND->getNameAsString();
|
||||||
info.qualified = ND->getQualifiedNameAsString();
|
llvm::raw_string_ostream OS(info.qualified);
|
||||||
|
ND->printQualifiedName(OS, GetDefaultPolicy());
|
||||||
SimplifyAnonymous(info.qualified);
|
SimplifyAnonymous(info.qualified);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -76,14 +76,14 @@ REFLECT_STRUCT(DocumentLink, range, target);
|
|||||||
void MessageHandler::textDocument_documentLink(TextDocumentParam ¶m,
|
void MessageHandler::textDocument_documentLink(TextDocumentParam ¶m,
|
||||||
ReplyOnce &reply) {
|
ReplyOnce &reply) {
|
||||||
auto [file, wf] = FindOrFail(param.textDocument.uri.GetPath(), reply);
|
auto [file, wf] = FindOrFail(param.textDocument.uri.GetPath(), reply);
|
||||||
if (!wf) {
|
if (!wf)
|
||||||
return;
|
return;
|
||||||
}
|
|
||||||
|
|
||||||
std::vector<DocumentLink> result;
|
std::vector<DocumentLink> result;
|
||||||
|
int column;
|
||||||
for (const IndexInclude &include : file->def->includes)
|
for (const IndexInclude &include : file->def->includes)
|
||||||
if (std::optional<int> bline =
|
if (std::optional<int> bline =
|
||||||
wf->GetBufferPosFromIndexPos(include.line, nullptr, false)) {
|
wf->GetBufferPosFromIndexPos(include.line, &column, false)) {
|
||||||
const std::string &line = wf->buffer_lines[*bline];
|
const std::string &line = wf->buffer_lines[*bline];
|
||||||
auto start = line.find_first_of("\"<"), end = line.find_last_of("\">");
|
auto start = line.find_first_of("\"<"), end = line.find_last_of("\">");
|
||||||
if (start < end)
|
if (start < end)
|
||||||
|
Loading…
Reference in New Issue
Block a user