diff --git a/core/core-editor.el b/core/core-editor.el index 909829556..724a32802 100644 --- a/core/core-editor.el +++ b/core/core-editor.el @@ -106,7 +106,10 @@ possible." (add-hook! 'after-save-hook (defun doom-guess-mode-h () - "Guess major mode when saving a file in `fundamental-mode'." + "Guess major mode when saving a file in `fundamental-mode'. + +Likely, something has changed since the buffer was opened. e.g. A shebang line +or file path may exist now." (when (eq major-mode 'fundamental-mode) (let ((buffer (or (buffer-base-buffer) (current-buffer)))) (and (buffer-file-name buffer) @@ -155,7 +158,7 @@ possible." ;; The POSIX standard defines a line is "a sequence of zero or more non-newline ;; characters followed by a terminating newline", so files should end in a ;; newline. Windows doesn't respect this (because it's Windows), but we should, -;; since programmers' tools tend to be POSIX compliant. +;; since programmers' tools tend to be POSIX compliant (and no big deal if not). (setq require-final-newline t) ;; Default to soft line-wrapping in text modes. It is more sensibile for text diff --git a/core/core-ui.el b/core/core-ui.el index b52adae8e..417349677 100644 --- a/core/core-ui.el +++ b/core/core-ui.el @@ -504,6 +504,8 @@ windows, switch to `doom-fallback-buffer'. Otherwise, delegate to original all-the-icons-wicon all-the-icons-alltheicon) "")))) +;; Hide the mode line in completion popups and MAN pages because they serve +;; little purpose there, and is better hidden. ;;;###package hide-mode-line-mode (add-hook! '(completion-list-mode-hook Man-mode-hook) #'hide-mode-line-mode) @@ -518,17 +520,19 @@ windows, switch to `doom-fallback-buffer'. Otherwise, delegate to original ;;;###package rainbow-delimiters ;; Helps us distinguish stacked delimiter pairs, especially in parentheses-drunk -;; languages like Lisp. +;; languages like Lisp. I reduce it from it's default of 9 to reduce the +;; complexity of the font-lock keyword and hopefully buy us a few ms of +;; performance. (setq rainbow-delimiters-max-face-count 3) ;; ;;; Line numbers -;; Explicitly define a width to reduce computation +;; Explicitly define a width to reduce the cost of on-the-fly computation (setq-default display-line-numbers-width 3) -;; Show absolute line numbers for narrowed regions makes it easier to tell the +;; Show absolute line numbers for narrowed regions to make it easier to tell the ;; buffer is narrowed, and where you are, exactly. (setq-default display-line-numbers-widen t) diff --git a/core/core.el b/core/core.el index 2359235ce..a954358ef 100644 --- a/core/core.el +++ b/core/core.el @@ -208,7 +208,8 @@ users).") inhibit-default-init t ;; Shave seconds off startup time by starting the scratch buffer in ;; `fundamental-mode', rather than, say, `org-mode' or `text-mode', which - ;; pull in a ton of packages. + ;; pull in a ton of packages. `doom/open-scratch-buffer' provides a better + ;; scratch buffer anyway. initial-major-mode 'fundamental-mode initial-scratch-message nil) @@ -246,8 +247,7 @@ config.el instead." ;;; Optimizations ;; A second, case-insensitive pass over `auto-mode-alist' is time wasted, and -;; indicates misconfiguration (or that the user needs to stop relying on case -;; insensitivity). +;; indicates misconfiguration (don't rely on case insensitivity for file names). (setq auto-mode-case-fold nil) ;; Disable bidirectional text rendering for a modest performance boost. I've set