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
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
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
Fangrui Song
43ea2fcc53
Clean up type printer
2017-12-29 12:58:11 -08:00
Fangrui Song
daaf3a701b
Clean type printer
2017-12-29 12:30:05 -08:00
romix
f897c46122
A more robust way of producing function signatures with parameter names
2017-12-29 12:02:33 -08:00
Fangrui Song
8592df7cf6
Use --bundled-clang=5.0.1 by default (instead of 4.0.0)
2017-12-29 10:40:29 -08:00
Jacob Dufault
f85659713e
Fix compile
2017-12-29 10:28:11 -08:00
Jacob Dufault
6048eb6237
Move LoadCachedFileContents into ICacheManager
2017-12-29 12:19:39 -06:00
Jacob Dufault
71591d7805
Index_Request::contents is no longer optional
2017-12-29 12:00:52 -06:00
Jacob Dufault
a10bb50f51
Begin cache restructure so it can be tested
2017-12-29 12:00:52 -06:00
Jacob Dufault
3c0b2ff042
Move most of import_pipeline.cc into anonymous namespace
2017-12-29 12:00:52 -06:00
Jacob Dufault
c596e55dcc
Cleanup some includes.
2017-12-29 12:00:52 -06:00
Jacob Dufault
48f3c75053
Add using declaration to optional.h, include STL optional if available or fallback to third-party one.
2017-12-29 12:00:52 -06:00
Jacob Dufault
b6071004df
Rename IndexMain to Indexer_Main
2017-12-29 12:00:52 -06:00
Fangrui Song
d4ce12bb9a
Add --use-clang-cxx to waf and move type printer to src/type_printer.cc
...
src/type_printer.cc demonstrates how to leverage clang C++ API.
It includes clang/**/*.h headers and CXTranslationUnit.h which resides
in clang/tools/libclang/ but is not exposed in clang/include/clang-c/
These libclang/ header files are stable and provide some struct definitions used by clang-c/ header files.
A copy of them from clang source tree is checked into libclang/ .
If you want to an early adopter,
CXXFLAGS='-std=c++11 -fno-rtti -D_GLIBCXX_USE_CXX11_ABI=0 -g' ./waf configure --variant=cxx-debug --bundled-clang=5.0.1 --use-clang-cxx
Some clang/**/*.h are unstable and should be used with caution,
in addition, Windows pre-built binaries on https://releases.llvm.org/download.html do not include C++ header files.
Thus `--use-clang-cxx` defaults to False.
2017-12-29 09:51:26 -08:00
Jacob Dufault
59e79b3c42
Move entry_points.h into import_pipeline.h
2017-12-29 09:52:43 -06:00
Jacob Dufault
36e7fa9a76
More work on e2e tests
2017-12-29 09:39:10 -06:00
Jacob Dufault
ad193b2ace
Initialize ImportPipelineStatus::num_active_threads
2017-12-29 09:39:10 -06:00
Fangrui Song
6636617b4d
[comments] Import mpark/variant and make MarkedString a variant ( #200 )
2017-12-28 15:21:40 -08:00
Fangrui Song
34052fbf27
[indexer] Index some references in ClassTemplate
2017-12-28 10:53:13 -08:00
Jacob Dufault
719c6c9ae9
Enhance index test selection filtering
2017-12-28 09:55:17 -08:00