Emacs: Replace (unless slow-computer […] with :unless slow-computer.
This commit is contained in:
parent
c8b6a6bc90
commit
d15eefdf5d
|
@ -1,6 +1,6 @@
|
|||
;;; c++.el --- C++ settings. -*- lexical-binding: t; -*-
|
||||
|
||||
;; Time-stamp: <2020-12-07T16:21:12+0100>
|
||||
;; Time-stamp: <2020-12-08T13:10:22+0100>
|
||||
|
||||
;;; Commentary:
|
||||
|
||||
|
@ -10,11 +10,11 @@
|
|||
(require 'basics/global-variables)
|
||||
(require 'programming/common)
|
||||
|
||||
(unless slow-computer
|
||||
(when (and (executable-find "clang-tidy")
|
||||
;; clang-tidy is built into clangd >= 9.
|
||||
(< (my/clangd-version) 9.0))
|
||||
(use-package flycheck-clang-tidy
|
||||
:unless slow-computer
|
||||
:after (flycheck projectile lsp-ui)
|
||||
:defines (lsp-mode)
|
||||
:functions (flycheck-clang-tidy-setup)
|
||||
|
@ -43,7 +43,6 @@
|
|||
:hook ((flycheck-mode . my/flycheck-clang-tidy-setup)
|
||||
(first-change . my/clang-tidy-off) ; Disable when file is modified.
|
||||
(before-save . my/clang-tidy-on)))) ; Enable if file is saved.
|
||||
) ; unless slow-computer.
|
||||
|
||||
;; Highlight Doxygen comments.
|
||||
(use-package highlight-doxygen
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
;;; common.el --- Common programming settings. -*- lexical-binding: t; -*-
|
||||
|
||||
;; Time-stamp: <2020-12-08T12:50:22+0100>
|
||||
;; Time-stamp: <2020-12-08T13:08:13+0100>
|
||||
|
||||
;;; Commentary:
|
||||
|
||||
|
@ -45,8 +45,8 @@
|
|||
:hook (prog-mode . turn-on-eldoc-mode))
|
||||
|
||||
;; Syntax checking with many plugins.
|
||||
(unless slow-computer
|
||||
(use-package flycheck
|
||||
:unless slow-computer
|
||||
:demand t
|
||||
:functions (flycheck-add-mode)
|
||||
:diminish flycheck-mode
|
||||
|
@ -61,11 +61,10 @@
|
|||
("<f5>" . flycheck-previous-error)
|
||||
("<f6>" . flycheck-next-error)
|
||||
("<f7>" . flycheck-list-errors)))
|
||||
) ; unless slow-computer.
|
||||
|
||||
;; Autocompletion mode with many plugins.
|
||||
(unless slow-computer
|
||||
(use-package company
|
||||
:unless slow-computer
|
||||
:diminish company-mode
|
||||
:custom ((company-minimum-prefix-length 1) ; Suggestions after 1 character.
|
||||
(company-selection-wrap-around t)
|
||||
|
@ -80,8 +79,8 @@
|
|||
|
||||
;; Documentation popups for completions.
|
||||
(use-package company-quickhelp
|
||||
:after (company)
|
||||
:config (company-quickhelp-mode))
|
||||
) ; unless slow-computer.
|
||||
|
||||
;; Sorting and filtering for company.
|
||||
(use-package company-prescient
|
||||
|
@ -89,8 +88,8 @@
|
|||
:hook (after-init . company-prescient-mode))
|
||||
|
||||
;; Automatic project management.
|
||||
(unless slow-computer
|
||||
(use-package projectile
|
||||
:unless slow-computer
|
||||
:demand t
|
||||
:after (treemacs ivy window-purpose)
|
||||
:functions (f-directory?
|
||||
|
@ -162,7 +161,6 @@ collapse other projects."
|
|||
("k" . 'my/projectile-kill-buffers))
|
||||
(:map projectile-mode-map ; Only override in projectile-mode.
|
||||
("C-x C-f" . 'projectile-find-file))))
|
||||
) ; unless slow-computer.
|
||||
|
||||
;; Highlight TODO, FIXME, NOTE and so on.
|
||||
(use-package hl-todo
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
;;; git.el --- magit and stuff. -*- lexical-binding: t; -*-
|
||||
|
||||
;; Time-stamp: <2020-12-03T21:40:09+0100>
|
||||
;; Time-stamp: <2020-12-08T13:15:20+0100>
|
||||
|
||||
;;; Commentary:
|
||||
|
||||
|
@ -16,8 +16,8 @@
|
|||
(setq-local fill-column 72))
|
||||
:hook (git-commit-mode . my/set-git-commit-fill-column))
|
||||
|
||||
(unless slow-computer
|
||||
(use-package magit
|
||||
:unless slow-computer
|
||||
:after (keychain-environment)
|
||||
:custom (magit-diff-refine-hunk 'all) ; Show word-granularity differences.
|
||||
:bind (("C-x g" . nil) ; Disable default.
|
||||
|
@ -29,22 +29,22 @@
|
|||
(magit-mode . keychain-refresh-environment)))
|
||||
|
||||
;; Use libgit rather than git.
|
||||
(use-package magit-libgit)
|
||||
(use-package magit-libgit
|
||||
:after (magit))
|
||||
|
||||
;; Show TODOs in magit-status.
|
||||
(use-package magit-todos
|
||||
:after magit
|
||||
:after (magit)
|
||||
:init (put 'magit-todos-depth 'safe-local-variable #'integerp)
|
||||
:hook (magit-mode . magit-todos-mode))
|
||||
|
||||
;; Work with Git forges from Magit.
|
||||
(use-package forge
|
||||
:after magit
|
||||
:after (magit)
|
||||
:config (add-to-list 'forge-alist
|
||||
'("schlomp.space" "schlomp.space/api/v1"
|
||||
"schlomp.space" forge-gitea-repository))
|
||||
:hook (prog-mode . forge-bug-reference-setup))
|
||||
) ; unless slow-computer.
|
||||
|
||||
(provide 'programming/git)
|
||||
;;; git.el ends here
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
;;; lsp.el --- Language Server Protocol. -*- lexical-binding: t; -*-
|
||||
|
||||
;; Time-stamp: <2020-12-07T15:03:32+0100>
|
||||
;; Time-stamp: <2020-12-08T13:13:22+0100>
|
||||
|
||||
;;; Commentary:
|
||||
|
||||
|
@ -10,10 +10,9 @@
|
|||
(require 'basics/global-variables)
|
||||
(require 'programming/common)
|
||||
|
||||
(unless slow-computer
|
||||
;; Client for Language Server Protocol servers.
|
||||
(use-package lsp-mode
|
||||
:if (executable-find "clangd")
|
||||
:if (and (executable-find "clangd") (not slow-computer))
|
||||
:defines (lsp-clients-clangd-args)
|
||||
:diminish lsp-mode
|
||||
:custom ((lsp-prefer-flymake nil) ; Disable flymake.
|
||||
|
@ -76,7 +75,7 @@
|
|||
:after (treemacs lsp-ui)
|
||||
:bind (:map lsp-ui-mode-map
|
||||
("<f7>" . lsp-treemacs-errors-list)))
|
||||
) ; unless slow-computer.
|
||||
)
|
||||
|
||||
(provide 'programming/lsp)
|
||||
;;; lsp.el ends here
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
;;; common.el --- Common settings for text files. -*- lexical-binding: t; -*-
|
||||
|
||||
;; Time-stamp: <2020-12-07T16:03:09+0100>
|
||||
;; Time-stamp: <2020-12-08T13:16:30+0100>
|
||||
|
||||
;;; Commentary:
|
||||
|
||||
|
@ -105,11 +105,11 @@
|
|||
(ispell-hunspell-add-multi-dic "de_DE,de_AT,de_CH")))
|
||||
|
||||
;; Interactive spell checking.
|
||||
(unless slow-computer
|
||||
(use-package flyspell
|
||||
:if (or (executable-find "aspell")
|
||||
:if (and (not slow-computer)
|
||||
(or (executable-find "aspell")
|
||||
(executable-find "hunspell")
|
||||
(executable-find "ispell"))
|
||||
(executable-find "ispell")))
|
||||
:diminish flyspell-mode
|
||||
:custom ((flyspell-default-dictionary "en_US"))
|
||||
:config (progn
|
||||
|
@ -137,7 +137,6 @@
|
|||
(markdown-mode . flyspell-mode)
|
||||
(git-commit-mode . flyspell-mode))
|
||||
:mode ("COMMIT_EDITMSG\\'" . flyspell-mode))
|
||||
) ; unless slow-computer.
|
||||
|
||||
;; The string Time-stamp: <> in the first 8 lines of the file will be updated
|
||||
;; with the current timestamp.
|
||||
|
|
Loading…
Reference in New Issue
Block a user