1
0
Fork 0
Commit Graph

22 Commits (14a6d658326c90066cd7c42bbe8fafc31cc13a96)

Author SHA1 Message Date
Cameron Eagans 5d2ab8f369 Add test for #211 (#270) 2017-02-15 17:25:06 +01:00
Felix Becker a4a13e6528 Add support for inherited members (#218)
in completion, definition, references, hover etc
2016-12-16 01:40:17 +01:00
Felix Becker b8a113ddd0 Correct reference collection for New_ nodes
Closes #202
2016-12-13 02:40:51 +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 33211c68ca Resolve expressions recursively (#155)
* Add Definition class
* Add recursive DefinitionResolver
* Cache hover
2016-11-18 15:22:24 +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
Michal Niewrzal 867196babf Definition for instanceof class (#117) 2016-10-26 20:56:02 +02:00
Michal Niewrzal 8a354ba1af Definition for use function (#116) 2016-10-26 11:47:02 +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
Michal Niewrzal a19d225a7a Fix definition for method return type (#76) 2016-10-21 16:51:11 +02:00
Felix Becker e19670c141 Resolve self, static, parent (#99) 2016-10-20 00:18:36 +02:00
Felix Becker 6bd1b10e4d Resolve $this (#98) 2016-10-20 00:10:47 +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 6fe01183b0 References (#52)
* Adds support for textDocument/references
* Adds tests for global definitions and global fallback
2016-10-12 01:45:15 +02:00
Kaloyan Raev 1f808c59e1 Fixes #59: Handle correctly negative endLine in PHP Parser errors (#62)
* Fixes #59: Handle correctly negative endLine in PHP Parser errors

* Clearer $startLine calculation

* Add missing test file

* Better calculation of endLine

* Remove trailing spaces
2016-10-11 10:15:20 +02:00
Michal Niewrzal e75c1592fc Use PHP_CodeSniffer as a formatter (#35)
Also adds uriTopath util function
2016-10-10 15:06:02 +02:00
Felix Becker d4757e0a24 Add textDocument/definition support 2016-10-09 15:58:39 +02:00
Felix Becker 658a27f5a5 Add more symbols to symbol test
* constants
* static properties
* static methods
2016-10-08 15:02:04 +02:00
Felix Becker 9fd9a02e19 Change fixtures naming convention 2016-09-30 11:38:46 +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