1
0
Fork 0
Commit Graph

32 Commits (41e84880b380368ae5862c01e9a00d55067c48ec)

Author SHA1 Message Date
Vincent Klaiber 3d8655d504 Update phpunit config (#488)
* Update phpunit config

* Rename DocumentHighlight class
2017-10-02 13:37:28 -07:00
Felix Becker fc0bf4c163 Fix workspace/xreferences (#424)
* Make Descriptors minimal

SymbolDescriptor and PackageDescriptor should only contain the minumum amount of properties needed

* Add missing use

* Fixes

* Ignore ReferenceInformation->symbol
2017-06-22 20:06:10 +02:00
Sara Itani 7f427a1215 Adopt Microsoft/tolerant-php-parser (#357) 2017-06-09 20:25:30 +02:00
Stephan Unverwerth 08cf1a3fd7 Allow getting type from define() node (#363)
* Allow getting type from define() node
- fixes #364

* Add test case for DefinitionResolver
2017-04-24 11:11:40 +02:00
Jens Hausdorf b1cc7bf6b0 Support constants with define() (#347) 2017-04-17 17:03:08 +02:00
Jens Hausdorf de6aed608c Show constructors and destructors with right symbol (#346) 2017-04-09 19:44:28 +02:00
Sara Itani 0de7ba8335 Ensure diagnostics are cleared on file deletion (#319)
* Ensure diagnostics are cleared on file deletion
Previously, error diagnostics would not be cleared when a file was deleted while it was closed. This would result in lingering errors in the problems view that could only be cleared by reloading the language server. This fix addresses the issue by adding support for workspace/didChangeWatchedFiles and automatically clearing diagnostics for deleted files.

* add FileEvent constructor
2017-03-01 11:18:37 +01:00
Felix Becker bedd157636 Caching (#260) 2017-02-04 00:20:38 +01:00
Felix Becker 106aa24b5d Implement global references protocol extension (#236) 2017-01-10 17:08:52 -08:00
Felix Becker 2005518dfe Support find-all-references for namespaces (#221) 2016-12-17 03:46:08 +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
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 1e7260a2ea Cache index on disk (#82) 2016-10-20 03:48:30 +02:00
Felix Becker 9cbca1cd7f Revert "Use SymbolKind::FIELD for class fields (#78)"
This reverts commit 2980941fd1.
2016-10-20 01:53:07 +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 6b6ec8c105 Symbol test refactor (#92)
* Don't use json_decode in symbol tests

* Remove custom setUp()

* Use getDefinitionLocation()

* TextDocumentTestCase -> ServerTestCase

* Refactor Workspace\SymbolTest
2016-10-18 23:09:51 +02:00
Michal Niewrzal cba4357856 Fix file name for CompletionItemKind (#85) 2016-10-17 10:17:18 +02:00
Felix Becker 2980941fd1 Use SymbolKind::FIELD for class fields (#78) 2016-10-14 09:02:42 +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
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 7322a6c658 Add fromNode() factories and correct columns 2016-10-09 15:58:39 +02:00
Felix Becker 827ab4c842 Add Position::compare() and Range::includes() 2016-10-09 15:51:42 +02:00
Felix Becker aa6b729336 Remove unneeded files 2016-09-06 13:00:23 +02:00
Felix Becker db28e22378 Publish errors as diagnostics, improve tests 2016-09-02 21:13:30 +02:00
Felix Becker 0c96597fdf Remove Params / Request / Response classes 2016-08-25 15:28:39 +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 3b02010097 Update 2016-08-22 22:43:33 +02:00
Felix Becker 64e496fac9 Update 2016-08-22 17:32:31 +02:00