1
0
Fork 0
Commit Graph

39 Commits (34d3d2030dabc29bd919d0ea795bcb8d994228de)

Author SHA1 Message Date
Felix Becker 96aa998486 Make Index an EventEmitter (#255) 2017-01-25 01:38:11 +01:00
Felix Becker d080c161a9 Don't crash if indexing fails 2017-01-13 12:06:58 -08:00
Felix Becker 106aa24b5d Implement global references protocol extension (#236) 2017-01-10 17:08:52 -08:00
Felix Becker 49245fd4d3 Allow overriding (#229)
* Add missing documentLoader property

* Make PhpDocumentLoader->contentRetriever public
2017-01-04 19:18:14 -08:00
Felix Becker d7fc9e0425 Index twice to collect dynamic references (#206) 2016-12-13 02:11:29 +01:00
Felix Becker a7d77d844e Add Index classes and stubs (#214) 2016-12-13 01:51:02 +01:00
Felix Becker b9f9871156 Files finder (#209) 2016-12-08 02:33:48 +01:00
Felix Becker 10fb3c92e0 Completion (#165)
* Add support for method/property completion

* Move completion fixtures into directory

* Add support for variable suggestions

Refactor logic into CompletionProvider class

* Allow getTypeFromNode() to take Variable nodes

* Use property and constant values

* Fix using @var tag for variables

* Improve completion

* classes
* variables with prefix filtering

* Make FQNs more distinct

* use -> for instance methods/properties
* use ::$ for static properties

* Add tests for static access

* Properly filter completion on empty property

* Fix existing tests

* Add support for static access without prefix

* Fix testFullyQualifiedClass

* Add missing fixtures

* Correct file number in init test

* Only insert backslash if not typed yet

* Completion for keywords and bug fixes

* Correct variable insertion

* Support completion for namespaces

* Use CompletionList

* Always set isIncomplete to true

* Update PHPCodeSniffer

* Remove unused method

* And the call

* Handle case where FQN could not be resolved
2016-11-30 22:23:51 +01:00
Felix Becker f56b14438b Shutdown when the socket is closed (#191) 2016-11-30 21:10:05 +01:00
Michal Niewrzal e8ab8aa2b8 Make processId optional for initialization (#178) 2016-11-23 18:38:57 +01:00
Felix Becker 12df6a7dd6 Add size limit back (#161) 2016-11-18 13:24:26 +01:00
Felix Becker 32b01afa90 Index files serially again (#157) 2016-11-17 22:20:37 +01:00
Felix Becker 03bbf5f4ba Enable LS to operate without accessing the file system (#136)
This PR decouples the LS from direct file system access by implementing the proposals for workspace/files and textDocument/content under workspace/xfiles and textDocument/xcontent. The requests are only used when the client expressed support for them through ClientCapabilities, otherwise direct FS access is used.
This turns document content retrieval and recursive file search into async operations.
In turn, all server handlers can now operate async by returning a promise.
2016-11-14 10:25:44 +01:00
Felix Becker 25f300c157 Add test for indexing 2016-11-07 11:52:24 +01:00
Felix Becker 04ef6c8adf Handle Client responses (#128) 2016-10-31 11:47:21 +01:00
Felix Becker ed41df0062 Remove caching for now (#118) 2016-10-26 21:35:57 +02:00
ADmad 5ecab683eb Linting (#107)
* Update travis config.
* Add phpcs config file.
* Exclude rules
* Ignore failures in tests
* Automatic fixes
* Inline ParsingMode enum as class constants
* Loosen FormatTest because of excluded rule
2016-10-24 19:35:37 +02:00
Felix Becker b16674d394 Improve logging 2016-10-20 16:46:34 +02:00
Felix Becker b9222b0fd1 Switch to serialize() instead of JSON (#104) 2016-10-20 04:31:07 +02:00
Felix Becker 1e7260a2ea Cache index on disk (#82) 2016-10-20 03:48:30 +02:00
Felix Becker 8e36e59e9a Fix crash 2016-10-20 03:36:17 +02:00
Felix Becker 953a8023b7 Update AdvancedJsonRpc (#103) 2016-10-20 03:31:12 +02:00
Felix Becker 7668a0c695 Catch parse error in indexing (#83) 2016-10-19 12:41:53 +02:00
Felix Becker 4db7ffd88c Hover (#50)
* Add hover support

* Use context in DocBlockParser

* Improve DocBlockParser error handling

* Improve hover output

* Add more tests
2016-10-19 12:31:32 +02:00
Felix Becker 1e6917ef55 Add size limit of 0.5MB for indexing (#80) 2016-10-14 09:06:56 +02:00
Felix Becker 6fe01183b0 References (#52)
* Adds support for textDocument/references
* Adds tests for global definitions and global fallback
2016-10-12 01:45:15 +02:00
Felix Becker 15e004fb9b Only hold AST for open files in memory (#63)
* Only hold content for open files in memory

* Add test for didClose

* Remove invalid URI formatting test

* Don't keep AST in memory

* Fix symbol search crash

* Change Project map to FQN => URI

Removes PhpDocument::load(), isLoaded(), unload()

* Add docblocks

* Rename some functions

* Extend documentation

* Correct docblock
2016-10-11 14:42:56 +02:00
Felix Becker d4757e0a24 Add textDocument/definition support 2016-10-09 15:58:39 +02:00
Felix Becker 6917f1c789 Add more declare(strict_types = 1) (#39) 2016-09-30 11:54:49 +02:00
Stephan Unverwerth 501d26e1d4 Global symbol search (#31)
* Implemented workspace symbol search

* Fixed missing TextEdit using declaration

* Fixed generating uri when parsing next file.

* Cleaned up code. Fixed tests

* Fixed PHPDoc for LanguageServer::initialize()

* Moved utility functions to utils.php

* Added tests for pathToUri and findFilesRecursive

* Added command line argument for socket communication

* Fixed local variable detection and containerName generation in SymbolFinder

* Fixed formatting in ProtocolStreamReader

* Store text content in PHPDocument, removed stmts, regenerate on demand

* Fixed local variable detection and containerName generation in SymbolFinder.

* Added Tests for Project and Workspace

* Added test for didChange event

* Modified lexer error handling

* Removed file that shouldn't have been committed.

* Updated sabre/event dependency to 4.0.0

* Updated readme.md to show tcp option

* make input stream non-blocking

* Correct code style

* Use triple equals

* Revert change in SymbolFinder

* Optimize processFile() a bit

* Use MessageType enum instead of number literal

* Add missing space

* Fixed ProtocolStreamWriter for nonblocking connection.

* Suppress fwrite() notice when not all bytes could be written.

* Fix another code style issue

* Throw Exceotion instead of Error

* Added ProtocolStreamWriter test

* Correct workspace/symbol documentation

* Improve exception in ProtocolStreamWriter::write()
2016-09-30 11:30:08 +02:00
Michal Niewrzal 6169998b92 Support document formatting (#10) 2016-09-06 12:54:34 +02:00
Felix Becker db28e22378 Publish errors as diagnostics, improve tests 2016-09-02 21:13:30 +02:00
Felix Becker 41ad025fe7 Update 2016-08-25 15:27:14 +02:00
Felix Becker 138b529df1 Update 2016-08-23 11:21:37 +02:00
Felix Becker 4d2b223a96 Update 2016-08-22 23:48:20 +02:00
Felix Becker 535dc9efda Remove ParsingMode Enum from LanguageServer 2016-08-22 23:02:39 +02:00
Felix Becker 3b02010097 Update 2016-08-22 22:43:33 +02:00
Felix Becker 64e496fac9 Update 2016-08-22 17:32:31 +02:00
Felix Becker 89a688b778 Add LanguageServer class 2016-08-12 10:25:03 +02:00