1
0
mirror of https://github.com/danog/psalm.git synced 2024-11-27 04:45:20 +01:00

FileProvider: Consider file open if temp changes

The VS Code LSP client does not always send didOpen messages when a file
is being edited. This causes code completion requests to fail because the
completion request refers to files which are not 'open' according to
FileProvider.

This commit changes FileProvider so that a file is considered 'open' if it is
being modified, even if no didOpen message was received from the LSP
client.
This commit is contained in:
Josh Di Fabio 2019-05-17 11:48:05 +01:00 committed by Matthew Brown
parent 0f3385ce95
commit d37cddea27

View File

@ -89,7 +89,7 @@ class FileProvider
*/
public function isOpen(string $file_path)
{
return isset($this->open_files[strtolower($file_path)]);
return isset($this->temp_files[strtolower($file_path)]) || isset($this->open_files[strtolower($file_path)]);
}
/**