neild3r / vscode-php-docblocker

Simple docblocker for php
MIT License
94 stars 31 forks source link

Support single line docs #42

Open oojacoboo opened 7 years ago

oojacoboo commented 7 years ago

Example:

/** @var \Foo $foo */
protected $foo
neild3r commented 7 years ago

How would you propose we differentiate the people that want this feature vs the people who don't?

oojacoboo commented 7 years ago

Why would you not want that? I don't understand why anyone would type that and not want phpdoc "intellisense".

neild3r commented 7 years ago

Do you mean you want the tag snippets to work after a /**?

oojacoboo commented 7 years ago

yes, that's correct.

artrz commented 6 years ago

+1. Code intellisense extensions use this kind of docs to work. It would be so useful to have some sort of support for documenting vars.

wunc commented 6 years ago

How would you propose we differentiate the people that want this feature vs the people who don't?

@neild3r, The way this works in the popular Sublime docblocker plugin is that if the user hits Enter after the /** they get the long-style doc block, but if they hit Spacebar or Shift+Enter they instead get the inline-style variable doc block.

See https://github.com/spadgos/sublime-jsdocs#variable-documentation

oojacoboo commented 6 years ago

@wunc this is also how it works with IntelliJ.

neild3r commented 6 years ago

Annoyingly because the way this extension triggers the docblock using snippets I can't really do it like this. I think it will probably be easiest to just have a config option to turn it on.

neild3r commented 6 years ago

Also I will try to take a look at implementing this in the next few days or so

neild3r commented 5 years ago

Sorry I never progressed this one. I've had an extremely busy year and not had much time to put into this plugin. I'm going to spend a little time over the Christmas break trying to add some features and will include this as one of them.