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
Jacob Dufault
b2672c6009
Fix a new file in the session not generating an index.
2018-01-10 21:27:58 -08:00
Jacob Dufault
786ac0bc4f
Merge FileContents and FileContentsWithOffsets.
...
Also try to more aggressively load FileContents when indexing to increase reliability.
2018-01-10 21:16:46 -08:00
Jacob Dufault
7de2a733c8
Fix windows path normalization
2018-01-10 20:07:50 -08:00
Jacob Dufault
05b577c9fa
Fix progress not always going to zero
2018-01-10 19:56:47 -08:00
Jacob Dufault
54394ed868
Format
2018-01-10 18:43:01 -08:00
Jacob Dufault
5605dfbb00
Always normalize project file entry when passing it to clang.
...
This makes clang_codeCompleteAt much faster.
2018-01-10 18:33:36 -08:00
Daniel Martín
1836a50a48
Add unit tests for formatting documents and document ranges
2018-01-10 18:11:59 -08:00
Fangrui Song
a8d403426d
using lsRequestId = std::variant<std::monostate, int64_t, std::string>;
...
Emacs lsp-mode uses (gethash "id" json-data) to handle asynchronous
requests. The JavaScript `Number` type is really a hindrance.
2018-01-10 10:45:31 -08:00
Fangrui Song
38bfd26750
Add <iostream>
2018-01-10 10:08:39 -08:00
Chao Shen
6a03a86e64
Hack to restrict the region.
2018-01-10 09:42:54 -08:00
Fangrui Song
0e5e2a6ca5
Fix build
2018-01-10 00:21:55 -08:00
Fangrui Song
a8aa94d4ba
Fix build
2018-01-10 00:15:58 -08:00
Fangrui Song
060b92b214
Change lsVersionedTextDocumentIdentifier::version to variant<monostate,int>
...
version: number | null
Maybe we need to change it to double
2018-01-09 23:57:44 -08:00
Fangrui Song
3e076b4111
workspace/didChangeWatchedFiles placeholder
2018-01-09 23:11:20 -08:00
Fangrui Song
503127e0da
Reflect std::variant and change lsRequestId to variant<monostate,double,string> ( #279 )
2018-01-09 22:34:58 -08:00
Fangrui Song
a99fd7c444
Add IpcId::Shutdown
2018-01-09 22:05:09 -08:00
Fangrui Song
60e384a859
Make semantic highlighting symbol ranges non-overlapping using a scan line algorithm
2018-01-09 20:24:54 -08:00
Fangrui Song
71ca687252
Change Config->enableComments from to int
...
"enableComments": 0 // don't index comments
"enableComments": 1 // index Doxygen comment markers
"enableComments": 2 // -fparse-all-comments
2018-01-09 00:46:37 -08:00
Fangrui Song
37152da0fc
Add std::monostate to represent null field and add Ipc::Shutdown
...
Fixes #265
// FIXME lsRequestId should be number | string | null (std::variant<std::monostate, double, string>
2018-01-09 00:23:00 -08:00
Fangrui Song
a7bf90f50b
Serialize cacheFormat as string literal
2018-01-08 22:22:24 -08:00
Fangrui Song
c0a9b7189f
Use --init='{"enableComments": true}' to index comments and display them on hover
2018-01-08 21:41:46 -08:00
Fangrui Song
53134b679c
Simplify wscript and remove -x c++-header
2018-01-08 20:55:09 -08:00
Joel Hock
9d64a76fec
fix logic in GetFilesInFolderHelper from DFS-ification in 96f4ffc4b
2018-01-08 19:38:37 -08:00
Walter Erquinigo
2494c24332
Delete wrong comment
2018-01-08 13:31:20 -08:00
yshui
b644b54614
Convert GetFilesInFolderHelper to use BFS ( #268 )
...
This function has a huge stack frame (> 8k, thanks to tinydir), and is
called recursively. I have seen this function causing some stack
overflows. So convert it to BFS to avoid that.
2018-01-08 09:09:19 -08:00
Fangrui Song
0ef5aec3fc
Initial values of variables are useful. For now, enable it for const qualified types. Qualified names may also be useful but they can not be easily combined.
...
See #260
2018-01-08 00:20:40 -08:00
Fangrui Song
7b8f8e9cad
Add Config->dumpAST for dumping AST after parsing
...
Example initializationOptions: {"dumpAST": ["a.cc"]}
2018-01-07 23:51:36 -08:00
Chen
acc8f42033
[comments] Strip additional comment marker at the end of comments ( #264 )
2018-01-07 21:40:11 -08:00
Fangrui Song
63178468eb
-x c++-header has implicit -std=c++14
2018-01-07 21:18:02 -08:00
Fangrui Song
a2faa0c519
Treat source filenames with no dot as -x c++-header
2018-01-07 21:13:12 -08:00
Fangrui Song
11436c1f0d
Flatten msgpack by replacing pack_array() with pack()
...
msgpack::unpacker is not a complete streaming deserializer. It returns maps/arrays as a whole but does not allow us to step into individual elements. There is some memory overhead and it is also likely less efficient. By flattening maps, we also no longer need to track how many fields a struct has, which is less error-prone.
2018-01-07 20:52:16 -08:00
Fangrui Song
541b1a7494
Fix MessagePackReader for Position/Range
...
Go out for dinner
2018-01-07 17:42:47 -08:00
Fangrui Song
a78c65fdbb
Fix MSVC C2220
2018-01-07 16:20:13 -08:00
Fangrui Song
4e6c585e59
Add mnemonic constants to ClangSymbolKind
2018-01-07 16:06:07 -08:00
Fangrui Song
d49679d885
Fix Range serialization for -1:-1--1:-1
2018-01-07 15:52:46 -08:00
Fangrui Song
cef1559f6d
Fix waf configure --variant=debug on Linux
2018-01-07 15:18:01 -08:00