Commit Graph

59 Commits

Author SHA1 Message Date
Fangrui Song
7b6768fd1c Rendezvous after receiving "exit" notification (#159) 2019-10-24 18:37:55 -07:00
Fangrui Song
cc11d30dad Refactor serializer
Delete virtual bases Reader & Writer
Delete unused MAKE_REFLECT_STRUCT_WRITER_AS_ARRAY
Merge serializers/{json,binary}.hh into serializer.{hh,cc}
MAKE_REFLECT_STRUCT => REFLECT_STRUCT
MAKE_REFLECT_TYPE_PROXY => REFLECT_UNDERLYING
2019-10-24 18:37:55 -07:00
Fangrui Song
d49119b364 Refactor WorkingFiles and CompletionManager
* WorkingFiles::files : vector -> unordered_map
* Add timestamp to WorkingFile

* Rename "comp-preload" thread to "preamble"
* Rename CompletionManager to SemaManager as it is used by "diag" "comp" "preamble"
* Rename clang_complete.* to sema_manager.*
* Merge SemaManager::{preloads,sessions}
* Add initialization option session.maxNum
* In DiagnosticMain, if an included file was modified, cancel the DiagTask and create a PreambleTask instead. The task sets `from_diag` so as to trigger immediate DiagTask after the preamble is built.
2019-10-24 18:37:55 -07:00
Fangrui Song
5b41788ebb Merge query.hh and query_util.hh 2019-10-24 18:37:54 -07:00
Fangrui Song
bf6fc50b54 Refactor Matcher to use pimpl and merge match.hh into utils.hh 2019-10-24 18:37:54 -07:00
Fangrui Song
a3e635fb09 Make EmptyParam empty & rewrite LruCache 2019-10-24 18:37:54 -07:00
Fangrui Song
6379beb9ba constexpr std::string_view -> const std::string_view
This works around gcc 7.2/clang rC347417 which have a bad interaction with libstdc++'s implementation of P0426
constexpr std::string_view also emits a string_view object in .rodata that cannot be optimized out by clang (which means larger object file size)

So use good old const.
2019-10-24 18:37:54 -07:00
Fangrui Song
c2cf488114 Use clang::isIdentifierBody and clean up utils/working_files 2019-10-24 18:37:54 -07:00
Fangrui Song
50736827ca Remove ls prefix from many LSP interfaces
Rename SymbolKind to Kind & lsSymbolKind to SymbolKind
Use textDocumentSync: TextDocumentSyncOptions
2019-10-24 18:37:54 -07:00
Fangrui Song
ca550720e4 Simplify and better compatibility with encodings retaining the feature of low bytes being 1-byte characters 2019-10-24 18:37:54 -07:00
Fangrui Song
e3a2f1a9a8 *.h -> *.hh 2019-10-24 18:37:54 -07:00
Fangrui Song
67eb1e6b23 Refactor message handler and namespace ccls 2019-10-24 18:37:53 -07:00
Fangrui Song
6ce79155a9 Add command line option -index=root to index without starting language server 2019-10-24 18:37:35 -07:00
Fangrui Song
6deadc5f24 Add pipeline::{Notify,Reply,ReplyError} and simplify message handling
Delete method.{cc,h}
Rename $ccls/setSkippedRanges to $ccls/publishSkippedRanges
Rename $ccls/publishSemanticHighlighting to $ccls/publishSemanticHighlight; stableId -> id
2019-10-24 18:37:35 -07:00
Fangrui Song
3bf5002c98 Support workspace folders 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
b0959deead Construct SourceManager with UserFilesAreVolatile
Prettify pipeline
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
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
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
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
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
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
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
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
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
Fangrui Song
1ab0d492b7 README 2019-10-24 01:13:24 -07:00
Fangrui Song
6aee7b9648 Remove ASTUnit from indexer and clean up 2019-10-24 01:13:22 -07:00
scturtle
df1717538f Filter deps with index.blacklist. (#64) 2019-10-24 01:12:58 -07:00
Fangrui Song
27a5b24b59 Add license notice 2019-10-24 01:01:21 -07:00
Amos Bird
6e8ba37ad0 correctly grabbing the ownership of index files. (#54) 2019-10-24 01:01:21 -07:00
Fangrui Song
39787d2851 clang-format
DEF CON 26 CTF
2019-10-24 01:01:21 -07:00
Fangrui Song
3e8f8fea64 clangIndex 2019-10-24 01:01:20 -07:00
Fangrui Song
f9befbd5fb pipeline 2019-10-24 01:01:20 -07:00
Fangrui Song
8e4d62212b Misc changes to clangIndex 2019-10-24 01:00:37 -07:00
Fangrui Song
103aa711d3 First draft: replace libclang indexer with clangIndex 2019-10-24 00:53:16 -07:00
Fangrui Song
b784685c61 diagnostics 2019-10-24 00:18:13 -07:00
Fangrui Song
9b9bf1cd19 Fix .. in compdb path; better type alias 2019-10-24 00:17:28 -07:00