I just noticed that documentation popup in vscode shows the arguments in the wrong order.
This just threw me for a loop.
Is there anyway to fix this? @thomthom
I just noticed that documentation popup in vscode shows the arguments in the wrong order.
This just threw me for a loop.
Is there anyway to fix this? @thomthom
Looking at the API stubs repo, and at this method, it’s parameters are in the correct order.
Have you downloaded the most recently published stub files ?
…
The stubs aren’t the problem. Actually I noticed it in one of my own methods first.
In fact pressing Ctrl while hovering shows the def preview with the parameters in correct order.
Also Ctrl+Clicking the method shows the stub is correct.
Well it should be that the stubs are the only way that an IDE editor knows an API’s methods and parameters.
If it cant be the stubs, then it must then be an error in the VS Code Ruby plugin. Have you checked the VS Code forums for reports of similar errors ?
Must be a bug in either Solargraph or VSCode.
This is the only thing that turned up in my search, and I couldn’t tell if it was related.
I’m not seeing that re-ordering:
This is certainly an issue with Solargraph or VSCode.
What version of the Solargraph VSCode extension and gem do you have?
Also, I’m currently trying to figure out why YRI doesn’t always generate the YRI database for the stubs. I think it might relate to using Bundler instead of gem install
. Look into why stubs are not always available to Solargraph · Issue #76 · SketchUp/ruby-api-stubs (github.com)
Could be worth to try to run yard gems sketchup-api-stubs
to explicitly re-generate the YRI database.
I’m using v0.21.1 according to VS Code
If I run gem server, it reports two versions installed.
I ran that but it didn’t seem to do anything.
Latest gem for the stubs are 0.7.6. But I don’t think that will matter.
I’d recommend you open an issue with the Ruby Solargraph repo: castwide/vscode-solargraph: A Visual Studio Code extension for Solargraph. (github.com)
Now I really botched things up. I can’t even get solargraph to run.
I uninstalled ruby, and vscode, but I noticed that all my settings persisted. I probably have some settings wrong. I have this problem of just changing a bunch of settings without actually knowing what I’m doing.
Whew that was frustrating!! I figured out that my original problem was that I didn’t have the stubs setup right. I copied the stubs into my repository so solargraph was finding them that way.
Fortunately I finally have things right!
You no longer have the stubs copied into your project folder, right?
That’s right, but some of my own methods still have the parameters in the wrong order. I’ve decided to live with it.
That is strange. Very strange. I’d report that to the solargraph project. The maintainer is usually pretty responsive.
Ok we’ll see if they have any answers.
You were definitely right about that!!
https://github.com/castwide/vscode-solargraph/issues/211
The fix will be published in gem version 0.40.4 later this week.