Closed ovistoica closed 8 months ago
Update: Figured it out. The issue was that eglot
was taking over flymake, removing any other backends that were set. In the eglot
documentation, it's suggested to add flymake
to eglot-stay-out-of
but that stops eglot from showing errors through flymake which is not what you'd want
Ended on with this as a working solution:
(defun os/enable-eslint-if-typescript ()
"Enable eslint if typescript mode"
(when (or (eq major-mode 'tsx-ts-mode)
(eq major-mode 'typescript-ts-mode))
(flymake-eslint-enable)))
(add-hook 'eglot-managed-mode-hook #'os/enable-eslint-if-typescript)
Here's my config
If I open a ts or tsx file and then I do
M-x flymake-eslint-enable
it works But as a hook trigger from the above config it failsNote: It's now written with lambda as I hoped that would solve it but I get the same error if have hooks configured like
(mode . flymake-eslint-enable)
I'm using treesitter & eglot
Messages Log