Fangrui Song
8c6a87b3a3
Fix signatureHelp signature selection heuristic
2018-01-20 16:21:13 -08:00
Fangrui Song
c36eda70f9
Rename SubstringMatch to SubsequenceMatch and use it to pre-filter completion items
...
Fix #321
2018-01-20 13:15:43 -08:00
Fangrui Song
2e0f14bef8
Add whitelist/blacklist to $cquery/freshenIndex
2018-01-20 11:39:44 -08:00
Fangrui Song
273af8306f
Move GetQueryFileIdFromPath to unnamed namespace, make them inline and optional
2018-01-20 10:44:30 -08:00
Fangrui Song
76c38787df
CXCursor_OverloadCandidate is lsCompletionItemKind::Text
...
See clang/test/Index for some OverloadCandidate cases, they all start with Text.
2018-01-20 10:07:52 -08:00
Fangrui Song
c5bb14e86b
Use INVALID_ID instead of optional and clean up
2018-01-20 09:59:12 -08:00
Ka Ho Ng
b6539a2639
Add INVALID_ID as a constant for Id class Template
...
This is for identifying invalid ID from normal ID.
2018-01-20 09:38:19 -08:00
khng300
427f7b79e3
Use GetQuery{Type,Func,Var}IdFromUsr for querying QueryDatabase::usr_to_{type,func_var} ( #315 )
...
* Use GetQuery{Type,Func,Var}IdFromUsr for querying usr_to_{type,func_var}
Instead of directly touching usr_to_{type,func_var}, use dedicated
methods to touch them for more abstraction around QueryDatabase.
* Use `Usr` as parameter for GetQueryVarIdFromUsr()
To maintain code consistency with other similar helpers.
2018-01-20 08:57:41 -08:00
scturtle
b8a3e089ce
Response on index error. ( #319 )
2018-01-19 23:56:49 -08:00
Fangrui Song
57e95590e8
Remove GetIndexPosFromBufferPos range check
2018-01-19 23:23:52 -08:00
Fangrui Song
6c45663002
Support #include for textDocument/references
2018-01-19 21:11:03 -08:00
Fangrui Song
b305beb419
Address nitpicking
2018-01-19 19:05:26 -08:00
Fangrui Song
8f41aa72de
Better error reporting in ResponseMessage
2018-01-19 15:33:32 -08:00
Fangrui Song
90c2a54bbc
Better error reporting in ResponseMessage. Fix #317
2018-01-19 14:31:49 -08:00
Fangrui Song
8eff5e2e4f
Add BaseIpcMessage::GetRequestId
2018-01-19 10:00:06 -08:00
Fangrui Song
5c43bd9a09
Remove IpcMessage
2018-01-19 01:06:02 -08:00
Fangrui Song
58aa00e6c8
Switch to {Request,Notification}Message
2018-01-19 01:01:56 -08:00
Fangrui Song
0e2b2cfb0c
Switch to {Request,Notification}Message
2018-01-19 00:56:09 -08:00
Fangrui Song
148a8b3f20
Add {Request,Notification}Message
2018-01-19 00:48:08 -08:00
Fangrui Song
162f995344
Better deserialization error messages
2018-01-19 00:14:47 -08:00
Fangrui Song
556f32ec1b
Throw std::invalid_argument for deserialization type error
2018-01-18 22:47:44 -08:00
Chao Shen
b0bf107f71
Add option to disable filtering and sorting completion response.
2018-01-18 19:32:09 -08:00
Fangrui Song
5bef84cabf
Fix serializer MSVC C4244
2018-01-18 11:22:36 -08:00
Fangrui Song
bffe9203eb
Serialize int/long/long long instead of int32_t/int64_t
2018-01-18 10:41:46 -08:00
Fangrui Song
3c23ed8047
cquery_member_hierarchy.cc: Change uint64_t to size_t ( #304 )
2018-01-18 10:13:25 -08:00
Fangrui Song
9b8a0b01e6
Recognize .exe in GetCompilationEntryFromCompileCommandEntry
2018-01-18 09:12:55 -08:00
Jacob Dufault
71ae137393
Add ScopedPerfTimer
2018-01-18 08:25:47 -08:00
Chao Shen
de5e8eeeba
Ignore file name in comparing arguments.
2018-01-18 08:25:20 -08:00
Chao Shen
405fd56781
Crash Hotfix.
2018-01-18 08:24:10 -08:00
Jacob Dufault
ae26aa93db
Fix index not updating
2018-01-18 01:33:37 -08:00
Fangrui Song
545838f7eb
Support uint32_t serialization for size_t (which is either uint32_t or uint64_t on known systems)
2018-01-18 00:43:15 -08:00
Jacob Dufault
2ff823f2eb
Actually fix progress reporting
2018-01-18 00:28:08 -08:00
Jacob Dufault
a233558fcd
Move file content loading into a separate function
2018-01-18 00:21:39 -08:00
Jacob Dufault
39b9991c8f
Fix MSVC compile
2018-01-18 00:09:13 -08:00
Jacob Dufault
e38c6103ea
FileNeedsParse no longer takes FileConsumerSharedState
2018-01-18 00:05:12 -08:00
Jacob Dufault
a1ae100478
Some import pipeline refactors
2018-01-18 00:01:32 -08:00
Fangrui Song
819f5198de
Add $cquery/memberHierarchy{Initial,Expand} to list member variables of a type
2018-01-17 23:51:19 -08:00
Jacob Dufault
5b092dc9da
Rename variable
2018-01-17 23:24:52 -08:00
Jacob Dufault
13e56ac16f
Log if a file was reparsed due to timestamp or argument change.
2018-01-17 23:19:08 -08:00
Jacob Dufault
c80697a8d8
Add tests for FileNeedsParse
2018-01-17 23:11:33 -08:00
Jacob Dufault
bb0dd636ed
Fix spelling mistake
2018-01-17 22:13:44 -08:00
Jacob Dufault
a3774a371f
Reindex a file when command line arguments have changed
2018-01-17 22:04:07 -08:00
Jacob Dufault
bc2521382d
FileNeedsParse is a separate function
2018-01-17 21:53:03 -08:00
Jacob Dufault
4c1ee74b27
Merge ParseFile and DoParseFile
2018-01-17 21:48:09 -08:00
Jacob Dufault
8fef86c0f8
Remove ImportManager::HasActiveQuerydbImports.
...
ImportPipelineStatus::num_active_threads can be used instead.
2018-01-17 21:34:47 -08:00
Jacob Dufault
0fd3d69600
Return false instead of exiting
2018-01-17 21:29:40 -08:00
Jacob Dufault
6e56d97d97
Take unsaved_files by reference
2018-01-17 21:29:40 -08:00
Jacob Dufault
3058e15460
StringJoin can take a separator.
2018-01-17 21:29:40 -08:00
Chao Shen
3132572e72
Don't give up index files of headers if the .cc/.cpp file failed.
2018-01-17 21:24:32 -08:00
Fangrui Song
ca3784db03
Don't index initializer for lambda types
2018-01-17 21:02:09 -08:00
Fangrui Song
b5761b5980
Fix textDocument/definition on #include lines
2018-01-17 12:52:37 -08:00
Fangrui Song
6746883a3b
Better inside-out syntax recognizer
2018-01-17 00:29:32 -08:00
Fangrui Song
dd84a85b75
Filter out inside-out syntax and array types for variable hover
2018-01-17 00:17:04 -08:00
Fangrui Song
bf9150f58a
Index variable initializer
2018-01-16 20:30:45 -08:00
Fangrui Song
a52d4ac61d
Show enum constants as Foo::A = 0
2018-01-16 20:01:47 -08:00
Fangrui Song
7d7e238924
enum
2018-01-16 19:09:29 -08:00
Fangrui Song
0b3ab23b25
For const qualified types, index qualified names along with initializers
2018-01-16 18:26:11 -08:00
Jacob Dufault
67834ca783
Strongly typed semantic highlighting kind
2018-01-16 17:48:22 -08:00
Fangrui Song
98fb9ee821
.
2018-01-15 17:38:28 -08:00
Fangrui Song
22aa939d3d
Fix null pointer dereference but .cquery + header only still does not work
2018-01-15 17:30:26 -08:00
Fangrui Song
804c9c8b1e
Copy Query*::kind to Index*::kind
2018-01-15 15:51:24 -08:00
Fangrui Song
c4935fb367
Add kind to Out_CqueryPublishSemanticHighlighting
2018-01-15 15:08:03 -08:00
Fangrui Song
c3136122ad
Add optional<IndexFuncId> semantic_container to VarDefDefinitionData and cleanup
2018-01-15 10:08:03 -08:00
Fangrui Song
cf54cc9f26
Fix clang compile error. #297
2018-01-15 09:23:59 -08:00
Fangrui Song
1388e5190d
Fix gcc compile error. #297
2018-01-15 08:58:08 -08:00
Jacob Dufault
2ad7ac10ab
Fix include completion.
2018-01-15 02:07:01 -08:00
Fangrui Song
159b0b968d
Fix ReadCharFromStdinBlocking
2018-01-15 00:00:29 -08:00
Fangrui Song
96a23bc573
Better shutdown
2018-01-14 22:53:51 -08:00
Fangrui Song
13728a0fae
Add is_end to Get{Buffer,Index}PosFrom{Index,Buffer}Pos to get better column alignment
2018-01-14 17:16:24 -08:00
Fangrui Song
e04245f185
Align column of index line and buffer line
2018-01-14 15:31:26 -08:00
Fangrui Song
2c4783c904
Rename Get{Buffer,Index}LineFrom{Index,Buffer}Line in preparation for column alignment.
2018-01-14 14:25:15 -08:00
Fangrui Song
ed96b807dd
Style
2018-01-14 13:43:04 -08:00
Fangrui Song
0bad74eb4f
Comment Paul Heckel's diff algorithm which is used to align confident lines in index and buffer
2018-01-14 13:24:55 -08:00
Jacob Dufault
e20a6e9790
Add siphash.h, HashUSR -> HashUsr
2018-01-14 13:18:12 -08:00
Fangrui Song
54ac72115e
Change line/column to 0-based and only use 1-based when (de,)serialized to JSON
2018-01-14 11:54:23 -08:00
Fangrui Song
f78d87ded3
Unify {all,raw}_buffer_lines
...
Also remove GetBufferLineContentFromIndexLine
2018-01-14 11:06:07 -08:00
Fangrui Song
865d567c10
Ignore stdout SIGPIPE
2018-01-14 10:05:29 -08:00
Fangrui Song
d099afb0cc
Fix performance issue in Paul Heckel's diff algorithm
2018-01-14 01:49:41 -08:00
Fangrui Song
a47115208b
Find best match between two bounds found by Paul Heckel's diff algorithm
...
The best match is computed by Eugene W. Myers' O(ND) edit distance algorithm.
2018-01-14 01:37:17 -08:00
Fangrui Song
eec5c77d6a
Use Paul Heckel's diff algorithm to convert between buffer/index line number
2018-01-14 00:23:04 -08:00
Fangrui Song
b81589f6ed
shutdown: id
2018-01-13 11:39:06 -08:00
Fangrui Song
942a0354d3
Use UTF-8 character iterator in GetOffsetForPosition which is good unless UTF-16 surrogate pairs are used #57
2018-01-13 10:43:37 -08:00
Fangrui Song
da2cbe4152
USR -> Usr
2018-01-13 00:10:39 -08:00
Fangrui Song
14a213d407
Change std::string USR to uint64_t pseudorandom function (SipHash 64-bit)
2018-01-12 23:47:24 -08:00
Fangrui Song
feb0249350
Fix textDocument/didClose to use TextDocumentIdentifier
2018-01-12 18:59:25 -08:00
Fangrui Song
45cb0b8cc5
Fix message_handler.cc when range is invalid
2018-01-12 16:06:44 -08:00
Jacob Dufault
93ba0c532b
For completion, only tell clang about relevant dirty working files.
...
The heuristic may not be perfect, but it is probably good enough.
clang_codeCompleteAt seems to get slower as more and more CXUnsavedFile
instances are uploaded.
2018-01-12 09:39:05 -08:00
rianneogi
27dad9a277
Moved lines above
2018-01-12 09:36:17 -08:00
rianneogi
2f8d11e5ff
Always do completion on manual trigger.
2018-01-12 09:36:17 -08:00
rianneogi
a324178fcb
changed size()==0
to empty()
2018-01-12 09:36:17 -08:00
rianneogi
dc00d320ec
Fix autocompletion results on semicolon
2018-01-12 09:36:17 -08:00
scturtle
16f6fdbef1
Fix shrinking region. ( #290 )
2018-01-12 08:44:11 -08:00
Daniel Martín
a7215c233c
Add unit test for conversion from clang-format edits to LSP ranges
2018-01-11 17:33:51 -08:00
Daniel Martín
903d517b0a
Convert to snake case
2018-01-11 17:33:51 -08:00
Jacob Dufault
cc1fbada4b
Don't crash in completion if there is no working file.
2018-01-11 00:35:15 -08:00
Jacob Dufault
beba312a5f
Add VerifyUnique in querydb, disabled by default.
...
Will be used later to validate querydb behavior.
2018-01-11 00:35:15 -08:00
Fangrui Song
4d07189b47
Comment optional<T> in serializers and remove redundant Writer ReflectMember on std::vector
2018-01-11 00:32:28 -08:00
Fangrui Song
5f1aa34a9c
Comment serializer
2018-01-11 00:07:54 -08:00
Fangrui Song
6fb1798692
Use @ as escape character of cache filenames
...
Fixes #112
2018-01-10 23:57:42 -08:00
Fangrui Song
27ddce4cd6
Reader reflection of std::variant<Ts...>
2018-01-10 23:17:27 -08:00