Fangrui Song
2c787fe1fe
[waf] Use str for Python 2
2018-02-04 11:01:02 -08:00
Fangrui Song
d573a68130
Simplify operator==
2018-02-04 10:09:58 -08:00
Guillaume Papin
65d7edd9b9
refactor CompareLsCompletionItem ( #412 )
...
Since not everything is a reference,
std::make_tuple() seems more appropriate than std::tie().
For heavy types, std::cref() can be used to preserve the reference.
2018-02-04 09:31:23 -08:00
Guillaume Papin
24702a25b0
add detailedLabel completion style
...
Some completion UI, such as Emacs' completion-at-point and company-lsp,
display completion item label and detail side by side.
This does not look right, when you see things like:
"foo" "int foo()"
"bar" "void bar(int i = 0)"
When this option is enabled, the completion item label is very detailed,
it shows the full signature of the candidate.
The detail just contains the completion item parent context.
Also, in this mode, functions with default arguments,
generates one more item per default argument
so that the right function call can be selected.
That is, you get something like:
"int foo()" "Foo"
"void bar()" "Foo"
"void bar(int i = 0)" "Foo"
Be wary, this is quickly quite verbose,
items can end up truncated by the UIs.
2018-02-03 20:56:14 -08:00
Fangrui Song
7a1464cadb
Fix #410
2018-02-03 20:37:39 -08:00
Fangrui Song
985dec101d
Generation
2018-02-03 19:51:30 -08:00
Fangrui Song
0a721ff247
Simplify query.h
2018-02-03 18:16:30 -08:00
scturtle
15dd552610
Complex include completion.
2018-02-04 09:45:58 +08:00
Chao Shen
e16753d261
Improve completion.
2018-02-04 09:45:58 +08:00
Fangrui Song
e5128d3db9
Wrap Query* references with WithGen
2018-02-03 17:44:20 -08:00
Fangrui Song
3d6d000297
Add Generation gen;
to Query{Func,Type,Var} and corresponding ToQueryLocation
2018-02-03 14:52:26 -08:00
Riatre Foo
54c587a700
Look for .cquery in any directory above the source file in the hierarchy. ( #409 )
...
* Look for .cquery in any directory above the source file in the hierarchy.
Currently cquery only reads compiler arguments (.cquery) from project
root. Under some circumstances (e.g. remote compiling), generating a
compilation database with correct path in it is non-trivial, and
allowing per directory compile arguments usually helps.
* unused var buf
2018-02-03 13:16:38 -08:00
Fangrui Song
6933870962
Change symbol id from size_t to RawId (uint32_t currently)
2018-02-03 10:35:17 -08:00
Fangrui Song
f266cb7b2a
[waf] install
2018-02-02 12:47:33 -08:00
Fangrui Song
880546b333
[waf] Simplify
2018-02-02 12:33:18 -08:00
Riatre Foo
b145243a64
Fix #393 again. ( #402 )
...
28cd33e actually changed the behaviour of GetFilesInFolderHelper.
2018-02-02 10:51:14 -08:00
Fangrui Song
27c4222ef1
[waf] Deprecate --use-system-clang and simplify
2018-02-02 09:46:14 -08:00
Fangrui Song
12e41c609e
Fix #393
2018-02-01 23:35:34 -08:00
Fangrui Song
57a4cf3265
Fix string_view.h
2018-02-01 23:29:17 -08:00
Fangrui Song
e42f6b6191
optional<...> GetQuery*IdFromUsr -> Maybe
2018-02-01 23:17:34 -08:00
Fangrui Song
ae999f9c92
size_t Query*::symbol_idx -> Maybe<Id<void>>
2018-02-01 22:52:03 -08:00
Fangrui Song
3c6f3f661f
Use Maybe<Id<T>> for {Func,Type,Var}DefDefinitionData
...
sizeof(db->funcs[0].def) 224 (-24)
sizeof(db->types[0].def) 248 (-24)
sizeof(db->vars[0].def) 160 (-24)
2018-02-01 22:31:43 -08:00
Fangrui Song
392cd79d04
Add Maybe<T> and change definition_{spelling,extent} from optional to Maybe
...
sizeof(db->funcs[0].def) decreases from 248 to 232
sizeof(db->types[0].def) decreases from 272 to 256
sizeof(db->vars[0].def) decreases from 184 to 168
2018-02-01 21:39:23 -08:00
Nathan Ridge
74f9be1d6f
Use symbol kind 'Parameter' for template parameters
...
Clients can distinguish between function and template parameters based
on storage class.
2018-02-01 20:07:11 -08:00
Fangrui Song
ce6f1c7294
QueryDatabase::{detailed_names,short_names} -> GetSymbol{DetailedName,ShortName}
2018-02-01 18:15:22 -08:00
Fangrui Song
2fb85732c0
Add RemoveSymbol
2018-02-01 17:25:06 -08:00
Chao Shen
28bdc0cf02
Check if using libstdc++ before include <string_view>.
2018-02-02 09:02:44 +08:00
Fangrui Song
642975ea17
Reflect string_view and fix workspace/symbol
2018-02-01 13:48:41 -08:00
Fangrui Song
0d715e7bcf
Handle int8_t int16_t uint8_t uint16_t enum constants
...
Clean up clang_complete
2018-02-01 12:21:58 -08:00
Fangrui Song
8bb5d47377
__has_include to #include <string_view>
...
@scturtle's suggestion
2018-02-01 08:35:05 -08:00
Chao Shen
5b6945d909
Remove last CR.
2018-02-01 17:12:36 +08:00
Fangrui Song
490f52205f
Clean serializer
2018-02-01 00:39:31 -08:00
Chao Shen
57ea5f7cb9
Check the function name appearance before publish semantic highlight.
2018-02-01 16:27:31 +08:00
Jacob Dufault
e0e3a39d5d
Fix clang 3.5 compile error
2018-01-31 21:49:56 -08:00
Jacob Dufault
c98d53cfe2
Indexer now has access to |config|
2018-01-31 21:48:49 -08:00
Fangrui Song
e259bb91d3
Use string_view for lsSymbolInformation
2018-01-31 21:40:40 -08:00
Fangrui Song
6d6c1639d0
Type-dependent member access expressions
2018-01-31 21:23:00 -08:00
Jacob Dufault
b02c92e335
Reduce file reads in import_pipeline
2018-01-31 21:20:38 -08:00
Jacob Dufault
301d295f79
Remove std::experimental uses
2018-01-31 21:18:32 -08:00
Jacob Dufault
a2c1cb4a83
Enable make* indexing by default
2018-01-31 20:21:16 -08:00
Fangrui Song
8108de0cfa
Change short_names/detailed_names from const std::string& to std::string_view
2018-01-31 19:53:50 -08:00
Fangrui Song
c33aa113db
Use short_name for tests but short_name_{offset,size} for lang server
2018-01-31 17:22:30 -08:00
Fangrui Song
9944617df6
Fix #385
2018-01-31 16:48:26 -08:00
Fangrui Song
768f4ecb6e
Enable "Make" hack only if config->index.make_unique is true.
2018-01-31 11:10:20 -08:00
Fangrui Song
871ae34a1b
Hotfix of stale file contents in 186898
2018-01-31 08:42:25 -08:00
Fangrui Song
3e16055b31
Change some API const std::string& -> std::string_view
2018-01-31 00:35:04 -08:00
Fangrui Song
4c895bef0b
Make optional<string> {hover,comments} non-optional
2018-01-30 23:48:34 -08:00
Fangrui Song
77dca1936b
Change TypeDefDefinition::short_name from string to string_view
2018-01-30 23:01:59 -08:00
Fangrui Song
93269ecfd4
Change std::string FuncDefDefinition::short_name to ShortName()
2018-01-30 22:40:02 -08:00
Fangrui Song
41f87887bb
Change std::string VarDefDefinition::short_name to ShortName()
2018-01-30 22:04:55 -08:00