When I'm in for example c-mode, lsp-mode and fly-check are automatically started, and it's necessary to turn them off with lsp-disconnect & toggling (global-flycheck-mode).
What I've tried so far:
1. c-mode-hook with lsp-disconnect, lsp-ui, global-flycheck-mode toggle
2. with-eval-after-load 'c-mode. The same as above
Neither work.
lsp-disconnect is not available when I call it in my .emacs config for hooking c-mode (but it is for with-eval-after-load, although that still doesn't work).
Global-flycheck-mode is apparently toggled on even if i turn it off by something.
I thought, Maybe Lsp is toggling it on? I tried (setq lsp-diagnostics-provider :none) which doesn't seem to make a difference for flychek.
Even when I disable lsp manually by lsp-disconnect for that buffer, it seems to always come back somehow and re-enable itself even while i just stay editing that single buffer.
Anyone know how I can have these two disabled at startup but toggleable when needed?