refactor: use negated flags

Ref: 7a806521a92c
This commit is contained in:
Henrik Lissner
2024-10-19 14:57:44 -04:00
parent 15904349cf
commit 448bc5cae2
73 changed files with 87 additions and 132 deletions

View File

@@ -9,8 +9,7 @@
;; NOTE: We disable eglot-auto-display-help-buffer because :select t in
;; its popup rule causes eglot to steal focus too often.
eglot-auto-display-help-buffer nil)
(when (and (modulep! :checkers syntax)
(not (modulep! :checkers syntax +flymake)))
(when (modulep! :checkers syntax -flymake)
(setq eglot-stay-out-of '(flymake)))
:config
@@ -62,6 +61,5 @@ server an expensive restart when its buffer is reverted."
(use-package! flycheck-eglot
:when (and (modulep! :checkers syntax)
(not (modulep! :checkers syntax +flymake)))
:when (modulep! :checkers syntax -flymake)
:hook (eglot-managed-mode . flycheck-eglot-mode))

View File

@@ -1,5 +1,5 @@
;;; tools/lsp/autoload/lsp-mode.el -*- lexical-binding: t; -*-
;;;###if (not (modulep! +eglot))
;;;###if (modulep! -eglot)
;;;###autodef
(defun set-lsp-priority! (client priority)

View File

@@ -1,7 +1,6 @@
;;; tools/lsp/doctor.el -*- lexical-binding: t; -*-
(assert! (not (and (modulep! +eglot)
(modulep! +peek)))
(assert! (not (modulep! +eglot +peek))
"+eglot and +peek flags are not compatible. Peek uses lsp-mode, while Eglot is another package altogether for LSP.")
(unless (modulep! +eglot)

View File

@@ -6,8 +6,7 @@
(package! eglot :pin "6b9c4faa5201915ab81fe470a872ebce8921fe51")
(when (modulep! :completion vertico)
(package! consult-eglot :pin "64262e72452f8fe6dd49d31bcdd4bd577b7d682d"))
(when (and (modulep! :checkers syntax)
(not (modulep! :checkers syntax +flymake)))
(when (modulep! :checkers syntax -flymake)
(package! flycheck-eglot :pin "09e37f4c726d9b565b040ba9e89215158d3bd6b6")))
(package! lsp-mode :pin "dd61303b2dc989a58f7dddd4c754f828a3f52107")
(package! lsp-ui :pin "072bb29152038518c2478813b82c8d04d07df84c")