You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
After reading through Shopify/ruby-lsp#2181 I understand why yard will be skipped but what about parsing rdoc here in the ruby-lsp-rails addon? rdoc is used throughout rails. A good example of where this would be great is when looking at the hover documentation for ActiveRecord::ModelSchema::ClassMethods#table_name(please don't judge my actual use case here lol):
Unfortunately, the language server protocol specification only supports plain text and markdown, which is why RDoc documentation looks mangled and doesn't get properly rendered. The language server has no control over how it gets rendered.
The only way to have something like this work would be proposing a change to the specification to support RDoc as a possible format and then adding support for parsing RDoc in editors. However, that's very unlikely to happen since the spec tries to be programming language agnostic and RDoc is only used in Ruby - which is the reason why they went with Markdown, which is generally used by many programming languages. I doubt they would accept adding and maintaining a format that is specific to one language.
Generally, my understanding is that the RDoc format was created before Markdown existed. At this point, Markdown is much more wide spread and well known, so I think it would be beneficial for RDoc to default to Markdown instead of its own syntax.
In regards to the Rails documentations, we have proposed to the Rails team to migrate the documentation to Markdown syntax exactly for compatibility with language servers. My understanding is that they are looking into it.
After reading through Shopify/ruby-lsp#2181 I understand why yard will be skipped but what about parsing
rdoc
here in theruby-lsp-rails
addon?rdoc
is used throughout rails. A good example of where this would be great is when looking at the hover documentation forActiveRecord::ModelSchema::ClassMethods#table_name
(please don't judge my actual use case here lol):Compare this to how it's parsed at api.rubyonrails.org:
Correctly parsing this
rdoc
would, in my humble opinion, aid in readability.The text was updated successfully, but these errors were encountered: