mirror of
https://github.com/MaskRay/ccls.git
synced 2025-04-04 16:02:15 +00:00
add var support in textDocument_foldingRange
but also has some issue
This commit is contained in:
parent
b1e36f60a7
commit
2b18de28cc
@ -27,7 +27,8 @@ void MessageHandler::textDocument_foldingRange(TextDocumentParam ¶m,
|
|||||||
|
|
||||||
for (auto [sym, refcnt] : file->symbol2refcnt)
|
for (auto [sym, refcnt] : file->symbol2refcnt)
|
||||||
if (refcnt > 0 && sym.extent.valid() &&
|
if (refcnt > 0 && sym.extent.valid() &&
|
||||||
(sym.kind == Kind::Func || sym.kind == Kind::Type) &&
|
(sym.kind == Kind::Func || sym.kind == Kind::Type ||
|
||||||
|
sym.kind == Kind::Var) &&
|
||||||
(ls_range = getLsRange(wf, sym.extent))) {
|
(ls_range = getLsRange(wf, sym.extent))) {
|
||||||
FoldingRange &fold = result.emplace_back();
|
FoldingRange &fold = result.emplace_back();
|
||||||
fold.startLine = ls_range->start.line;
|
fold.startLine = ls_range->start.line;
|
||||||
|
Loading…
Reference in New Issue
Block a user