Joe Hoyle
b8c4abf08b
Add ability to Go to Definition on Use statements ( #3805 )
...
This adds the ability to use the LSP's "Go to Definition" on `use MyClass` statements.
Co-authored-by: Matthew Brown <github@muglug.com>
2020-07-11 17:16:44 -04:00
Joe Hoyle
0b6d682964
Fix going to definition on return type ( #3806 )
...
* Fix going to definition on return type
If a return type of a method or function is set incorrectly (with the PHP doc), then the references are not added for the `function() : MyClass` symbol, so the "Go to definition" feature of the LSP won't work. I don't believe an invalid return type or not should stop the symbol location being tracked (and not allowing code navigation).
In moved the symbol location tracking to be before the return early short circuit.
* Update SymbolLookupTest.php
Co-authored-by: Matthew Brown <github@muglug.com>
2020-07-11 17:14:39 -04:00
Joe Hoyle
11af82a97f
Fix jumping to definition on nullable parameters ( #3804 )
...
Currently it's not possible to "Go to definition" (LSP) on nullable args like `function( ?MyClass )` as the reference is stored a `MyClass|null` in the reference map, which will now resolve to a class name.
This PR removed any nullable type from the union before adding it to the reference map (as the reference map is only use to indicate a symbol was used in a given location, I think this makes sense).
2020-07-11 17:12:03 -04:00
Joe Hoyle
d1ca68e57a
Fix offset calculation in getReferenceAtPosition ( #3783 )
...
* Fix calculation of getPositionFromOffse
* Add test for testGetSymbolPositionRange
* Fix code formatting.
2020-07-09 16:24:51 -04:00
Brown
370ffa28e4
Fix #3117 - invalidate all caches when composer lockfile changes
2020-04-12 11:41:37 -04:00
Matthew Brown
f94ab22a5f
Be better about strict inference
2020-03-25 09:18:49 -04:00
Matthew Brown
a5f79353ed
Fix #2157 - don’t merge closures and callable params
2019-09-22 00:58:30 -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
0e6bd79a09
Allow completion from functions to work without namespacing cc @iluuu1994
2019-07-18 21:50:59 -04:00
Matthew Brown
74e1b521a5
Add support for completing builtin class names
...
Fixes #1863
2019-07-17 22:50:57 -04:00
Matthew Brown
da42be175f
Apply PHPCS fixes
...
Fixes #1880
2019-07-05 16:27:53 -04:00
Matthew Brown
df3d7e1d2c
Make line endings mostly all the same
2019-07-03 16:58:27 -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
36e2ea6881
Fix #1822 - update use statements with classes
2019-06-30 11:12:50 -04:00
Matthew Brown
ca53019d6b
Simplify class completion lookup
...
Ref #1822
2019-06-29 21:32:26 -04:00
Ilija Tovilo
16768e363c
Jump between parens when autocompleting method with parameters ( #1839 )
2019-06-24 07:51:12 -04:00
Matthew Brown
766b1b0384
Add reference, not type
...
Ref #1835
2019-06-23 09:10:43 -04:00
Matthew Brown
37ffd6dad6
Fix #1832 - add references to docblock types
2019-06-23 08:47:49 -04:00
Matthew Brown
4735955829
Fix #1835 - move reference generation before argument analysis
2019-06-23 08:08:00 -04:00
Ilija Tovilo
caca3e52c9
Display function signature on multiple lines when it has parameters ( #1833 )
2019-06-22 13:07:56 -04:00
Brown
aa6677a177
Add autocompletion for some classes
...
Ref #1822
2019-06-21 17:10:35 -04:00
Brown
0ba535d179
Fix problem locating end of completion area
2019-06-12 13:43:35 -04:00
Brown
f700502b51
Add skipped completion test
2019-06-12 13:34:49 -04:00
Josh Di Fabio
3db32f2274
Enable LS completion when whitespace follows known type
...
This change enables completion when there is whitespace following
a known type and an object access operator, e.g.:
$foo
->bar()
->baz();
2019-06-12 09:17:50 -04:00
Matthew Brown
b5cbc84351
Fix #1617 - add option to only show errors in reports
2019-06-09 12:37:28 -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
Matthew Brown
e41733d789
Revert "Implement dots progress bar"
...
This reverts commit 0c5837b246
.
2019-05-27 13:05:06 -04:00
Matthew Brown
304ffeb0a3
Revert "Switch to VoidProgress by default"
...
This reverts commit 63b46be361
.
2019-05-27 13:04:38 -04:00
Ilija Tovilo
63b46be361
Switch to VoidProgress by default
2019-05-26 23:18:48 -04:00
Ilija Tovilo
0c5837b246
Implement dots progress bar
2019-05-26 23:18:48 -04:00
Ilija Tovilo
042070d0fd
Implement better progress
2019-05-26 23:18:48 -04:00
Brown
963d5bb901
Fix #1656 - allow chained call completion
2019-05-17 12:38:29 -04:00
Brown
a1c9ad501b
Fix #1654 - understand templated completions
2019-05-17 12:11:27 -04:00
Brown
0bd4dbcbc4
Bump to PHP 7.1
...
Fixes #1650
2019-05-16 18:36:36 -04:00
Brown
ff14f671b1
Add hopefully-more-portable method for evaluating method/property usage
2019-04-16 16:07:48 -04:00
Matthew Brown
c772914910
Add some formatting
2019-03-23 14:27:54 -04:00
Bruce Weirdan
3a2c457d87
More tests fixed
2019-03-02 08:43:19 -05:00
Bruce Weirdan
ec85096c96
Fixed identified issues
2019-03-02 08:43:19 -05:00
Matthew Brown
3ad1abece4
Add generation of json artifacts
2019-02-24 01:33:25 -05:00
Matthew Brown
a6755cc523
Fix default test versions to 7.3
2019-02-07 15:27:43 -05:00
Matthew Brown
214fd7d461
Add DuplicateFunction issue
...
Fixes #49
2019-01-06 16:40:44 -05:00
Brown
2d22db4cb7
Clear up use of reloadFiles
2019-01-02 12:10:52 -05:00
Matthew Brown
fd0ab47b80
Fix #1118 - detect possible issues with unions of mixed
2018-12-08 13:18:55 -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
Brown
46cbd0de8d
Add phpunit psalm plugin
2018-11-14 13:19:38 -05:00
Brown
110ca66692
Namespace test providers under Internal cc @TysonAndre
2018-11-12 11:20:59 -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
Brown
f2c013e45f
Improve API for setting temporary file contents
2018-11-09 10:42:55 -05:00
Brown
00b51627cc
Fix tests
2018-10-26 16:29:16 -04:00
Brown
e286089eaa
Add onchange events and symbol lookup with disabled completion
2018-10-26 16:17:15 -04:00