* 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
* 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
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.