castwide / vscode-solargraph

A Visual Studio Code extension for Solargraph.
Other
425 stars 23 forks source link

Solargraph only works in workspaces, not on individual files? #130

Closed adamroyjones closed 5 years ago

adamroyjones commented 5 years ago

I can get Solargraph to work on macOS, in vscode, provided that I've opened a folder in vscode.

However, if I open up a blank instance of vscode (code -n), open a new file, and set the language to Ruby, then the Solargraph server starts as expected but it doesn't do anything. (Changing the log level to debug illustrates this.)

Is this intentional, or a bug, or a limitation of vscode?

castwide commented 5 years ago

This is a known issue with files that don't have an .rb extension and/or haven't been saved to disk (#34). If you name the file and save it, it should start working.

adamroyjones commented 5 years ago

You're quite right—I'm sorry that I didn't see that issue when searching. Thanks for your help (and for making Solargraph)!