Commit Graph

1787 Commits

Author SHA1 Message Date
firstlove
334e4f32ac regard conversion as method instead of constructor 2019-10-24 18:37:35 -07:00
Fangrui Song
d998861d2e Add $ccls/info 2019-10-24 18:37:35 -07:00
Fangrui Song
f737ac31db Clean 2019-10-24 18:37:35 -07:00
Fangrui Song
bd8d065da9 Use non-inferred entries and build preamble for .h; index on didOpen if no pending requests; documentHighlight 2019-10-24 18:37:35 -07:00
Fangrui Song
0273c59ac7 Rename some initialization options
* Delete index.enabled which can be achieved with index.blacklist: ['.']
* Move completion.include* to completion.include.*
* move largeFileSize to highlight.largeFileSize
2019-10-24 18:37:35 -07:00
Fangrui Song
2a0ba86675 Revamp codeLens & codeAction
b.ref: references of bases
d.ref: references of derived
when b.ref > 0, don't display 0 ref or x bases
2019-10-24 18:37:35 -07:00
Fangrui Song
b0959deead Construct SourceManager with UserFilesAreVolatile
Prettify pipeline
2019-10-24 18:37:35 -07:00
Fangrui Song
c437b16ef7 Support textDocument/{formatting,onTypeFormatting,rangeFormatting} 2019-10-24 18:37:35 -07:00
Fangrui Song
0cc9160ef7 Merge textDocument_did{Change,Close,Open,Save}.cc 2019-10-24 18:37:35 -07:00
Amos Bird
fa07ed1519 Update threaded_queue.h (#82)
https://en.cppreference.com/w/cpp/language/fold
2019-10-24 18:37:35 -07:00
Fangrui Song
058ac08621 Simplify semantic highlighting; improve hover of auto && 2019-10-24 18:37:35 -07:00
Fangrui Song
d425e15cdb Add index.trackDependency and improve pipeline 2019-10-24 18:37:35 -07:00
Fangrui Song
4420bcf76f Add index.initial{Blacklist,Whitelist}
index.{blacklist,whitelist}: disable indexes thoroughly
index.initial{Blacklist,Whitelist}: disable initial loading. will still be indexed after opening
2019-10-24 18:37:35 -07:00
Fangrui Song
5b7758a6ca Add GetAdjustedDecl to adjust Decl's that are missed by clangIndex 2019-10-24 18:37:35 -07:00
Fangrui Song
35cba6d49c Remove clang_utils.* 2019-10-24 18:37:35 -07:00
Fangrui Song
395e9d8724 Misc
Move using below #include to make preamble happy
textDocument/references: if no references, first line or last line => list where this file is included
malloc_trim() only if files have been indexed in last cycle
Intern: use CachedHashStringRef
2019-10-24 18:37:35 -07:00
Riatre Foo
174466516e Allow force disabling snippet via client.snippetSupport 2019-10-24 18:37:35 -07:00
Fangrui Song
dfdabe41b2 documentSymbol: ignore TypeParameter
Reported by Riatre
2019-10-24 18:37:35 -07:00
Riatre Foo
61a61dd4a2 Include macros in completion result 2019-10-24 18:37:35 -07:00
Fangrui Song
562207bf96 Add kind to $ccls/member and iterate all QueryType::def
kind:2 => member functions
kind:3 => nested classes / namespace members
2019-10-24 18:37:35 -07:00
Fangrui Song
176039fe35 Misc 2019-10-24 18:37:35 -07:00
Fangrui Song
5a8b36c997 Fix spurious "Failed to index" errors 2019-10-24 18:37:35 -07:00
Fangrui Song
4792ad845b Publish diagnostics of inferred files and change diagnostics.{onChange,onOpen,onSave} from bool to debounce time 2019-10-24 18:37:35 -07:00
Riatre Foo
1a2e31660c Remove chunks with CK_Information kind from insertText. (#78)
Without this ccls inserts "size() const" in the following scenario:

std::string text;
text.si| <-- Trigger completion here and pick "size"
2019-10-24 18:37:35 -07:00
Fangrui Song
056d6d8093 Delete file_consumer.* 2019-10-24 18:37:35 -07:00
Fangrui Song
b8259012e8 Simplify semantic highlighting 2019-10-24 18:37:35 -07:00
Fangrui Song
96a1d86074 Clean up FileConsumer and improve pipeline 2019-10-24 18:37:35 -07:00
Fangrui Song
e4ab3d44e9 Improve VarDef::type for textDocument/typeDefinition 2019-10-24 18:37:35 -07:00
Fangrui Song
24a8b53813 intern args 2019-10-24 18:37:35 -07:00
Fangrui Song
b4aa666860 intern strings in dependencies and IndexInclude::resolved_path 2019-10-24 18:37:35 -07:00
Fangrui Song
b08e59e8e1 Simplify pipeline and fix race 2019-10-24 18:37:35 -07:00
Fangrui Song
9616e5a2fe Add hierarchicalDocumentSymbolSupport 2019-10-24 18:37:35 -07:00
Fangrui Song
c446090657 Add clang.pathMappings to reuse cache files with differect source paths
Use `>` as the separator.
2019-10-24 18:37:34 -07:00
Fangrui Song
e9e5c7699d Remove [spell.start, spell.end) -> [spell.start, extent.end) hack 2019-10-24 18:37:34 -07:00
Fangrui Song
fd20978b15 Skip informative scope foo:: 2019-10-24 18:37:34 -07:00
Fangrui Song
5b6a72dac2 Rename hierarchies to $ccls/{call,inheritance,member}
bool flat = false; -> bool hierarchy = false; (set it to true to enable hierarchical view)

Delete $ccls/callers (which is what $ccls/call does now)
2019-10-24 18:37:34 -07:00
Fangrui Song
25fb7defc3 Better diagnostics 2019-10-24 18:37:34 -07:00
Fangrui Song
da019ea1cd textDocument/documentSymbol 2019-10-24 18:37:34 -07:00
Fangrui Song
57d7d76ba0 Make $ccls/inheritanceHierarchy and textDocument/typeDefinition find declarations if definitions do not exist; spelling ranges of operator= 2019-10-24 18:37:34 -07:00
Fangrui Song
6aece8e063 pipeline improvement for files not having a project entry (e.g. .h) 2019-10-24 18:37:34 -07:00
Fangrui Song
5caf69056c Make $ccls/reload reset DB and reload cached index files
$ccls/reload is renamed from $ccls/freshenIndex

This is useful when DB (merged index) diverges from backing IndexFile.

Also fix a semantic highlighting bug.
2019-10-24 18:37:34 -07:00
Riatre Foo
3c5ab61762 Normalize paths on Windows
1. Normalize paths in LSP document URIs and project root to forward
slash and uppercase drive letters.
2. Normalize paths in compile_commands.json to forward slash and
uppercase drive letters.
3. Normalize paths from directory listing to forward slash. (Drive
letter should be same as input dir path, which is already uppercase
since path of project root dir is normalized)
4. Add llvm::sys::path::convert_to_slash after certain llvm::sys::path
and llvm::fs calls.
2019-10-24 18:37:30 -07:00
Fangrui Song
709a2654a8 diagnostics; use custom DenseMapInfo 2019-10-24 01:13:24 -07:00
Fangrui Song
11890fc3b1 Revamp completion and signatureHelp, set completion.detailedLabel: true and add completion.duplicateOptional 2019-10-24 01:13:24 -07:00
Fangrui Song
7149851ea2 Misc 2019-10-24 01:13:24 -07:00
Fangrui Song
bfe5693983 Make CXXConversion references wider; use getTypedefNameForAnonDecl; improve CXXDestructor CXXConversion spell 2019-10-24 01:13:24 -07:00
Fangrui Song
e3a4e49ea6 Add diagnostics.onSave 2019-10-24 01:13:24 -07:00
Fangrui Song
0ae7d9d0a4 Reuse preamble (built by "comp-preload") in indexer 2019-10-24 01:13:24 -07:00
Fangrui Song
b8c0b5ad9e Support empty cacheDirectory and fix cache load 2019-10-24 01:13:24 -07:00
Fangrui Song
c067f6edb2 Implement index.onChange: true; enable spell checking for diagnostics 2019-10-24 01:13:24 -07:00