castwide / solargraph

A Ruby language server.
https://solargraph.org
MIT License
1.89k stars 158 forks source link

Diagnostics seem not working #655

Open Dicridon opened 1 year ago

Dicridon commented 1 year ago

Hi Solargraph team,

I'm trying to establish a Ruby environment in Emacs, so I'm using Eglot, Flymake, and Solargraph, as suggested in this repo and Eglot repo.

However, while Solargraph can offer completion information to Eglot, it does not report any diagnostics to Eglot (I see no diagnostics in Eglot's event buffer).

Example

The following code has syntax errors, but I see that Solargraph reports no diagnostics to Eglot.

class A
nd

a = A.new

I first doubted that maybe Eglot was not correctly set up, so I used a C++ code snippet to test Eglot. The following C++ code will cause Eglot to show a diagnostic message in its event buffer. However, the Ruby code above causes Eglot to produce no diagnostics in its event buffer; hence, Eglot reports no syntax errors.

#include "missing_file"

The Ruby syntax error, however, can be successfully detected by Flymake. Thus I guess maybe I'm not setting up Solargraph correctly (I have no configuration files). I also notice that the demo https://solargraph.org/demo gives no diagnostics either.

Environment

Solargraph version: 0.49.0 RuboCop version: 1.50.2 Emacs version: 27.1 OS: WSL with Ubuntu 18.04 Eglot version: 20210611.2249 Ruby: 3.0.0