Commit Graph

941 Commits

Author SHA1 Message Date
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
Fangrui Song
5680ff2592 Update README.md: git clone -b master --single-branch 2017-12-31 02:09:38 -08:00
Fangrui Song
146e857555 Remove images/demo.png 2017-12-31 01:54:51 -08:00
Fangrui Song
58243b887f Update README.md: download vscode-extension.vsix from https://github.com/jacobdufault/cquery/releases 2017-12-31 01:34:16 -08:00
scturtle
ffd5fc3e38 Fix extracting the tarball every time. (#207) (#208) 2017-12-30 23:35:40 -08:00
Fangrui Song
01290a83c5 [waf] Fix --bundled-clang=5.0.1 on Mac OS X (#207) 2017-12-30 22:07:05 -08:00
scturtle
4c2dff39ef Response "being indexed" instead of "not found". 2017-12-30 19:39:10 -08:00
Fangrui Song
77e9ea1b77 Use cursor extents for is_implicit function calls
cursor extents have larger ranges and less specific, thus making
them overridable by more specific (with smaller range) symbols.
Thus we do not need to hide them in query.cc:BuildFileDef

For example, the left paren in `A a(3)` jumps to the constructor.
the left paren in `A a = f()` jumps to the copy/move constructor.
2017-12-30 15:42:08 -08:00
Fangrui Song
95126bff61 In detailed_name, remove space between * and name 2017-12-30 13:11:55 -08:00
Fangrui Song
947a80ecc8 [comments] Add a minimalist approach to skip Doxygen comment markers 2017-12-30 10:56:34 -08:00
Chao Shen
829b2fe18c Better order of the completion items. 2017-12-30 15:15:46 +08:00
Fangrui Song
11aa09fac2 Don't reject macro definitions in system headers
Before, an assert() macro expansion jumps to __assert_fail but not
assert. This is because OnIndexReference finds a reference to __assert_fail
but VisitMacroDefinitionAndExpansions rejects the expansion.
2017-12-29 19:18:42 -08:00
Fangrui Song
48e88950e1 Complete CompletionItemKind 2017-12-29 16:32:43 -08:00
Fangrui Song
b015b03405 Fix platform_posix.cc on FreeBSD 2017-12-29 14:46:21 -08:00
Fangrui Song
66d4926e41 Remove <sys/prctl.h> and set thread name on BSD & __APPLE__ 2017-12-29 14:35:20 -08:00
Fangrui Song
720266e97a Support equal signs in options, e.g. --log-file=a.log 2017-12-29 14:00:02 -08:00