Closed nikomatsakis closed 4 years ago
Yeah I have to remove flycheck finally. I wanted to wait until I have something that also works with rust-analyzer, in case somebody is actually using the flycheck related code in rustic(that's actually mostly the code from flycheck-rust. I will remove it completely the next days and replace it with updated code if I have something that works.
For anybody who is curious, or even better motivated to help me =) -> https://github.com/emacs-lsp/lsp-mode/pull/1179 lsp-mode currently isn't working with rust-analyzer and flycheck(it is for rls).
@brotzeit any tips how I could remove flycheck in the meantime as a workaround?
Oh, sorry. This should work:
(require 'rustic)
(remove-hook 'rustic-mode-hook 'flycheck-mode)
I just noticed that I forgot to turn off flymake in my config. Maybe you also have flymake activated ? I don't know if flycheck is the reason for the lags you are experiencing, but it's also possible that it is related to some other package(s).
I'm not even sure what flymake is :)
but it does seem to be enabled, or at least it appears in the mode line
@brotzeit how do I remove flymake mode?
You can't, it's a builtin mode.
@brotzeit ok but there must be some way to make it stop executing? I added (flymake-mode 0)
into my rustic hook, but that doesn't seem to do the trick. I can't quite figure out why it is even starting in the first place.
Ah, I think eglot is starting it.
Yeah, I think this was turned on because eglot works better with flymake(the author of eglot is also the maintainer of flymake).
You can disable flymake this way (add-hook 'eglot--managed-mode-hook (lambda () (flymake-mode -1)))
(https://github.com/joaotavora/eglot/issues/123#issuecomment-444104870)
I will document it in rustic.
Is it possible to use rustic with the built-in flymake
and eglot
instead of flycheck
?
Last time I checked it still worked https://github.com/brotzeit/rustic#client but wouldn't be the first time that stuff suddenly stops working. But in this case I assume there would already be some complaints.
See this thread about what I experienced trying to use rustic-mode
with eglot and flymake-mode
turned on: https://github.com/rust-lang/rust-mode/issues/484#issuecomment-1372525271
Let me know if you'd like to see my emacs config. I can share it here with what I have configured. I just have to push my latest dots to my git repo today:
I didn't see an obvious way to configure rustic to disable flycheck -- is there a way to do that? (If so, perhaps it should be documented.) I've noticed that editing is fairly laggy and I (perhaps incorrectly) attribute this to flycheck.