Jacob Dufault
22ef88045f
Write cache to disk in binary format. Otherwise some escaping may occur.
2018-01-03 22:13:33 -08:00
Jacob Dufault
0c839d19fc
[ci]: Do not wait for input after failing a test.
...
This adds --ci command line flag which disables waiting for user input when running an index test (ie, test expectations are not updated).
2018-01-03 18:43:58 -08:00
Fangrui Song
cd3faf4dfe
[waf] Add test rax,rax
-> test r8,r8
patch for --bundled-clang={4.0.0,5.0.1} on Linux
2018-01-03 18:36:07 -08:00
Jacob Dufault
31c7fddf3d
More work to fix AppVeyor
2018-01-03 18:32:15 -08:00
Jacob Dufault
f5f3887dd3
Add newline after warning about not running obj-c tests
2018-01-03 18:12:39 -08:00
Jacob Dufault
2a17f66792
Write test using binary, otherwise \n will become \r\n leading to double \r\r\n.
2018-01-03 18:12:39 -08:00
Chao Shen
d9b9e5e227
fix appveyor
2018-01-03 18:12:21 -08:00
Jacob Dufault
10c55d9534
Index tests need to be CRLF
2018-01-03 17:22:21 -08:00
Daniel Martín
7e2c19d792
Format with predefined_style when a style cannot be obtained
2018-01-03 13:29:54 -08:00
Fangrui Song
5f8e1935a6
Use cursor extent instead of cursor spelling range for CXCursor_MemberRefExpr #174
...
Members of non-concrete template types do not have useful spelling ranges (likely unexposed).
C<int> f; f.x // .x produces a MemberRefExpr which has a spelling range of `x`.
C<T> e; e.x // .x produces a MemberRefExpr which has a spelling range of `e` (weird).
To make `e.x` (MemberRefExpr with empty spelling name) able to find
definition, We use cursor extent (larger than spelling range) `e.x`. It
would be better if we could restrict the ranges to `.x` or just `x`.
Nevertheless, larger ranges are less specific, and should do no harm
because they will be overriden by more specific variable references `e`.
2018-01-03 11:02:28 -08:00
Fangrui Song
a0c6435ff4
[waf] -fno-rtti -Wno-comment -DLOGURU_RTTI=0 for --use-clang-cxx
2018-01-03 09:05:58 -08:00
Jacob Dufault
4514e2f9ce
Silence unhandled namespace declaration warnings
2018-01-03 08:05:52 -08:00
scturtle
66af432946
Fix completion order: Sort after cache.
2018-01-03 07:58:59 -08:00
Fangrui Song
1109c486c6
Help Riatre
...
clang_getNumArgTypes may return -1 for unexposed types.
2018-01-03 00:08:18 -08:00
Fangrui Song
74be57c334
Set variable_type of lambda parameters
...
Now a lambda parameter is listed in $cquery/vars of its type
2018-01-03 00:00:03 -08:00
Fangrui Song
a63297b002
Add type names to non-type template parameters
2018-01-02 22:52:40 -08:00
scturtle
f23a79b01d
[travis] Retry. ( #221 )
2018-01-02 22:25:06 -08:00
Fangrui Song
c8040a3b9e
[travis] Make travis faster
2018-01-02 21:57:15 -08:00
Fangrui Song
e9bde76c7e
[travis] cache
2018-01-02 20:39:27 -08:00
Fangrui Song
2830548768
[waf] Prep for travis cache directories
2018-01-02 20:35:40 -08:00
Fangrui Song
1220463efe
Make GetPath less hacky for #215
2018-01-02 18:59:47 -08:00
Fangrui Song
3e1a068c19
Make implicit calls spanning one more column to the left/right
...
This is hacky but useful. e.g. textDocument/definition on the space/semicolon in `A a;` or `return 42;` will take you to the constructor.
2018-01-02 16:30:08 -08:00
Chao Shen
c157445ef3
fix ci
2018-01-02 09:11:34 -06:00
Fangrui Song
a14ddc69ac
Split MultiQueueWaiter into {querydb,indexer,stdout}waiter to solve thundering herd problem ( #217 )
...
See https://github.com/jacobdufault/cquery/pull/213#issuecomment-354706992
2018-01-01 23:40:36 -08:00
Jacob Dufault
0b53c871dc
Remove platform specific mutex/shared memory
2018-01-02 01:37:39 -06:00
Fangrui Song
f68e70f5b7
Replace MultiQueueWaiter timeout with condition_variable_any on multiple mutexes
...
Inspired by https://github.com/jacobdufault/cquery/pull/213
2018-01-01 16:19:58 -08:00
Fangrui Song
6fa92f7968
Compare hover & comments in {Func,Type,Var}DefDefinitionData::operator==
...
So that the changes populate to querydb.
Also expand two std::set_difference calls to save one scan
2018-01-01 12:36:08 -08:00
Fangrui Song
0539e4249b
The Little Match Ray On New Year's Eve 2017
2018-01-01 00:06:25 -08:00
Fangrui Song
cef47b13f7
Remove ResolveSpelling
2017-12-31 23:34:00 -08:00
Fangrui Song
02246a5c4b
Add ClangCursor::get_spelling_range and change some ResolveSpelling calls to get_spelling_range
2017-12-31 23:27:33 -08:00
Fangrui Song
a6496a0f8f
[indexer] Add template parameters in parameter-list to their uses
and index template template parameters
2017-12-31 22:54:52 -08:00
Fangrui Song
a4847181fa
Fix formatting
2017-12-31 20:17:31 -08:00
Fangrui Song
86768b7d36
[formatting] textDocument/rangeFormatting
2017-12-31 20:03:43 -08:00
Fangrui Song
12ad0303be
[formatting] Add textDocument/rangeFormatting
2017-12-31 19:41:47 -08:00
Fangrui Song
aca8e42033
Use --bundled-clang=5.0.1 in appveyor ( #212 )
2017-12-31 17:21:35 -08:00
Daniel Martín
c5610b8d76
Default to Chromium's format style if cquery cannot obtain it ( #211 )
...
Set the tab configuration (tab, spaces, amount) to the information
provided by the LSP client.
2017-12-31 16:35:37 -08:00
Fangrui Song
f9aa0ef66d
[formatting] Refrain from std::make_unique until migration to C++14 or C++17
2017-12-31 15:56:02 -08:00
Fangrui Song
cd2f3c1e45
[formatting] Rename formattingOptions to options
...
LanguageClient-neovim `:call LanguageClient_formatting()` works now
2017-12-31 15:46:28 -08:00
Fangrui Song
c97bc5dbac
[formatting] Add missing cases
2017-12-31 14:52:06 -08:00
Fangrui Song
7529973014
[formatting] Change linking order
2017-12-31 14:23:49 -08:00
Fangrui Song
9d04446d48
Merge branch 'document-formatting' of https://github.com/danielmartin/cquery into danielmartin-document-formatting
2017-12-31 14:17:39 -08:00
Daniel Martín
f389d294b7
Protect formatting code inside USE_CLANG_CXX
2017-12-31 23:15:03 +01:00
Fangrui Song
f32d3a6851
Use -working-directory
...
This is in preparation for https://github.com/jacobdufault/cquery/pull/94
-working-directory allows us to remove relative filename resolution later on.
2017-12-31 14:00:50 -08:00
Fangrui Song
73ba3f0d6f
Move -x & -std= options just after compiler driver
2017-12-31 13:37:59 -08:00
Daniel Martín
4fdc81ae6d
Manage Expected in formatting APIs
2017-12-31 13:30:34 +01:00
Daniel Martín
05e9bf3966
Add missing includes
2017-12-31 13:30:34 +01:00
Daniel Martín
0e16899b81
Move formatting structs to text_document_formatting.cc
2017-12-31 13:30:34 +01:00
Daniel Martín
aa4e5e7e5b
Implement .clang-format style management
...
If we can't find a .clang-format file for the given file, default to
Chromium style with the tab/spaces configuration that was provided by
the client.
2017-12-31 13:30:34 +01:00
Daniel Martín
19341c18cd
Basic implementation of document formatting
...
Still some important TODOs to address:
- Improve the algorithm that converts between offsets and line/column
pairs. Right now it's extremely naive.
- Add proper support for a .clang-format file that specifies
the coding style.
2017-12-31 13:30:34 +01:00
Daniel Martín
abc2edf05f
Add structures to support document formatting
2017-12-31 13:24:58 +01:00