Commit Graph

1779 Commits

Author SHA1 Message Date
Fangrui Song
aaa5008ec6 Fix some MSVC 2017 errors
Thanks to Dso Tsin!
2019-11-09 20:09:13 -08:00
Fangrui Song
d398e071dc If clang >= 8, delete search path detection and use Sema::CodeCompleteIncludedFile 2019-11-09 20:09:13 -08:00
Fangrui Song
444f0db1f2 Work around relative --sysroot= 2019-11-09 20:09:13 -08:00
Fangrui Song
02a6f39559 Improve semantic highlight in templates 2019-11-09 20:09:13 -08:00
Fangrui Song
09669fff76 Reduce MAKE_REFLECT_STRUCT in lsp.hh
Position -> Pos; lsPosition -> Position
2019-11-09 20:09:13 -08:00
Fangrui Song
0d4f4b68c0 Remove ls prefix from many LSP interfaces
Rename SymbolKind to Kind & lsSymbolKind to SymbolKind
Use textDocumentSync: TextDocumentSyncOptions
2019-11-09 20:09:13 -08:00
Fangrui Song
9a6851c6a5 Misc 2019-11-09 20:09:13 -08:00
Fangrui Song
353b398a73 Simplify and work around vscode _sortTextLow 2019-11-09 20:09:13 -08:00
Fangrui Song
857f41c247 project.cc: deduplicate more cases 2019-11-09 20:09:13 -08:00
Fangrui Song
c598f3ebbd Fix EnumConstantDecl's kind & EnumDecl's vars 2019-11-09 20:09:13 -08:00
Fangrui Song
c8e57ee7b3 textDocument/references workspace/symbol: add folders
For textDocument/reference, base/excludeRole/role has been lifted from params.context.* to params.*
2019-11-09 20:09:13 -08:00
Fangrui Song
c4bf9c5d6a Report InvalidParams for serialization error 2019-11-09 20:09:13 -08:00
Fangrui Song
c1422c7a8d Simplify and better compatibility with encodings retaining the feature of low bytes being 1-byte characters 2019-11-09 20:09:13 -08:00
Fangrui Song
bbce333042 *.h -> *.hh 2019-11-09 20:09:13 -08:00
Fangrui Song
3cd0ee2fc7 Refactor message handler and namespace ccls 2019-11-09 20:09:11 -08:00
Fangrui Song
8fa853c321 Implement textDocument/documentLink 2019-11-09 20:03:28 -08:00
Fangrui Song
617cdd89de Implement textDocument/foldingRange 2019-11-09 20:03:28 -08:00
David F
f6472061d3 Fix broken link in README.md (#101) 2019-11-09 20:03:28 -08:00
Fangrui Song
4f8889c195 Deprioritize completion items with additionTextEdits 2019-11-09 20:03:28 -08:00
Fangrui Song
dc20ea3b33 Fix textDocument/implementation 2019-11-09 20:03:28 -08:00
Fangrui Song
66bf514b5f Add command line option -index=root to index without starting language server 2019-11-09 20:03:28 -08:00
Fangrui Song
a56b6fb228 Improve DeducedType 2019-11-09 20:03:28 -08:00
Fangrui Song
18b47d3f5c Improve extent of definition/declaration; uniquify typeDefinition 2019-11-09 20:03:28 -08:00
Fangrui Song
46cfd5504a Simplify 2019-11-09 20:03:28 -08:00
Fangrui Song
5fbe4eac83 Add ExtentRef; merge symbol2refcnt and outline2refcnt
Fix hierarchical document symbol for namespaces when there are multiple declarations.
2019-11-09 20:03:28 -08:00
Fangrui Song
bc4dc6720b 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-11-09 20:03:28 -08:00
Fangrui Song
4a1eea75db 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-11-09 20:03:28 -08:00
Fangrui Song
40b47f9ca3 Adapt trunk change and write comments to PCH 2019-11-09 20:03:28 -08:00
Fangrui Song
f9cf7854fa -DSYSTEM_CLANG=off: 6.0.1 -> 7.0.0 2019-11-09 20:03:28 -08:00
Riatre Foo
ec71d4c6c0 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-11-09 20:03:28 -08:00
Fangrui Song
82deedf8c3 Add namespace alias clang::vfs = llvm::vfs to adapt D52783
vfs::x should be written as llvm::vfs::x to work around a [namepace.udir] bug before GCC 8 when namespace alias is used
2019-11-09 20:03:28 -08:00
Fangrui Song
7b19c87485 Namespace: improve indexer and don't trace bases in $ccls/member 2019-11-09 20:03:28 -08:00
Riatre Foo
3de62168c8 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-11-09 20:03:28 -08:00
Fangrui Song
49dd0ed558 Support workspace folders 2019-11-09 20:03:28 -08:00
Fangrui Song
e352604ee4 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-11-09 20:03:28 -08:00
Fangrui Song
a920e71711 Clean and update tests after Index* refactoring 2019-11-09 20:03:28 -08:00
Fangrui Song
2864f2c647 Use DeclRef spell to represent Use spell + Use extent 2019-11-09 20:03:28 -08:00
Fangrui Song
08b09bc1da Redesign SymbolRef, Ref, Use
Remove lsLocationEx
2019-11-09 20:03:28 -08:00
Fangrui Song
0c5c3a11be Add completion.maxNum: 100 2019-11-09 20:03:28 -08:00
Fangrui Song
8b2565fcd0 For $ccls/member, use unadjusted RecordDecl (if there is forward declaration) and handle ClassTemplateSpecialization 2019-11-09 20:03:28 -08:00
Fangrui Song
2592dd41dd Add PreambleStatCache 2019-11-09 20:03:28 -08:00
Fangrui Song
31314555bb Use pthread if defined(__unix__) || defined(__APPLE__) 2019-11-09 20:03:28 -08:00
firstlove
9a79b2ece1 regard conversion as method instead of constructor 2019-11-09 20:03:28 -08:00
Fangrui Song
3337d3de8c Add $ccls/info 2019-11-09 20:03:28 -08:00
Fangrui Song
3c332b91de Clean 2019-11-09 20:03:28 -08:00
Fangrui Song
fa2234c894 Use non-inferred entries and build preamble for .h; index on didOpen if no pending requests; documentHighlight 2019-11-09 20:03:28 -08:00
Fangrui Song
083a629f90 Rename some initialization options
* Delete index.enabled which can be achieved with index.blacklist: ['.']
* Move completion.include* to completion.include.*
* move largeFileSize to highlight.largeFileSize
2019-11-09 20:03:28 -08:00
Fangrui Song
8d61b1aadb 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-11-09 20:03:28 -08:00
Fangrui Song
153e5c0dcc Construct SourceManager with UserFilesAreVolatile
Prettify pipeline
2019-11-09 20:03:28 -08:00
Fangrui Song
7eacd2664f Support textDocument/{formatting,onTypeFormatting,rangeFormatting} 2019-11-09 20:03:26 -08:00