Commit Graph

1935 Commits

Author SHA1 Message Date
Felipe Lema
dc9ba782aa remove surrounding braces on single-if-statements 2021-06-23 12:32:57 -04:00
Felipe Lema
20ef17c0a7 clang-format file 2021-06-23 12:29:54 -04:00
Felipe Lema
b07d39b949 remove using per github review 2021-06-23 12:29:28 -04:00
Felipe Lema
03324a122e correct usage of "empty (list) of params"
lsp-mode was complaining that generated json was not properly parsed
2021-06-22 15:25:30 -04:00
Felipe Lema
000fd75af4 remove another unnecessary abstraction per gh review 2021-06-18 17:02:09 -04:00
Felipe Lema
5e2ea98cb0 remove absctractions per github review 2021-06-18 16:19:21 -04:00
Felipe Lema
c9f36a342d remove $ccls/publishSemanticHighlight 2021-06-18 15:09:14 -04:00
Felipe Lema
79c0beedcd omit copyright year per review 2021-06-17 13:37:28 -04:00
Felipe Lema
1ff4931f2a comply with github review comments 2021-06-16 18:04:16 -04:00
Felipe Lema
de89baedd3 use different container per gh review 2021-06-16 18:03:24 -04:00
Felipe Lema
e702d33e48 indent fix 2021-05-28 13:22:29 -04:00
Felipe Lema
ab53802497 use SemanticTokensWithId internally
- Move SemanticTokens to QueryFile
- Add SemanticTokensId (though still returning SemanticTokens)
- Save latest SemanticTokensId in QueryFile (latest semantic token sent
is associated to a file)
2021-05-28 13:22:11 -04:00
Felipe Lema
16d7ef6aa8 use symbols that "intersect", rather than "begin" within range 2021-05-10 15:41:37 -04:00
Felipe Lema
700c1ffa58 fix debug build 2021-05-03 12:51:16 -04:00
Felipe Lema
84a00f6371 textDocument/semanticTokens/range
- add overhead code for new method
- move code from "semantic tokens for full document" to
  "semantic tokens for range in document"
- add range delimitation to function
- make "full document" use "range that covers all document"
2021-05-03 12:51:04 -04:00
Felipe Lema
661870a502 fix compilation 2021-04-12 14:47:48 -04:00
Felipe Lema
c9860305f0 fix type 2021-04-12 14:47:33 -04:00
Felipe Lema
554833abf2 handle TODOs, imprve readbility 2021-04-12 14:33:19 -04:00
Felipe Lema
ca51f9eb4a use tuple for lexicographical comparison 2021-04-12 14:32:54 -04:00
Felipe Lema
a4de46b9a0 name types for (trace|read)ability 2021-04-12 14:31:45 -04:00
Jan Lahoda
013b655e4c Removing unnecessary include. 2020-12-26 22:29:31 +01:00
Jan Lahoda
503ac951c0 First attempt to include the semantic highlight feature, introduced in specification 3.16.0. 2020-12-25 11:22:07 +01:00
Fangrui Song
4c66fdf09d Resolve "directory" in compile_commands.json in case CWD is not the project root
Also delete an unneeded chdir hack.

Close #703
2020-12-19 21:42:21 -08:00
Fangrui Song
feb153a843 Adapt llvmorg-12-init-11522-g4c55c3b66de: change ComputePreambleBounds 2020-11-18 22:33:04 -08:00
Fangrui Song
68d6e4122d project: fix initial directory list for recursive .ccls
Fix #717
2020-11-06 18:55:01 -08:00
Fangrui Song
a3c5d4a1eb Adapt llvmorg-12-init-5498-g257b29715bb: add an argument to the ctor of clang::driver::Driver 2020-09-23 16:06:49 -07:00
Fangrui Song
20a9f7b5f4 clang_tu: set RecoveryAST & RecoveryASTType 2020-08-30 10:21:58 -07:00
Fangrui Song
55c0d5b4eb project: override the compdb entry with .ccls if compile_commands.json is not used
Note: `exact_match` should be false if the entry is an synthetic one, instead
of an explicit entry in compile_commands.json
2020-08-26 11:36:55 -07:00
Fangrui Song
aa4d2d1b43 If clang >= 10, don't crash on #pragma clang __debug 2020-08-22 10:29:39 -07:00
Fangrui Song
125915e254 Adapt llvmorg-12-init-946-g10b1b4a231a: add find_package(ZLIB) 2020-07-25 08:30:18 -07:00
Fangrui Song
ca95f48a53 Support workspaces as symlinks and symlinks within a workspace
Fix #639
2020-07-19 17:03:16 -07:00
Fangrui Song
5108cfafcb Report index status via $/progress
Add WorkDoneProgress to represent WorkDoneProgressBegin/WorkDoneProgressReport/WorkDoneProgressEnd.
2020-07-04 10:05:26 -07:00
Ernest Borowski
468258d641 cmake: Fix rapidJSON version detection 2020-06-29 22:46:00 -07:00
Fangrui Song
6244594d71 indexer: log the number of errors and the first diagnostic
Example log:

```
15:47:45 indexer1         pipeline.cc:379 I parse /tmp/d/a.c error:1 use of undeclared identifier 'arg'
 clang /tmp/d/a.c --gcc-toolchain=/usr -working-directory=/tmp/d/
```
2020-06-28 17:16:35 -07:00
Fangrui Song
8cf8a3c4a4 Disable PCH reading/writing 2020-06-14 23:16:13 -07:00
Victor Sui
7a05f1ed06 cmake: Fail loudly when found rapidjson is too old (#646)
When the rapidjson found by cmake is an older version it defines a
variable RAPIDJSON_INCLUDE_DIRS instead of RapidJSON_INCLUDE_DIRS (#455).
According to #383 we do not want to make these older version work with
ccls. However currently if the rapidjson found by cmake is an older
version that defined RAPIDJSON_INCLUDE_DIRS, then the cmake invocation
still succeeds but any build command will fail because
RapidJSON_INCLUDE_DIRS was never set properly. This makes the cmake
invocation fail with a relevant error message in this event.
2020-06-14 23:15:48 -07:00
Ludovic Jozeau
c5acf62060 indexer: set the kind of static data members to Field instead of Var
Otherwise it is impossible to distinguish a static variable from a
static member variable.

Close #593
2020-04-22 09:08:20 -07:00
Fangrui Song
de800ebb70 sema_manager: report diagnostics in macro expansions
Fix #608
2020-04-19 11:27:57 -07:00
Fangrui Song
c10642d29b Delete ci/ and use .gitignore whitelist 2020-03-22 09:50:48 -07:00
Evan Klitzke
386f714f5e Set indexer threads' priority to ThreadPriority::Background (#538) 2019-12-02 19:20:39 -08:00
Fangrui Song
6c87a4656c project: decrease score if .c is matched against .hh (#549) 2019-12-22 10:06:34 -08:00
akocis
e373f9ed97 position: support line numbers larger than INT16_MAX (but <= UINT16_MAX) (#553) 2019-12-27 20:56:50 +01:00
Jan Lahoda
a2ecd9a8f0 textDocument/documentSymbol: support unopened files (#548) 2019-12-22 09:26:23 +01:00
xVan Turing
06a04d5102 indexer: add name for anonymous Enum 2019-11-16 05:42:51 +08:00
Felicián Németh
760f5e57ff initialize: implement serverInfo (LSP 3.15.0)
Return serverInfo for an initialize request. This helps clients to
identify ccls even when they just connect to a TCP port and allows them
to easily implement server specific functionalities like $ccls/navigate.
2019-11-11 10:19:24 +01:00
Fangrui Song
0a1e08a8ca indexer: fix getAdjustedDecl for explicit instantiations; fix incorrect short_offset_size=1 when name is empty
Fix #516
2019-11-09 13:27:09 -08:00
Fangrui Song
7e795e9b9e cmake: support CLANG_LINK_CLANG_DYLIB 2019-11-01 10:36:38 -07:00
Fangrui Song
0fe8a16504 Infer -target and --driver-mode from argv[0]
Fix #511
2019-10-31 22:31:03 -07:00
Fangrui Song
5935db10fd Fix some clang-tidy warnings
Incorporated some fixes by Daniel Chabrowski (#467)
2019-10-10 19:24:44 -07:00
Fangrui Song
2bffff7b0b Add initialization option completion.placeholder; change client.snippetSupport: false to drop ( and <
* client.snippetSupport: false => `foo`
* client.snippetSupport: true
  + completion.placeholder: false => `foo($1)$0` `bar<$1>()$0`
  + completion.placeholder: true => `foo(${1:int a}, ${2:int b})$0` `bar<${1:typename T}>()$0`

Note, client.snippetSupport is always false if the client does not support snippets.

Close #412
2019-10-06 23:54:45 -07:00