1

When I am writing php code, I often create a comment before a function. This comment also includes the comments for a parameter. Like this:

/**
* This function finds cheese.
* @param $mix is the number of cheese variants
*
*/
function findCheese($mix) {
   // do stuff cheese related
}

However, when I use coc-hover (which brings up the function definition), it shows me my comments AND automatically added param comments which just say mixed @param. I want to remove all these generic definitions from the popup function definition.

I do not believe this is a bug. But I cannot find anything, anywhere on where vim draws this information from and how to change the contents of the popup box.

Note: "inlayHint.enable": false doesn't accomplish this for me.

1 Answer 1

1

After playing with some more, I have discovered that you can achieve this by adding the variable type after @param.

For example:

/**
* This function finds cheese.
* @param string $mix is the number of cheese variants
*
*/

Notice i added string after @param.

Now, the definition box only has my defined info

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.