fix(lsp): enable flycheck-eglot only in PHP buffers managed by eglot

This commit is contained in:
kj
2026-09-02 19:15:19 -03:00
parent 14e2fe7715
commit b5f7c3bd53

View File

@@ -91,8 +91,13 @@
:after flycheck :after flycheck
:custom :custom
(flycheck-eglot-exclusive nil) (flycheck-eglot-exclusive nil)
:init :config
(global-flycheck-eglot-mode 1)) ;; Activar solo en buffers PHP gestionados por eglot: en el resto (p.ej. Go)
;; dejar que Eglot use flymake nativo y evitar la recursión de flycheck-eglot.
(add-hook 'eglot-managed-mode-hook
(lambda ()
(when (derived-mode-p 'php-mode 'php-ts-mode)
(flycheck-eglot-mode 1)))))
(use-package flycheck-popup-tip (use-package flycheck-popup-tip
:hook (flycheck-mode . flycheck-popup-tip-mode)) :hook (flycheck-mode . flycheck-popup-tip-mode))