castwide / vscode-solargraph

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

Don't steal focus for OUTPUT window on error #111

Open nathancarmona opened 5 years ago

nathancarmona commented 5 years ago

Anytime Solargraph fails to load a file in the background, I'm notified in the output window which is horrible frustrating if I'm working in the terminal window at the same time. Not only does it steal focus when it fails to load a file, it tries to load the file several times over the next couple minutes stealing focus every time. I propose that either solargraph.logLevel support an 'OFF' level or a solargraph.notifyOnError flag be added that would set RevealOutputChannelOn to Never in the LanguageClientOptions.

Example error in case any it helps: "[Error - 1:33:54 PM] Request textDocument/hover failed. Message: [Solargraph::FileNotFoundError] ApiMap did not catalog /somepath/somefile.rb Code: -32603 "

castwide commented 5 years ago

I'm pretty sure I'm going to disable the option to reveal the output channel altogether. Logging should send its output to the console and nothing else. I don't think it's useful for the language server to steal focus for any error less severe than a crash.