Open Aerilius opened 7 years ago
Have a look at solargraph: https://github.com/castwide/solargraph
It does this - uses YARD to power it's code-insight and auto-complete. You see it in action in editor extensions like for VSCode: https://github.com/castwide/vscode-solargraph
Example project setup for VSCode using Solargraph and the SketchUp Ruby API stubs: https://github.com/SketchUp/sketchup-extension-vscode-project
I have considered it.
It would multiply the size of this extension and require starting and properly shutting down the language server as a separate background process. It would be interesting to look into how to integrate it with information about live references in SketchUp's Ruby ObjectSpace.
It would be cool, but the effort is probably rather worth it if more people actually used it / knew about it. Currently, Ruby Console+ seems not to be the/a tool mentioned in education.
It would be interesting to look into how to integrate it with information about live references in SketchUp's Ruby ObjectSpace.
In my experience ObjectSpace
can be slow. I used it once in code that ran in a validation proc and it caused SketchUp to consume 100% of that CPU (while still being responsive though.)
Currently, Ruby Console+ seems not to be the/a tool mentioned in education.
I got plans to mention it in a developer blog article at some point. Want to focus more on educating extension developers about all the tools out there. This one has some unique features I want to highlight. (All too often I write small scripts to visualize data - only to remember that Console+ does have some of it already.)
Currently we rely for type inference on return types extracted from yardoc documentation. These extracts (in the apis directory) also contain description and parameter information to generate documentation tooltips.
.yardoc
.DocProvider.get_info_for_doc_path(doc_path)
could be replaced byYARD::Registry.at(doc_path)