Closed casouri closed 1 year ago
I'm using lspce on Linux and it shows errors about these two new
here.
Unfortunately I don't have a Mac so I can't do any test.
Did other functions (such as completing and jumping to definition work on your Mac?
FYI. After opening src/bonjour.rs
and enabling lspce-mode in that buffer, I waited about 2 minutes before lspce could display errors, during that time, cargo was working ( to fetch dependencies ? ).
Waiting doesn't seem to change anything. But this time I see the log file! Looking at it, it seems rust-analyzer isn't sending any error reports:
2023-02-24 15:46:40.058 - stdio read {
"method": "textDocument/publishDiagnostics",
"params": {
"diagnostics": [],
"uri": "file:///Users/yuan/p/ccbc/src/bonjour.rs",
"version": 0
}
}
Could this be due to the initialize options lspce pre-configured for rust-analyzer? Because I don't have any configuration for rust-analyzer on Eglot.
Full log: lspce.log
Could this be due to the initialize options lspce pre-configured for rust-analyzer?
You used the default initializationOptions (I mean lspce-ra-initializationOptions
) right? If so, I'm not sure that's the reason, because I use it too.
what's your flymake configuration? Also you can edit that file and see whether diagnostics appear.
Below is mine:
(setq flymake-no-changes-timeout 2)
(setq flymake-start-on-flymake-mode nil)
(add-hook 'flymake-mode-hook
(lambda () (run-with-idle-timer 2 t #'flymake-start)))
Maybe you can redifine lspce-ra-initializationOptions
to an empty function and try again.
(defun lspce-ra-initializationOptions ()
(let ((options (make-hash-table :test #'equal)))
options))
Thank you for your patience. I redefined lspce-ra-initializationOptions
but the initialize request doesn't seem to change. And there is still no diagnostic. Evaluating (lspce-ra-initializationOptions)
does return an empty hash table.
Maybe lspce has some wired buy on Mac, but I cannot do anything ATM. Sorry. I guess eglot is a better option for you now.
Probably something going on with Mac. Anyway, thanks for your time!
I'm using lspce on a Rust project and I noticed that sometimes lspce doesn't display errors like eglot does. I'm not exactly sure what could be the problem, so any guidance on debugging this is appreciated!
If I enable eglot in the buffer, it shows some errors like this:
Notice the squiggly lines at two
new
's and the info tooltip at the first line. On the other hand, lspce doesn't seem to show anything.flymake-mode
is enabled, and I do see error reporting other times, just not in this case.I tried to look at the log but despite enabling logging, I don't see a log file. (This might be due to me using lspce on Mac.)
Here is my relevant config:
If you have time, you can try reproducing this by cloning https://git.sr.ht/~casouri/ccbc, branch
lspce-test
, and the file shown in the screenshot issrc/bonjour.rs
.