Using VSCode, solargraph unable to format any of my files. This exception given:
[Error - 7:16:13 PM] Request textDocument/formatting failed.
Message: [NameError] uninitialized constant Solargraph::LanguageServer::Message::TextDocument::Formatting::Shellwords
Code: -32603
I'm not able to reproduce this error, but I can see a likely reason why. The Formatting message class uses Shellwords but does not explicitly require it. If some other process that uses Shellwords has already executed, it's fine. If not, formatting fails.
The obvious solution is to require 'shellwords' with the Formatting class. It doesn't make a difference in my setup, but it doesn't hurt anything either. It's pushed to master. Let me know if that works for you.
Fixed here.
Thank you!
Released in v0.30.0.
@castwide, I got the same error on 0.30.0. (release not master)
0.30.1 fixed.