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