Commit Graph

1523 Commits

Author SHA1 Message Date
Fangrui Song
dc1c72ce30 Remove definition from uses for TemplateVisitor 2018-01-28 22:41:53 -08:00
Fangrui Song
535c2c20a3 Escape more characters in ECMA-262 uriReserved
Fixes #248
2018-01-28 22:11:53 -08:00
Fangrui Song
16bf3158c5 Add SymbolRole to SymbolRef and fix $cquery/{base,derived} by ordering definitions before uses 2018-01-28 20:39:41 -08:00
Fangrui Song
777193d02f Better template specialization 2018-01-28 18:31:11 -08:00
Fangrui Song
fb3cd89b05 Move language_server_api.h structs to initialize.cc 2018-01-28 14:39:48 -08:00
Fangrui Song
640d72f85c Check --init and remove --wait-for-input 2018-01-28 14:06:35 -08:00
Fangrui Song
1e7727f75a Allow empty initializationOptions or cacheDirectory (which disables cache read/write) 2018-01-28 13:52:04 -08:00
Fangrui Song
80213e8a23 Complete with empty context 2018-01-28 13:26:34 -08:00
Fangrui Song
bdb880e0a5 Serialize VarDefDefinitionData::{parent_kind,parent_id} 2018-01-28 12:34:31 -08:00
Fangrui Song
79b60561d1 Remove CXCursor_MacroDefinition from uses 2018-01-28 11:42:40 -08:00
Fangrui Song
818ef8a834 -h --help for help. --language-server is the default mode 2018-01-28 10:53:17 -08:00
Fangrui Song
45b57bd729 [test] Use system 'diff' on POSIX. 2018-01-27 22:31:17 -08:00
Fangrui Song
70bbe6c64c Use major/minor versions for IndexFile
Fixes #364
2018-01-27 21:47:37 -08:00
Fangrui Song
5763201838 Remove is_type_member & VarDefDefinitionData::declaring_type
Rename ClangStorageClass to StorageClass
Add semantic_parent & semantic_parent_kind (but not serialized yet)
Move query.h SymbolKind to indexer.h SymbolKind and make it uint8_t
2018-01-27 20:46:06 -08:00
Fangrui Song
aeb63ce3ad Add magic/version to "cacheFormat": "msgpack" 2018-01-27 19:21:35 -08:00
Fangrui Song
41eb1c863c [waf] Remove -lrt & add -latomic 2018-01-27 10:59:40 -08:00
Fangrui Song
d605217c1a matcher.cc: use std::regex_search instead of std::regex_match
Prototype of non-working `dependencies` parameter of $cquery/freshenIndex
2018-01-27 10:42:18 -08:00
Jacob Dufault
e3d3a492d0 Return default value 2018-01-27 10:20:54 -08:00
Phil Wise
74a39e7ea8 Fix build on Ubuntu 16.04
On Ubuntu 16.04 I get the following compile error in release mode:

../../src/indexer.cc: In function ‘ClangStorageClass {anonymous}::GetStorageClass(CX_StorageClass)’:
../../src/indexer.cc:130:1: error: control reaches end of non-void function [-Werror=return-type]

cc1plus: all warnings being treated as errors
2018-01-27 09:03:08 -08:00
Fangrui Song
d6003e1991 workspace/didChangeWatchedFiles 2018-01-26 23:17:49 -08:00
Fangrui Song
0bbabbcbd2 Move IndexVar::def::declarations to IndexVar::declarations 2018-01-26 21:50:17 -08:00
Fangrui Song
e892c23955 Change declaration to declarations in IndexVar 2018-01-26 18:21:15 -08:00
Fangrui Song
6b3673a438 Remove definition_spelling from uses in IndexVar
Instead, specify `include_decl = true` in GetUsesOfSymbol
2018-01-26 18:01:14 -08:00
Fangrui Song
37809def7c Add bool include_decl parameter to GetUsesOfSymbol
Fixes #350

Function declarations/definitions are not counted if include_decl is
false.
We should do similar thing to Var and Type.
2018-01-26 17:31:50 -08:00
Fangrui Song
723c78409f Move is_operator from indexer to semantic highlighting 2018-01-26 10:08:56 -08:00
Fangrui Song
351e7b6c95 Add ClangStorageClass storage; to {Func,Var}DefDefinitionData and semantic highlighting.
This can be used to differentiate local/global variables, template parameters.
Also make msgpack deserialization robust.
2018-01-26 09:47:42 -08:00
Fangrui Song
3ef0abec14 WIP DidChangeWatchedFiles 2018-01-25 23:04:07 -08:00
Fangrui Song
1aec53621f Use std::vector<std::string> files_removed;
It turns out this field is not used.
2018-01-25 22:42:58 -08:00
Fangrui Song
50c6ed1dd3 Clean up SetTypeName 2018-01-25 22:25:19 -08:00
Fangrui Song
63b793619d Set names in ResolveToDeclarationType and type declarations. 2018-01-25 21:38:39 -08:00
Fangrui Song
7aea052f09 Re-pick "Handle template <class T> class A" but does not assign names to templates without body 2018-01-25 12:35:59 -08:00
Jacob Dufault
7f9f6e0c6b Revert "Handle template <class T> class A; and attribute variable uses to specialized template if exists"
This reverts commit 8da62430e575022e206b66bad58b376002422f32.
2018-01-25 11:46:03 -08:00
Jacob Dufault
d14f17212d Do not show code lens on namespaces.
There are too many references for editors to handle well.
2018-01-25 11:22:55 -08:00
Fangrui Song
684ad961ad Handle template <class T> class A; and attribute variable uses to specialized template if exists 2018-01-25 01:13:07 -08:00
Fangrui Song
403c892838 --debug disables libclang crash recovery 2018-01-25 00:01:30 -08:00
Fangrui Song
db1f707027 Add --debug to disable libclang crash recovery
We can add more debug facility later.
2018-01-24 23:32:42 -08:00
Fangrui Song
706a3d0017 Attribute enum to its underlying type's uses 2018-01-24 21:55:59 -08:00
Fangrui Song
d2c4c34bc0 Replace std::cin.get with getchar. Fix #334
To avoid C++ iostream headache:
std::cin has a bad() state
std::{cin,cout} are also tied by default, reading from cin will cause a flush of cout, which may deadlock
2018-01-24 21:32:07 -08:00
Jacob Dufault
61efdcc721 Better inline code lens location for functions 2018-01-24 19:15:18 -08:00
Jacob Dufault
3f4866208f Fix unit tests properly 2018-01-24 10:42:09 -08:00
Fangrui Song
549f4f3674 Fix --test-unit 2018-01-24 10:26:01 -08:00
Fangrui Song
c4e8db2964 Index namespaces as Type 2018-01-24 00:57:50 -08:00
Nathan Ridge
98d75ae79c Add vscode-extension.vsix to .gitignore
This file is generated by vscode-client/build.py but is not checked in.
2018-01-23 23:03:21 -08:00
Fangrui Song
b4e1e4fd3a Remove enableComments, make index.comments default to 2, and index builtin types 2018-01-23 22:56:13 -08:00
Jacob Dufault
43fb1abd8e Update travis to deploy releases 2018-01-23 18:08:00 -08:00
Jan Niklas Hasse
faa80bfb20 AppVeyor: Also build with clang from MSYS2 2018-01-23 10:01:10 -08:00
Jan Niklas Hasse
358c001d3c Don't use MSVC specific exception handler for MinGW 2018-01-23 10:01:10 -08:00
Jan Niklas Hasse
7fa1accfdf Link psapi on Windows (MSYS2) 2018-01-23 10:01:10 -08:00
Jan Niklas Hasse
3726b2cdca Update loguru submodule 2018-01-23 10:01:10 -08:00
Fangrui Song
8ef2b95a45 Fix lsDocumentUri::GetPath on Windows 2018-01-23 09:02:36 -08:00