1
0
mirror of https://github.com/danog/psalm.git synced 2024-12-12 17:27:28 +01:00
Commit Graph

39 Commits

Author SHA1 Message Date
Matthew Brown
6ea68e9f7f Clean up more unused @psalm-suppress annotations 2019-08-18 16:59:56 -04:00
Tyson Andre
5d5a9c6eac Remove redundant casts and unused use statements (#1955)
* Remove redundant casts

(not sure about older versions of php-parser)

* Remove unused use statements
2019-07-18 23:37:36 -04:00
Matthew Brown
8d63d5dc4e Add lookup for builtin functions 2019-07-18 23:30:44 -04:00
Matthew Brown
5583ae842e Refactor signature selection a little 2019-07-18 23:08:54 -04:00
Matthew Brown
da42be175f Apply PHPCS fixes
Fixes #1880
2019-07-05 16:27:53 -04:00
Brown
5c76b3c82d Fix #1888 - add go-to-variable 2019-07-01 18:48:33 -04:00
Ilija Tovilo
67c3726254 Implement signature help - closes #1841 (#1862)
* Implement signature help - closes #1841

* Add explicit signature count

* [LSP] Do analysis for every signatureHelp request

See here: https://github.com/vimeo/psalm/pull/1862#issuecomment-507007346

* Don’t language server information when checking property for init

* Fix signature help for functions

* Add try-catch around signature help Functions::getStorage()
2019-07-01 15:54:32 -04:00
Matthew Brown
ca53019d6b Simplify class completion lookup
Ref #1822
2019-06-29 21:32:26 -04:00
LeSuisse
f29826b958 Fully qualify constants and function calls (#1849)
This should give a small performance boost.
Part of #1837.

The change is enforced via phpcs and can be autofixed
with phpcbf.
2019-06-26 16:52:29 -04:00
Brown
aa6677a177 Add autocompletion for some classes
Ref #1822
2019-06-21 17:10:35 -04:00
Brown
844442e039 Fix #1780 - set open file contents on save 2019-06-13 15:25:55 -04:00
Josh Di Fabio
78a9d1aa9b Ensure any queued file analyses are done before completion
Language Server
---------------

When typing quickly, the LSP client can send multiple messages
in a group, including didChange messages followed by completion
messages. Currently, LanguageServer::doAnalysis() is only called
after a message group is processed. This can result in completion
being done with outdated file contents for example:

Message group with two messages is received
  1. `didChange`: file analysis is queued for modified file
  2. `completion`: completion attempted on stale file contents
  3. `messageGroupRead`: analysis is done, but too late for completion

This commit ensures that any queued file analyses are done prior
to serving completion requests.
2019-06-13 09:04:52 -04:00
Ilija Tovilo
5a14e4b1cf Progress bar (#1709)
* Revert "Revert "Implement better progress""

This reverts commit 4302596654.

* Revert "Revert "Implement dots progress bar""

This reverts commit e41733d789.

* Revert "Revert "Switch to VoidProgress by default""

This reverts commit 304ffeb0a3.

* Revert "Revert "Pass success flag to progress""

This reverts commit 62a690ee4e.

* Improve socket communication

* Use an underscore

* Add means to disable progress

* Add extra newline before progress bar
2019-05-30 10:30:41 -04:00
Matthew Brown
4302596654 Revert "Implement better progress"
This reverts commit 042070d0fd.
2019-05-27 13:07:02 -04:00
Ilija Tovilo
042070d0fd Implement better progress 2019-05-26 23:18:48 -04:00
Brown
a1c9ad501b Fix #1654 - understand templated completions 2019-05-17 12:11:27 -04:00
Brown
4a434d9a2f Add separate issue for undefined classes in docblocks 2019-05-15 18:41:26 -04:00
Brown
33d4888228 Fix #1618 - conditionally enable autocompletion for methods and properties 2019-05-09 11:20:13 -04:00
Brown
751253ddf0 Fix #1603 - prevent invalid covariant template classes from being passed 2019-05-06 16:38:08 -04:00
Tyson Andre
2e6a2f14ed Fix typos in psalm with codespell's dictionary 2019-03-24 23:01:20 -04:00
Matthew Brown
cdae79b9fe Fix unnecessary params in Psalm codebase 2019-02-23 11:31:33 -05:00
Bruce Weirdan
8408effe57 Dropped unused uses 2019-02-17 13:17:45 -05:00
Matthew Brown
c758678022 Fix remaining issues 2019-02-06 16:08:41 -05:00
Matthew Brown
e7d73c3ff2 Fix generator ref 2019-02-06 16:08:41 -05:00
Aaron Piotrowski
e6fcb79392 Update ProtocolStreamReader 2019-02-06 16:08:41 -05:00
Matthew Brown
7249539fc6 Add a few return types and improve formatting 2019-02-06 16:08:41 -05:00
Aaron Piotrowski
b0d97843ce Update Amp usage
Fixed a few errors and used byte-stream for reading and writing.
2019-02-06 16:08:41 -05:00
Matthew Brown
263a4c8cf1 Use Amp for handling language server event loop 2019-02-06 16:08:41 -05:00
Matthew Brown
37aef674a1 Remove unused library 2019-01-15 22:17:45 -05:00
Brown
7855683271 Convert @return Promise<...> to @psalm-return Promise<...> 2018-12-14 10:27:39 -05:00
Matthew Brown
b052e211a0 Improve internal typing for sabre/event promises 2018-12-10 23:18:53 -05:00
Matthew Brown
b32000fa05 Fix #689 - add checks for @internal annotations 2018-12-01 18:37:49 -05:00
Brown
b5f0159cdf Add backup hover analysis when file isn’t analysed 2018-11-20 16:32:40 -05:00
Brown
ca602f8e17 Fix language server crash after editing trait method names 2018-11-20 15:51:47 -05:00
Matthew Brown
59b9b5d65b Move more classes into Internal namespace 2018-11-18 12:41:47 -05:00
Matthew Brown
37dedee7b6 Fix memory leak issues and disable garbage collection 2018-11-18 11:39:14 -05:00
Matthew Brown
c2e546facb Fix #531
Well, it’s basically fixed already, but this adds @TysonAndre’s suggestions (and some of the relevant implementation from Phan)
2018-11-17 18:01:27 -05:00
Matthew Brown
4d79b61e93 Change _checker to _analyzer 2018-11-12 11:20:59 -05:00
Matthew Brown
4688b25fd9 Move internal classes to own namespace 2018-11-12 11:20:59 -05:00