solargraph icon indicating copy to clipboard operation
solargraph copied to clipboard

Question about @option YARD tag support

Open nfedyashev opened this issue 3 years ago • 3 comments

I was wondering if solargraph/lsp supports autocompletion using @option YARD tags for hashes. Just trying to understand if it is something with my local setup or is it just missing in current implementation of solargraph?

https://www.rubydoc.info/gems/yard/file/docs/Tags.md#option

# @param [Hash] opts the options to create a message with.
# @option opts [String] :subject The subject
# @option opts [String] :from ('nobody') From address
# @option opts [String] :to Recipient email
# @option opts [String] :body ('') The email's body
def send_email(opts = {}) end

solargraph (0.40.4)

I'm not familiar with the internals of solargraph/LSP but this feature is very useful for writing Ruby code because there are tons of hashes with pre-defined options to complete.

Not sure about VS Code but RubyMine supports this feature.

nfedyashev avatar Apr 18 '21 17:04 nfedyashev

I was wondering the same thing. Neither the @option nor @raise tag appear to be recognized by Solargraph's Intellisense:

Component Type Version(s) Options
Solargraph Extension 0.21.1 useBundler: false
Solargraph Ruby Gem 0.40.4
YARD Ruby Gem 0.9.26
Rubocop Ruby Gem 1.12.0
VScode Application 1.55.2

LeShaunJ avatar Apr 20 '21 20:04 LeShaunJ

I was wondering the same thing. Neither the @option nor @raise tag appear to be recognized by Solargraph's Intellisense:

...

To be clear, I'm aware that the @raise tag is displayed when you click on the #<name> link in the Intellisense pop-up. However, it would still be nice to see it in that pop-up. Furthermore, the @option tag is still missing from both views, despite the latter seeming to be a more detailed look at the doc.

LeShaunJ avatar Apr 20 '21 20:04 LeShaunJ

@example doesn't appear to be recognized as well.

manafire avatar Oct 21 '22 23:10 manafire