Commit Graph

74 Commits

Author SHA1 Message Date
Fangrui Song
5dcccea285 Use Clang C++ for completion and diagnostics 2018-07-15 00:15:31 -07:00
Fangrui Song
ed1b221fab Remove submodule doctest 2018-07-08 17:20:48 -07:00
Fangrui Song
39a17a9fd7 Remove WithFileContent & lex_utils.{cc,h} 2018-05-31 21:07:59 -07:00
Fangrui Song
8fabe3d1ae Replace loguru with a custom logger 2018-05-27 15:14:33 -07:00
Fangrui Song
fa9df5bcef Remove variant and clean up 2018-04-17 00:12:59 -07:00
Fangrui Song
d45c057dd4 Backport recent update of completion 2018-04-14 11:38:06 -07:00
Fangrui Song
97b1592475 Simplify lsp.h and fix qual_name_offset when SetVarDetail is called on an existing variable 2018-04-09 00:31:34 -07:00
Fangrui Song
6e68e9edbd Simplify 2018-04-07 21:04:20 -07:00
Fangrui Song
233e377137 . 2018-03-31 11:27:28 -07:00
Fangrui Song
f8a816d110 . 2018-03-31 09:07:53 -07:00
Fangrui Song
da649891ae Resurrection of ccls 2018-03-30 22:02:26 -07:00
Fangrui Song
640f548e7c Use std::index_sequence and std::make_unique 2018-03-10 15:57:02 -08:00
Fangrui Song
9944617df6 Fix #385 2018-01-31 16:48:26 -08:00
Jacob Dufault
a392301be3 Format 2018-01-29 16:27:43 -08:00
Fangrui Song
57e95590e8 Remove GetIndexPosFromBufferPos range check 2018-01-19 23:23:52 -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
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
feb0249350 Fix textDocument/didClose to use TextDocumentIdentifier 2018-01-12 18:59:25 -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
scturtle
16f6fdbef1 Fix shrinking region. (#290) 2018-01-12 08:44:11 -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
Jacob Dufault
06870d5b61 Do not show completion candidates for : or > by itself.
Fixes issue #258.
2018-01-07 14:27:57 -08:00
Jacob Dufault
181b405c54 Remove some debug code 2018-01-06 12:32:58 -08:00
Joel Hock
0c9f572637 freeze state of WorkingFiles to insulate them from async changes
before shipping unsaved state off to clang
2018-01-06 11:26:09 -08:00
Jacob Dufault
bbe11e32eb Prefer WriteToFile over manual std;:ofstream usage. 2018-01-05 10:02:53 -08:00
Jacob Dufault
b8e7a5bcb3 Format code 2017-12-27 07:54:46 -08:00
Fangrui Song
20c156f71d Make lsTextDocumentContentChangeEvent::{range,rangeLength} optional. fix #185 (#189)
Also make lsVersionedTextDocumentIdentifier::version optional per specification
2017-12-25 00:58:26 -08:00
Jacob Dufault
a1fd516788 Log stack trace when there is bad index/buffer lines 2017-12-12 09:50:12 -08:00
Jacob Dufault
b65a30c3f7 Move Ipc_* types into messages/ 2017-12-05 20:41:44 -08:00
Jacob Dufault
5d1fd4ce4d Remove a bunch of std::cerr in favor of LOG_S 2017-12-01 17:04:39 -08:00
Jacob Dufault
9b44bf7901 Run ./format.sh 2017-12-01 09:55:41 -08:00
Peter Elmers
750cc4ea30 Respond to comment 2017-11-26 12:12:59 -05:00
Peter Elmers
3341b1f13d Only replace text if both rangeLength and range are not set 2017-11-26 12:12:59 -05:00
Jacob Dufault
97417ecc93 Reformat code 2017-11-19 14:11:54 -08:00
Fangrui Song
297ed1d13e Use indented TEST_SUITE 2017-11-19 14:13:11 -05:00
Jacob Dufault
084d5c8d91 Fix two TODOs 2017-09-26 21:40:47 -07:00
Jacob Dufault
f5314b62b1 Reformat to Chromium style. 2017-09-21 18:14:57 -07:00
Jacob Dufault
c83b9eab77 Fix issue when buffer contents do not get synced properly near start of file 2017-07-29 21:13:22 -07:00
Jacob Dufault
ba973ba1bf Remove unused variables 2017-07-17 10:41:59 -07:00