Closed holtzermann17 closed 5 years ago
Good point. According to the manual, using define-global-minor-mode
would be a good way to do it. It would let us activate flycheck-inline
globally, and still be able to disable it locally.
Ah, we probably want to make flycheck-display-errors-function
buffer-local as well.
@holtzermann17 You can try the patch at #9 and see if that works for you. You should be able to use global-flycheck-inline-mode
to turn on the mode globally and disable it for some major modes by adding (flycheck-inline-mode -1)
to that major mode hook.
Thanks I'll try it and report back!
Use case: Suppose someone wants to use flycheck-inline with Lean mode, but not with Haskell. However, they want to use flycheck in both modes.
In order to configure flycheck-inline for use with Lean, they should run
and define
flycheck-inline-display-function
. But the call toflycheck-inline-mode
indicated above turns it on even for Haskell mode buffers.While it's possible to turn off flycheck on a per-mode basis, no similar facility exists for flycheck-inline-mode.