Closed mylemans closed 3 years ago
Well apparently you created an issue for the length thing exactly when I made this issue.. I'd say for my comment remarks, continue at #178
What are the odds.. ;D
Hi.
I'm not sure this <pre>
thingie can be easily supported. Currently plugin expects such dead simple format:
@param array $varName = validPhpExpression()
To make the format support html tags, I would have to mess with escaping entities and other inconvenient stuff, and I'm so lazy...
With pre it looks much cleaner
Do you have some plugin that makes html content in phpdoc render nicely or are you using some tool that generates documentation pages from the comments? I don't see any difference when adding <pre>
in my 2020.3.3
phpstorm...
Example:
My plugins:
Does this make it more clear?
Yeah, thanks, did not realize at once that you were adding this <pre>
for ctrl+q popup.
How about such compromise? =-D
Or even:
I'd call that a hacky workaround (2nd option is much cleaner though), but usable for now, but I'd rather see a correct solution.
That said, with this workaround, you could say that turning this into a low prio todo is defendable.
I'm actually considering closing the issue, as the second option seems more "correct" to me than @param $var <pre>= [...]</pre>
. Either way it's a preference thing, but to support your initially proposed format, I'd have to complicate the codebase and spend a considerable amount of time I'm most likely not going to have following few years, while // <pre>
already works and it does not have extra leading space in the preview.
I rather have a clean solution in the future, but I'd say, close it for now. While I have your attention, can you do multiline comments? Apparently you can do them for psalm style doc, but I cannot get it to work in the way I shown in my example (ie // on the next line without anything in there)
If you think this could be a bug or missing feature, tell me and I could create another issue.
By multiline comments, do you mean this?
(
//
on the right continued on next line)
Filed the issue: https://github.com/klesun/deep-assoc-completion/issues/180
P.S. Since I have your blessing, I'm closing this issue with clear conscience ^_^
This works:
@param array $optionsss = ['a' => '']
This doesn't:
@param array $options <pre>= ['a' => '']</pre>
With pre it looks much cleaner when describing a complex array but when I use it the plugin does not process it.
In addition, the reason I was looking at 'pre' was because there seems to be a length limit on 'per field comment' shown (in my tests this was 103 characters)
Either improvements/fixes would be sufficient for my needs.