Git Product home page Git Product logo

php-parameter-hint's People

Contributors

dependabot[bot] avatar dominicvonk avatar robertgr991 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

php-parameter-hint's Issues

Toggle or show parameter TYPE hint

I love seeing the variable names, but it would be even better to see the parameter TYPES printed out. PHPStorm has this feature:

/**
  * @param \Namespace\AccountInterface $account
  * @param string $username
  */
public function my_fun(AccountInterface $account, string $username) {...}

return my_fun({AccountInterface $account:} $theAccount, {string $username:} 'amaisano');

(the {brackets} illustrate the auto-inserted hints).

Command "PHP Parameter Hint: Hide / Show Hints" (some times) requires editor restart

VS Code "About" / Environment

  • Version: 1.62.2
  • Commit: 3a6960b964327f0e3882ce18fcebd07ed191b316
  • Date: 2021-11-11T20:51:30.084Z
  • Electron: 13.5.2
  • Chrome: 91.0.4472.164
  • Node.js: 14.16.0
  • V8: 9.1.269.39-electron.0
  • OS: Linux x64 5.4.0-90-generic

Description

When using the toggle command "PHP Parameter Hint: Hide / Show Hints" this seems to work always when the editor has been started with the parameter hints disabled and then using the command to enable them. Then a second later, the hints appear. Everything is fine.

The other way around, however, it does work but ONLY after restarting the editor. Waiting a few seconds didn't change anything.

Ideas

IMHO it would be cool, if either

  1. there is a practical way to achieve an immediate change both ways or
  2. if there is a way to require a restart such that the user is presented with a simple way to restart the editor (restart button) or simply presented with a notification that this command requires a restart of the editor.

I'm not very familiar with VS Code extension development, but I wouldn't be surprised if this is beyond the control of the extension. Can anyone verify this behavior and if so, what can we do about it?

is it possible to show the hints according to the method not the phpdoc ?

for example lets say u have something like

/**
 * @param array<int|string, BasePackage> $installedMap
 */
public function getPrettyString(RepositorySet $repositorySet, array $installedMap) { ... }

now the hint will be showing as

$this->someclass->getPrettyString([array] $x, [RepositorySet] $y)

which is incorrect.

Add more styling to hints

I'm used to dimmer font and background color, for example how it is implemented in a similar extension IntelliJ Parameter Hints.
Indeed, this extension is more powerful than the other one above. It provides more hints, for example in nested structures, where they are also more properly indented. It would be great if it was even more customizable.
Untitled

High CPU usage

Hi. I've noticed high CPU usage from VS Code using the extension while working with PHP files.

When I start VS Code without any PHP file open, the CPU usage is normal, almost 0% after cache CSS and JS, but when I open a PHP file from the project, the CPU usage goes to 50% and after the parameters are load it goes down to 30%. Closing the file and even reloading the window the CPU does not go down, only after I close VS Code completely and start again without any PHP file open.
I did the same process but with the extension disabled, and the CPU usage with the PHP file open was almost 0%.

Extesion enabled:
image

Extension disabled:
image

I tried to debug the JS performance with Running Extensions and start debugging, and noticed that the extension is in process all the time after opening the file and even after closing it.

image

I really like this extension, it's a great helper and I would not like to stop using it.

OS: Windows 10 Pro 64-bit
RAM: 16 GB
CPU: Intel Core i5-4590
VS Code version: 1.49.0
Node version: 12.14.1
PHP version: 7.3.12
PHP Parameter Hint version: 0.5.0

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.