Fangrui Song
e3a2f1a9a8
*.h -> *.hh
2019-10-24 18:37:54 -07:00
Fangrui Song
67eb1e6b23
Refactor message handler and namespace ccls
2019-10-24 18:37:53 -07:00
Fangrui Song
05929b8afb
Implement textDocument/documentLink
2019-10-24 18:37:35 -07:00
Fangrui Song
6de2789635
Implement textDocument/foldingRange
2019-10-24 18:37:35 -07:00
Fangrui Song
2180320540
Deprioritize completion items with additionTextEdits
2019-10-24 18:37:35 -07:00
Fangrui Song
65fc01c671
Fix textDocument/implementation
2019-10-24 18:37:35 -07:00
Fangrui Song
6ce79155a9
Add command line option -index=root to index without starting language server
2019-10-24 18:37:35 -07:00
Fangrui Song
610798f634
Improve extent of definition/declaration; uniquify typeDefinition
2019-10-24 18:37:35 -07:00
Fangrui Song
ca1edb582e
Simplify
2019-10-24 18:37:35 -07:00
Fangrui Song
556e611573
Add ExtentRef; merge symbol2refcnt and outline2refcnt
...
Fix hierarchical document symbol for namespaces when there are multiple declarations.
2019-10-24 18:37:35 -07:00
Fangrui Song
6deadc5f24
Add pipeline::{Notify,Reply,ReplyError} and simplify message handling
...
Delete method.{cc,h}
Rename $ccls/setSkippedRanges to $ccls/publishSkippedRanges
Rename $ccls/publishSemanticHighlighting to $ccls/publishSemanticHighlight; stableId -> id
2019-10-24 18:37:35 -07:00
Fangrui Song
8fea558f95
Misc changes to project
...
* Better LanguageId detection with clangDriver (e.g. .cu -> types::TY_CUDA)
* fallback when there is no .ccls or compile_commands.json
Also Hide clangTooling options from --help
2019-10-24 18:37:35 -07:00
Riatre Foo
5a442dfb53
Fix hierarchical document symbol
...
1. Fixed a bug on building document symbol tree: As sym2ds was updated in
place, nested funcs/types may be moved into children of another
lsDocumentSymbol before itself got processed.
2. Namespaces only have declarations, in the old implementation it wasn't included in the result, making the result less hierarchical. This
commit fixes this by including the declarations of a symbol if no
definitions found.
2019-10-24 18:37:35 -07:00
Fangrui Song
56c70ad1fd
Namespace: improve indexer and don't trace bases in $ccls/member
2019-10-24 18:37:35 -07:00
Riatre Foo
d98965d8d9
Fix additionalTextEdits -> textEdit hack for VS Code ( #89 )
...
* Fix additionalTextEdits -> textEdit hack for VS Code
Visual Studio Code filters the completion result according to
textEdit.range and filterText, if the textEdit.range overlaps with
existing text, we have to include it in filterText, otherwise it would
be filtered out.
* Fix has_open_paren in FilterCandidates
2019-10-24 18:37:35 -07:00
Fangrui Song
3bf5002c98
Support workspace folders
2019-10-24 18:37:35 -07:00
Fangrui Song
798cf7852d
Improve completion
...
blacklist some undesired candidates
additionalTextEdits if clang>=7
Use CodePatterns for preprocessor directive completion if there is a #
Prefer textEdit over insertText
2019-10-24 18:37:35 -07:00
Fangrui Song
53e6a15f34
Use DeclRef spell to represent Use spell + Use extent
2019-10-24 18:37:35 -07:00
Fangrui Song
fc4b5b00c0
Redesign SymbolRef, Ref, Use
...
Remove lsLocationEx
2019-10-24 18:37:35 -07:00
Fangrui Song
bb124b132e
Add completion.maxNum: 100
2019-10-24 18:37:35 -07:00
Fangrui Song
093abb89b5
Use pthread if defined(__unix__) || defined(__APPLE__)
2019-10-24 18:37:35 -07:00
Fangrui Song
d998861d2e
Add $ccls/info
2019-10-24 18:37:35 -07:00
Fangrui Song
bd8d065da9
Use non-inferred entries and build preamble for .h; index on didOpen if no pending requests; documentHighlight
2019-10-24 18:37:35 -07:00
Fangrui Song
2a0ba86675
Revamp codeLens & codeAction
...
b.ref: references of bases
d.ref: references of derived
when b.ref > 0, don't display 0 ref or x bases
2019-10-24 18:37:35 -07:00
Fangrui Song
c437b16ef7
Support textDocument/{formatting,onTypeFormatting,rangeFormatting}
2019-10-24 18:37:35 -07:00
Fangrui Song
0cc9160ef7
Merge textDocument_did{Change,Close,Open,Save}.cc
2019-10-24 18:37:35 -07:00
Fangrui Song
058ac08621
Simplify semantic highlighting; improve hover of auto &&
2019-10-24 18:37:35 -07:00
Fangrui Song
35cba6d49c
Remove clang_utils.*
2019-10-24 18:37:35 -07:00
Fangrui Song
395e9d8724
Misc
...
Move using below #include to make preamble happy
textDocument/references: if no references, first line or last line => list where this file is included
malloc_trim() only if files have been indexed in last cycle
Intern: use CachedHashStringRef
2019-10-24 18:37:35 -07:00
Riatre Foo
174466516e
Allow force disabling snippet via client.snippetSupport
2019-10-24 18:37:35 -07:00
Fangrui Song
dfdabe41b2
documentSymbol: ignore TypeParameter
...
Reported by Riatre
2019-10-24 18:37:35 -07:00
Riatre Foo
61a61dd4a2
Include macros in completion result
2019-10-24 18:37:35 -07:00
Fangrui Song
562207bf96
Add kind to $ccls/member and iterate all QueryType::def
...
kind:2 => member functions
kind:3 => nested classes / namespace members
2019-10-24 18:37:35 -07:00
Fangrui Song
4792ad845b
Publish diagnostics of inferred files and change diagnostics.{onChange,onOpen,onSave} from bool to debounce time
2019-10-24 18:37:35 -07:00
Riatre Foo
1a2e31660c
Remove chunks with CK_Information kind from insertText. ( #78 )
...
Without this ccls inserts "size() const" in the following scenario:
std::string text;
text.si| <-- Trigger completion here and pick "size"
2019-10-24 18:37:35 -07:00
Fangrui Song
056d6d8093
Delete file_consumer.*
2019-10-24 18:37:35 -07:00
Fangrui Song
b8259012e8
Simplify semantic highlighting
2019-10-24 18:37:35 -07:00
Fangrui Song
24a8b53813
intern args
2019-10-24 18:37:35 -07:00
Fangrui Song
b08e59e8e1
Simplify pipeline and fix race
2019-10-24 18:37:35 -07:00
Fangrui Song
9616e5a2fe
Add hierarchicalDocumentSymbolSupport
2019-10-24 18:37:35 -07:00
Fangrui Song
c446090657
Add clang.pathMappings to reuse cache files with differect source paths
...
Use `>` as the separator.
2019-10-24 18:37:34 -07:00
Fangrui Song
e9e5c7699d
Remove [spell.start, spell.end) -> [spell.start, extent.end) hack
2019-10-24 18:37:34 -07:00
Fangrui Song
fd20978b15
Skip informative scope foo::
2019-10-24 18:37:34 -07:00
Fangrui Song
5b6a72dac2
Rename hierarchies to $ccls/{call,inheritance,member}
...
bool flat = false; -> bool hierarchy = false; (set it to true to enable hierarchical view)
Delete $ccls/callers (which is what $ccls/call does now)
2019-10-24 18:37:34 -07:00
Fangrui Song
25fb7defc3
Better diagnostics
2019-10-24 18:37:34 -07:00
Fangrui Song
da019ea1cd
textDocument/documentSymbol
2019-10-24 18:37:34 -07:00
Fangrui Song
57d7d76ba0
Make $ccls/inheritanceHierarchy and textDocument/typeDefinition find declarations if definitions do not exist; spelling ranges of operator=
2019-10-24 18:37:34 -07:00
Fangrui Song
6aece8e063
pipeline improvement for files not having a project entry (e.g. .h)
2019-10-24 18:37:34 -07:00
Fangrui Song
5caf69056c
Make $ccls/reload reset DB and reload cached index files
...
$ccls/reload is renamed from $ccls/freshenIndex
This is useful when DB (merged index) diverges from backing IndexFile.
Also fix a semantic highlighting bug.
2019-10-24 18:37:34 -07:00
Fangrui Song
709a2654a8
diagnostics; use custom DenseMapInfo
2019-10-24 01:13:24 -07:00
Fangrui Song
11890fc3b1
Revamp completion and signatureHelp, set completion.detailedLabel: true and add completion.duplicateOptional
2019-10-24 01:13:24 -07:00
Fangrui Song
7149851ea2
Misc
2019-10-24 01:13:24 -07:00
Fangrui Song
e3a4e49ea6
Add diagnostics.onSave
2019-10-24 01:13:24 -07:00
Fangrui Song
0ae7d9d0a4
Reuse preamble (built by "comp-preload") in indexer
2019-10-24 01:13:24 -07:00
Fangrui Song
b8c0b5ad9e
Support empty cacheDirectory and fix cache load
2019-10-24 01:13:24 -07:00
Fangrui Song
c067f6edb2
Implement index.onChange: true; enable spell checking for diagnostics
2019-10-24 01:13:24 -07:00
Fangrui Song
142ff883e5
Remove $ccls/base and clean up; deduplicate codeLens
2019-10-24 01:13:24 -07:00
Fangrui Song
e28cd1733f
Improve hover and documentSymbol
2019-10-24 01:13:24 -07:00
Fangrui Song
597338abbd
Add $ccls/navigate and improve textDocument/definition
2019-10-24 01:13:24 -07:00
Fangrui Song
d22e6402d9
Add all: boolean to textDocument/documentSymbol
2019-10-24 01:13:24 -07:00
Fangrui Song
d3e0a4c4fd
Add index.multiVersion{Black,White}list
...
They allow files matching specified patterns to be indexed only once
even if index.multiVersion > 0. An example is to exclude system headers
with index.multiVersionBlacklist: ["^/usr/include"]
2019-10-24 01:13:24 -07:00
Fangrui Song
4f67bd03d5
index.multiVersion: int
...
Before, QueryFile::Def::{all_symbols,outline} were built by indexers.
Now, {symbol,outline}2refcnt are used instead, built by main thread.
*_removed are augmented with Query*:Def to allow removal of old {symbol,outline}2refcnt entries.
2019-10-24 01:13:24 -07:00
Fangrui Song
a8bb605d4a
Fix unaligned load/store; add index.multiVersion prototype, rename index.onParse to index.OnOpen
...
Don't call getFieldOffset() on RD->isInvalidDecl()
2019-10-24 01:13:24 -07:00
Fangrui Song
99fe7c7624
Uniquify $ccls/inheritanceHierarchy and add flat to $ccls/memberHierarchy
2019-10-24 01:01:21 -07:00
Fangrui Song
27a5b24b59
Add license notice
2019-10-24 01:01:21 -07:00
Fangrui Song
73e500bc97
textDocument/hover: prefer definitions in the same file
2019-10-24 01:01:21 -07:00
Fangrui Song
39787d2851
clang-format
...
DEF CON 26 CTF
2019-10-24 01:01:21 -07:00
Fangrui Song
7c1e3fc90e
Add flat to $ccls/inheritanceHierarchy
2019-10-24 01:01:21 -07:00
Fangrui Song
fc6e2af66f
Uniquify textDocument/references
...
There can be duplicates with template instantiation.
2019-10-24 01:01:21 -07:00
Fangrui Song
1c0bf0af65
Add textDocument/codeAction for clang FixIt
...
What do you think of the challenge ccls-fringe in Real World CTF?
2019-10-24 01:01:21 -07:00
Chao Shen
0dae2c4a39
Fix preload completion session.
2019-10-24 01:01:20 -07:00
Fangrui Song
3b997b12ad
Use ContainerDC for extent, index callees, set StaticMethod
2019-10-24 01:01:20 -07:00
Fangrui Song
c50f0c5900
Add Query*::file_id to allow textDocument/hover on declarations
...
Also change StorageClass storage to uint8_t
2019-10-24 01:01:20 -07:00
Fangrui Song
d13586ac4d
--init
2019-10-24 01:01:20 -07:00
Fangrui Song
b3d5ea8be5
Simplify
2019-10-24 01:01:20 -07:00
Fangrui Song
c4e22bde23
Use Clang C++ for completion and diagnostics
2019-10-24 01:01:20 -07:00
Fangrui Song
a4dd5d0c44
Use Sema/CodeCompleteConsumer
2019-10-24 01:01:20 -07:00
Fangrui Song
548f44dd79
Fix memberHierarchy
2019-10-24 01:01:20 -07:00
Fangrui Song
103aa711d3
First draft: replace libclang indexer with clangIndex
2019-10-24 00:53:16 -07:00
Fangrui Song
a94788b89f
textDocument/references: add excludeRole
2019-10-24 00:18:13 -07:00
Fangrui Song
b784685c61
diagnostics
2019-10-24 00:18:13 -07:00
Fangrui Song
2682964039
Rename message files (e.g. ccls_call_hierarchy.cc -> ccls_callHierarchy.cc)
2019-10-24 00:17:28 -07:00
Fangrui Song
9852e618cd
Add all to textDocument/documentSymbol
2019-10-24 00:17:28 -07:00
Fangrui Song
1830103ec6
Internalize strings & remove diagnostics_publisher.cc
2019-10-24 00:17:28 -07:00
Fangrui Song
732e002b13
Infer system include paths from CompilerInvocation
2019-10-24 00:17:28 -07:00
Fangrui Song
18fa5efa2a
Add Config->reparseForDependency
...
Specify 1 if for large projects you don't want to reparse dependents at load time when a common .h changes.
2019-10-24 00:17:28 -07:00
Fangrui Song
806a05b234
Add Config->largeFileSize; pure virtual or defaulted methods are definitions; fix $ccls/callHierarchy
2019-10-24 00:17:28 -07:00
Fangrui Song
f0559bba54
Remove Timer and PerformanceImportFile
2019-10-24 00:17:28 -07:00
Fangrui Song
34dc1e93e9
Remove WithFileContent & lex_utils.{cc,h}
2019-10-24 00:17:28 -07:00
Fangrui Song
da545f1139
$ccls/vars: differentiate local/field/parameter
2019-10-24 00:17:28 -07:00
Fangrui Song
bb08fdfa02
Remove $ccls/random; remove DB::symbols; decrease DB::entities grow rate
2019-10-24 00:17:25 -07:00
Fangrui Song
42bcf2b58f
$ccls/memberHierarchy: add field offset
2019-10-23 21:56:51 -07:00
Fangrui Song
a962061698
Simplify pipeline
2019-10-23 21:56:51 -07:00
Fangrui Song
cf0d16fa0c
Replace loguru with a custom logger
2019-10-23 21:56:51 -07:00
Fangrui Song
a6094ef714
Simplify; improve $ccls/inheritanceHierarchy
2019-10-23 21:56:51 -07:00
Fangrui Song
6d96d9dce2
textDocument/references: include base references by default
2019-10-23 21:56:51 -07:00
Fangrui Song
c279090ac5
cmake: link against zlib; use StringMap
2019-10-23 21:56:51 -07:00
Fangrui Song
36729818c3
experimental/filesystem -> LLVM/Support/FileSystem.h; sparsepp -> DenseMap
2019-10-23 21:56:51 -07:00
Fangrui Song
c81ca26a2e
Use llvm::cl and simplify main.cc import_pipeline.cc
2019-10-23 21:56:51 -07:00
Fangrui Song
c269876593
Use clang+llvm C++ in cmake; parse args with clang driver
2019-10-23 21:56:51 -07:00