Fangrui Song
eeda2882f3
Set SymbolKind::File
2019-10-14 00:50:22 -07:00
Fangrui Song
6a488bfbf4
Fix some clang-tidy warnings
...
Incorporated some fixes by Daniel Chabrowski (#467 )
2019-10-10 19:43:47 -07:00
Fangrui Song
d61bf578f3
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-09 21:53:37 -07:00
Fangrui Song
4711fd36a3
completion: don't reuse cache if the buffer line has changed
...
Fix emacs-ccls#54
2019-09-26 23:34:03 -07:00
Fangrui Song
ff4ee614b9
project: strip -Xclang <arg>
2019-09-23 23:21:55 -07:00
Fangrui Song
3865a09447
indexer: disable warnings and skip processed function bodies
...
Adapt clang rC370337: removal of createIndexingAction and WrappingIndexAction
2019-09-23 22:48:42 -07:00
Fangrui Song
edc73ceb10
indexer: llvm::sys::fs::UniqueID -> clang::FileID
...
Fix a minor issue that an empty included file is not recorded.
Note, we need to skip invalid uid2lid_and_path because
otherwise lid2path may contain invalid entries with lid: 0,
which will cause the file entry with file_id 0 to have an empty path.
2019-09-23 22:48:12 -07:00
Fangrui Song
b804a04380
💥 Rename FunctionName -> functionName, VarName -> var_name
2019-09-23 22:24:18 -07:00
Fangrui Song
459091af4f
textDocument/definition: don't jump to the type definition
2019-08-22 02:24:20 -07:00
Fangrui Song
03263c8521
project: allow absolute compilationDatabaseDirectory
...
Fix #466
2019-08-16 19:34:22 -07:00
Shengjing Zhu
9079c48c77
Support override CLANG_RESOURCE_DIR
...
The result from clang commandline is something like
/usr/lib/llvm-7/lib/clang/7.0.1
Which means I need to recompile when the clang is upgraded to newer 7.x.x
However the system has a convenient symlink, which is
/usr/include/clang/7.
2019-08-16 08:23:15 +08:00
Fangrui Song
8b0332173f
Construct SourceManager with UserFilesAreVolatile
...
Fix #235 . Close #453
In clang, it may be worth generalizing UserFilesAreVolatile (introduced in rC160074) to FilesAreVolatile.
2019-07-31 19:29:34 -07:00
Fangrui Song
af72b59d88
project: improve ComputeGuessScore heuristics
2019-07-22 06:51:18 -07:00
Fangrui Song
cdc24e9731
Support indexing non-existent files in index.onChange:true mode
2019-07-20 17:33:50 -07:00
Fangrui Song
0e8c9db44d
$ccls/fileInfo: optionally dump dependencies, includes and skipped_ranges
2019-07-20 02:59:59 -07:00
Riatre Foo
eb752497e8
Change RequestId::value from int to std::string to allow non-numeric IDs.
2019-07-16 14:39:35 +08:00
Dan Čermák
990925d806
Only add include directories for LLVM, clang & rapidjson if they are not in CMAKE_CXX_IMPLICIT_INCLUDE_DIRECTORIES
...
/usr/include/c++/9 comes before /usr/include in `{clang,gcc} -v -fsyntax-only -xc++ /dev/null`.
target_include_directories(ccls SYSTEM PRIVATE ${RapidJSON_INCLUDE_DIRS})
If ${RapidJSON_INCLUDE_DIRS} resolves to /usr/include, /usr/include will
be shuffled before /usr/include/c++/9 and will cause `#include_next <stdlib.h>`
issues (see https://github.com/MaskRay/ccls/pull/417 ).
Check if the include directories are already in CMAKE_CXX_IMPLICIT_INCLUDE_DIRECTORIES.
2019-06-30 23:45:57 -07:00
Fangrui Song
796c75794e
project: support %cu directive and strip -M* options
2019-06-30 23:45:56 -07:00
Fangrui Song
cc7e0dde33
pipeline: report changed arg
2019-06-27 03:24:25 -07:00
Fangrui Song
cf997dc680
Adapt rL364464: clang::FrontendAction::Execute returns llvm::Error instead of bool
2019-06-27 03:24:20 -07:00
TÖRÖK Attila
9f25474e73
threaded_queue.hh: fix -Wpessimizing-move ( #409 )
2019-06-18 14:45:20 +08:00
Fangrui Song
f54fac0303
utils.hh: work around MSVC STL bug
2019-06-17 23:42:48 -07:00
Fangrui Song
d3808de26a
Set Diag::concerned if any of its Notes is concerned
2019-05-13 00:26:55 -07:00
Fangrui Song
b059ea3262
Adapt llvm rL360179: Option may have multiple OptionCategory's
2019-05-13 00:26:55 -07:00
Fangrui Song
6624108fd9
Refactor FindEntry and use best-fit .ccls
...
Fixes an issue with hierarchical .ccls found by Riatre in #384
2019-05-13 00:26:55 -07:00
Fangrui Song
16bd93b24b
JsonWriter: write "null" if VersionedTextDocumentIdentifier.version is null
...
Fix #387
2019-05-13 00:26:55 -07:00
Riatre Foo
9e884fca80
Append '/' before populating folder.dot_ccls
2019-05-13 00:26:55 -07:00
Fangrui Song
b2f32788d3
Adapt clang rC358696: removal of OutputIsBinary
2019-05-13 00:26:55 -07:00
Fangrui Song
2e6aed4408
Set declarationProvider
2019-05-13 00:26:55 -07:00
Fangrui Song
99930623ef
Set RetainCommentsFromSystemHeaders to true
...
Note with -fretain-comments-from-system-headers, the .gch of bits/stdc++.h becomes larger by 1%, but that is fine.
And improve comment handling in textDocument/hover
Fix #373
2019-05-13 00:26:55 -07:00
Fangrui Song
b69f62c2bc
Set RetainRemappedFileBuffers to true
...
Reported by David Welch in #350 .
This fixes double-free of llvm::MemoryBuffer when parsing fails.
2019-05-13 00:26:55 -07:00
Fangrui Song
aded3faf97
Add error checking of object deserialization; ignore non-object initializationOptions
2019-05-13 00:26:55 -07:00
Fangrui Song
a41b976a77
Adapt clang rC357037: removal of setVirtualFileSystem
2019-05-13 00:26:55 -07:00
Fangrui Song
0846c12e89
Add initialization option index.initialNoLinkage: false
...
By default, the background indexer doesn't handle names of no linkage.
They are indexed when their files are opened. This saves memory and
makes cache files smaller.
2019-05-13 00:26:55 -07:00
Paul Smith
2c11b0dc47
Enhance the output of --version with Git describe results. ( #342 )
2019-05-13 00:26:55 -07:00
Fangrui Song
f3cfdb2781
clang.pathMappings: use >
instead of :
as the separator
2019-05-13 00:26:55 -07:00
Fangrui Song
4276c2b383
Change containers of Query*::Def fields from std::vector to ccls::Vec
...
Query*::Def contain several immutable std::vector fields. Change them to
ccls::Vec to save bytes which were wasted by `capacity`.
2019-05-13 00:26:55 -07:00
Fangrui Song
a0e76254de
Add initialization option index.name.suppressUnwrittenScope (default: false)
2019-05-13 00:26:55 -07:00
Fangrui Song
4e10504a6d
If the workspace folder is a symlink, convert paths relative to it ( #314 )
...
If the workspace folder is a symlink and the client doesn't follow it.
Treat /tmp/symlink/ as canonical and convert every /tmp/real/ path to
/tmp/symlink/.
2019-05-13 00:26:55 -07:00
Fangrui Song
977e14c862
cmake: use {LLVM,Clang}Config.cmake
...
Combined Daan De Meyer's #227 with other simplification
* USE_SHARED_LLVM is deleted in favor of LLVM_LINK_LLVM_DYLIB
* LLVM_ENABLE_RTTI is deleted as it is provided by LLVMConfig.cmake
* Only direct Clang/LLVM dependencies are required in target_link_libraries
* Restrict -DCLANG_RESOURCE_DIRECTORY= to src/utils.cc
2019-05-13 00:26:55 -07:00
Fangrui Song
b8e0fe9812
Add excludeRole to documentSymbol and override declaration's range/selectionRange with definition's
2019-05-13 00:26:55 -07:00
Fangrui Song
e73f5791bf
cmake: add option to use system rapidjson if exists
2019-05-13 00:26:55 -07:00
Fangrui Song
ba68f49861
Misc
2019-05-13 00:26:55 -07:00
Fangrui Song
7e752c1901
Make clang.excludeArgs accept glob patterns
2019-05-13 00:26:55 -07:00
Fangrui Song
cff00a8711
stdin: synthesize an "exit" NotificationMessage in abnormal termination
2019-05-13 00:26:55 -07:00
Fangrui Song
401f057027
textDocument/rename: mitigate edits in the same place and edits in macro replacement
...
Mitigate edits in the same place (#294 ) and:
// textDocument/rename on `f`
void f();
void g() { m(); } // incorrectly rewrote m() before
2019-05-13 00:26:55 -07:00
Fangrui Song
887535b8fb
Add .github/ISSUE_TEMPLATE
...
Adapted from https://github.com/hlissner/doom-emacs
2019-05-13 00:26:55 -07:00
Fangrui Song
05658ef966
working_files: normalize \r\n and \n to \n
...
Clients may normalize end-of-line sequences, thus cause a mismatch
between index_lines and buffer_lines.
Thanks to CXuesong for reporting this issue!
2019-05-13 00:26:55 -07:00
Fangrui Song
c4ab72500b
Change Pos::line from int16_t to uint16_t
...
This allows representing line 0 ~ 65535.
2019-05-13 00:26:55 -07:00
Fangrui Song
43774f2c11
Make hover more detailed (e.g. include inheritance info)
2019-05-13 00:26:55 -07:00