General cleanup; comment revisions
This commit is contained in:
parent
f77ab3cb14
commit
54196139bb
4 changed files with 29 additions and 22 deletions
|
@ -2,9 +2,6 @@
|
|||
|
||||
(defconst doom-fringe-size '3 "Default fringe width")
|
||||
|
||||
;; y/n instead of yes/no
|
||||
(fset 'yes-or-no-p 'y-or-n-p)
|
||||
|
||||
(setq-default
|
||||
mode-line-default-help-echo nil ; don't say anything on mode-line mouseover
|
||||
indicate-buffer-boundaries nil ; don't show where buffer starts/ends
|
||||
|
@ -36,6 +33,7 @@
|
|||
;; Minibuffer resizing
|
||||
resize-mini-windows 'grow-only
|
||||
max-mini-window-height 0.3
|
||||
|
||||
;; Ask for confirmation on exit only if there are real buffers left
|
||||
confirm-kill-emacs
|
||||
(lambda (_)
|
||||
|
@ -43,8 +41,11 @@
|
|||
(y-or-n-p "››› Quit?")
|
||||
t)))
|
||||
|
||||
;; y/n instead of yes/no
|
||||
(fset 'yes-or-no-p 'y-or-n-p)
|
||||
|
||||
;; Initialize UI
|
||||
(tooltip-mode -1) ; show tooltips in echo area
|
||||
(tooltip-mode -1) ; show tooltips in echo area instead
|
||||
(menu-bar-mode -1) ; no menu in GUI Emacs (or terminal)
|
||||
(when window-system
|
||||
(scroll-bar-mode -1) ; no scrollbar
|
||||
|
@ -53,7 +54,9 @@
|
|||
(setq frame-title-format '(buffer-file-name "%f" ("%b")))
|
||||
;; set font
|
||||
(with-demoted-errors "FONT ERROR: %s"
|
||||
(set-frame-font doom-default-font t))
|
||||
(set-frame-font doom-default-font t)
|
||||
;; Fallback to `doom-unicode-font' for Unicode characters
|
||||
(set-fontset-font t 'unicode doom-unicode-font))
|
||||
;; standardize fringe width
|
||||
(fringe-mode doom-fringe-size)
|
||||
(push `(left-fringe . ,doom-fringe-size) default-frame-alist)
|
||||
|
@ -67,9 +70,7 @@
|
|||
;; Show tilde in margin on empty lines
|
||||
(define-fringe-bitmap 'tilde [64 168 16] nil nil 'center)
|
||||
(set-fringe-bitmap-face 'tilde 'fringe)
|
||||
(setcdr (assq 'empty-line fringe-indicator-alist) 'tilde)
|
||||
;; Fallback to `doom-unicode-font' for Unicode characters
|
||||
(set-fontset-font t 'unicode doom-unicode-font))
|
||||
(setcdr (assq 'empty-line fringe-indicator-alist) 'tilde))
|
||||
|
||||
;; mode-line is unimportant in help/compile windows
|
||||
(add-hook 'help-mode-hook 'doom-hide-mode-line-mode)
|
||||
|
@ -144,8 +145,9 @@
|
|||
(after! editorconfig
|
||||
(advice-add 'highlight-indentation-guess-offset
|
||||
:override 'doom*hl-indent-guess-offset))
|
||||
;; A long-winded method for ensuring whitespace is maintained (so that
|
||||
;; highlight-indentation-mode can display them consistently)
|
||||
;; Since empty lines are stripped on save, the indentation highlights will
|
||||
;; have unseemly breaks in them. These hooks will indent empty lines so that
|
||||
;; the highlights are consistent, without affecting the saved output.
|
||||
(add-hook! highlight-indentation-mode
|
||||
(if highlight-indentation-mode
|
||||
(progn
|
||||
|
@ -174,7 +176,7 @@
|
|||
(add-hook 'post-command-hook 'doom|nlinum-hl-line nil t)
|
||||
(remove-hook 'post-command-hook 'doom|nlinum-hl-line t)))
|
||||
:config
|
||||
;; Calculate line number column width
|
||||
;; Calculate line number column width beforehand
|
||||
(add-hook! nlinum-mode
|
||||
(setq nlinum--width (length (save-excursion (goto-char (point-max))
|
||||
(format-mode-line "%l")))))
|
||||
|
|
|
@ -1,17 +1,20 @@
|
|||
;;; core-workgroups.el
|
||||
|
||||
;; I use workgroups to accomplish two things:
|
||||
;; 1. Vim-like tab emulation (type :tabs to see a list of tabs -- maybe I'll add some
|
||||
;; code to make a permanent frame header to display these some day)
|
||||
;; 1. Vim-like tab emulation (type :tabs to see a list of tabs -- maybe I'll
|
||||
;; add some code to make a permanent frame header to display these some
|
||||
;; day)
|
||||
;; 2. Session persistence (with :ss and :sl)
|
||||
;; 3. Tab names reflect the project open in them, unless they've been
|
||||
;; explicitly named with :tabrename <name>
|
||||
|
||||
(defvar doom-wg-frames '()
|
||||
"A list of all the frames opened as separate workgroups. See
|
||||
defuns/defuns-workgroups.el.")
|
||||
|
||||
(defvar doom-wg-names '()
|
||||
"A list of fixed names for workgroups. If a name is set, workgroup names
|
||||
aren't automatically renamed to the project name.")
|
||||
"Keeps track of the fixed names for workgroups (set with :tabrename), so that
|
||||
these workgroups won't be auto-renamed.")
|
||||
|
||||
(use-package workgroups2
|
||||
:when window-system
|
||||
|
|
|
@ -34,10 +34,10 @@
|
|||
[backspace] 'doom/yas-backspace
|
||||
"<delete>" 'doom/yas-delete)
|
||||
|
||||
;; Fix an error caused by smartparens interfering with yasnippet bindings
|
||||
(advice-add 'yas-expand :before 'sp-remove-active-pair-overlay)
|
||||
;; Exit snippets on ESC in normal mode
|
||||
(advice-add 'evil-force-normal-state :before 'yas-exit-all-snippets)
|
||||
;; Fix an issue with smartparens interfering with yasnippet keybindings
|
||||
(advice-add 'yas-expand :before 'sp-remove-active-pair-overlay)
|
||||
;; Once you're in normal mode, you're out
|
||||
(add-hook 'evil-normal-state-entry-hook 'yas-abort-snippet)
|
||||
;; Strip out whitespace before a line selection
|
||||
|
|
12
core/core.el
12
core/core.el
|
@ -53,15 +53,19 @@ killed by `doom/kill-unreal-buffers', or after `doom/kill-real-buffer').")
|
|||
before killing processes. If there are no buffers with matching major-modes, it
|
||||
gets killed.")
|
||||
|
||||
(defvar doom-unicode-font
|
||||
(defconst doom-unicode-font
|
||||
(font-spec :family "DejaVu Sans Mono" :size 13)
|
||||
"Font to fall back to for unicode glyphs.")
|
||||
"Fallback font for unicode glyphs.")
|
||||
|
||||
|
||||
;;
|
||||
;; Load path
|
||||
;;
|
||||
|
||||
;; Populate the load-path manually. This way, cask (and `cask-initialize') won't
|
||||
;; be an internal dependency -- they slow down startup a lot! And we eval them
|
||||
;; when compiling.
|
||||
|
||||
(defvar doom--load-path load-path
|
||||
"Initial `load-path', so we don't clobber it on consecutive reloads.")
|
||||
|
||||
|
@ -73,7 +77,6 @@ gets killed.")
|
|||
(ignore-errors (directory-files path t "^[^.]" t)))
|
||||
result))
|
||||
|
||||
;; Populate the load-path manually; cask shouldn't be an internal dependency
|
||||
(setq load-path
|
||||
(! (append (list doom-private-dir)
|
||||
(--subdirs doom-core-dir t)
|
||||
|
@ -97,8 +100,7 @@ gets killed.")
|
|||
(set-selection-coding-system 'utf-8) ; please
|
||||
(setq locale-coding-system 'utf-8) ; with sugar on top
|
||||
|
||||
;; Backwards compatibility as default-buffer-file-coding-system
|
||||
;; is deprecated in 23.2.
|
||||
;; default-buffer-file-coding-system is deprecated on 23.2
|
||||
(if (boundp 'buffer-file-coding-system)
|
||||
(setq-default buffer-file-coding-system 'utf-8)
|
||||
(setq default-buffer-file-coding-system 'utf-8))
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue