castwide / solargraph

A Ruby language server.
https://solargraph.org
MIT License
1.89k stars 158 forks source link

Unable to locate yard docs for a Gem #694

Closed KonnorRogers closed 11 months ago

KonnorRogers commented 11 months ago

Hi there! I made a gem called custom_elements_manifest_parser.

I have solargraph all setup in my project, but for some reason I don't get any intellisense for my gem, but I get intellisense for other gems I have installed.

when I do yard server --gems I can see all yardoc types there for my gem.

I'm kinda stumped and not sure where to start troubleshooting. It's clearly an issue with my gem. I just don't know what. I tried adding the following to my *.gemspec

spec.metadata["yard.run"] = "yri"

and that didn't do anything. Any guidance would be appreciated, and happy to provide a reproduction as well if needed.

It appears to be picking up the Gem because when I comment out the require I can at least get a hover, but it only shows my namespace and CustomElementsManifestParser::Version, is there a guide for gem publishing with yardoc?

https://github.com/castwide/solargraph/assets/26425882/7107da12-6e58-4ee4-9e4b-d623fa4c8704

KonnorRogers commented 11 months ago

Reproduction:

https://github.com/KonnorRogers/solargraph-repro

KonnorRogers commented 11 months ago

Just to further update:

require "custom_elements_manifest_parser/lib/custom_elements_manifest_parser"
# ^ gets auto completion

require "custom_elements_manifest_parser"
# ^ does not get auto completion