psalm / psalm-vscode-plugin

VS Code plugin for Psalm
MIT License
44 stars 14 forks source link

Ability to disable tooltips/ctrl+click definitions #190

Closed austinried closed 2 years ago

austinried commented 2 years ago

I'm using this extension in combination with PHP Intellisense (https://github.com/zobo/vscode-php-intellisense) because I really like the static analysis (especially type hints/rules) that I can get from psalm, but also I want the good auto-complete suggestions I get from PHP Intellisense.

My problem is that both of these extensions seem to be adding tooltips when hovering over functions/classes/etc, and I'm also getting duplicate definitions, so whenever I ctrl+click something I have to choose between two of the same definitions before it will actually jump to the line/file of the definition.

Is there a way to disable those from this extension so I don't have duplicates?

(Also, just to be clear, I don't want to disable the tooltip that comes up to help with function arguments, as that one is not duplicated.)

tm1000 commented 2 years ago

I've already done the work for this in my fork of Psalm (which will be submitted to Psalm proper at some point in the future).

See: https://github.com/tm1000/psalm/blob/feature/upgrade-lsp/src/Psalm/Internal/Cli/LanguageServer.php

The option would be --enable-provide-hover=false

austinried commented 2 years ago

Great to hear, I see there are some additional options I'd be interested in there as well. Hopefully that can get merged in soon, but I may look into running your branch in the meantime if that's viable.

Is there any other work that would need to be done in the extension to enable those options, or would they just be available through the command line args setting for the language server?

tm1000 commented 2 years ago

You can run that branch it's running 4.22 as of last week and my team currently uses it. You'll want to "force" the version of psalm through the extension and yes for now you'll need to set the options through the cli settings. I'll be putting those options into the extension once the changes get merged and it gets published