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

@ -41,7 +41,7 @@
:desc "Delete trailing whitespace" "w" #'delete-trailing-whitespace
:desc "Delete trailing newlines" "W" #'doom/delete-trailing-newlines
:desc "List errors" "x" #'+default/diagnostics
(:when (and (modulep! :tools lsp) (not (modulep! :tools lsp +eglot)))
(:when (modulep! :tools lsp -eglot)
:desc "LSP Code actions" "a" #'lsp-execute-code-action
:desc "LSP Organize imports" "o" #'lsp-organize-imports
:desc "LSP Rename" "r" #'lsp-rename
@ -344,7 +344,7 @@
(:when (modulep! :lang org +present)
:desc "org-tree-slide mode" "p" #'org-tree-slide-mode)
:desc "Read-only mode" "r" #'read-only-mode
(:when (and (modulep! :checkers spell) (not (modulep! :checkers spell +flyspell)))
(:when (modulep! :checkers spell -flyspell)
:desc "Spell checker" "s" #'spell-fu-mode)
(:when (modulep! :checkers spell +flyspell)
:desc "Spell checker" "s" #'flyspell-mode)

View File

@ -440,7 +440,7 @@
;;; <leader> c --- code
(:prefix-map ("c" . "code")
(:when (and (modulep! :tools lsp) (not (modulep! :tools lsp +eglot)))
(:when (modulep! :tools lsp -eglot)
:desc "LSP Execute code action" "a" #'lsp-execute-code-action
:desc "LSP Organize imports" "o" #'lsp-organize-imports
:desc "LSP" "l" #'+default/lsp-command-map
@ -842,8 +842,7 @@
:desc "Fill Column Indicator" "c" #'global-display-fill-column-indicator-mode
:desc "Diff Highlights (Git Gutter)" "d" #'diff-hl-mode
:desc "Flymake" "f" #'flymake-mode
(:when (and (modulep! :checkers syntax)
(not (modulep! :checkers syntax +flymake)))
(:when (modulep! :checkers syntax -flymake)
:desc "Flycheck" "f" #'flycheck-mode)
:desc "Frame fullscreen" "F" #'toggle-frame-fullscreen
:desc "Evil goggles" "g" #'evil-goggles-mode
@ -856,7 +855,7 @@
(:when (modulep! :lang org +present)
:desc "org-tree-slide mode" "p" #'org-tree-slide-mode)
:desc "Read-only mode" "r" #'read-only-mode
(:when (and (modulep! :checkers spell) (not (modulep! :checkers spell +flyspell)))
(:when (modulep! :checkers spell -flyspell)
:desc "Spell checker" "s" #'spell-fu-mode)
(:when (modulep! :checkers spell +flyspell)
:desc "Spell checker" "s" #'flyspell-mode)

View File

@ -145,7 +145,7 @@ possible, or just one char if that's not possible."
(insert-char ?\s (- ocol (current-column)) nil))))
;;
((= n 1)
(cond ((or (not (modulep! +smartparens))
(cond ((or (modulep! -smartparens)
(not (bound-and-true-p smartparens-mode))
(and (memq (char-before) (list ?\ ?\t))
(save-excursion