emacs: steal nice things from tecosaur's config

This commit is contained in:
FollieHiyuki 2021-04-18 19:26:17 +03:00
parent 7120885076
commit bd6117c8b4
No known key found for this signature in database
GPG Key ID: 813CF484F4993419
3 changed files with 65 additions and 8 deletions

View File

@ -70,7 +70,9 @@
- [@hlissner](https://github.com/hlissner) for a detailed zsh config (and Doom Emacs)
- [@daviwil](https://github.com/daviwil) for his Emacs streams
- [@daviwil](https://github.com/daviwil)'s Emacs streams
- [@tecosaur](https://tecosaur.github.io/emacs-config/config.html)'s Emacs configuration
- My Waybar config is heavily inspired by [@begs](https://git.sr.ht/~begs/dotfiles)

View File

@ -11,9 +11,27 @@
;; Secrets
(setq auth-sources '("~/.config/doom/.authinfo.gpg"))
;; Better default settings
(setq-default
;; Tab vs space
indent-tabs-mode nil
tab-width 2
evil-shift-width 2
standard-indent 2
line-spacing 2
;; From @tecosaur
delete-by-moving-to-trash t
window-combination-resize t
x-stretch-cursor t)
(setq undo-limit 80000000
evil-want-fine-undo t
auto-save-default t
truncate-string-ellipsis "")
(global-subword-mode 1) ;; Use CamelCase words
;; Font settings
(setq doom-font (font-spec :family "Iosevka" :size 16)
doom-serif-font (font-spec :family "Iosevka Slab" :size 16)
doom-serif-font (font-spec :family "Iosevka Slab" :size 16 :weight 'light)
doom-variable-pitch-font (font-spec :family "Iosevka Aile" :size 16)
doom-big-font (font-spec :family "Iosevka" :size 24))
(after! unicode-fonts
@ -59,6 +77,12 @@
(setq doom-modeline-major-mode-icon t
doom-modeline-major-mode-color-icon t
doom-modeline-unicode-fallback t))
(custom-set-faces!
'(doom-modeline-buffer-modified :foreground "orange"))
;; Window split position
(setq evil-vsplit-window-right t
evil-split-window-below t)
;; Emoji
(after! emojify
@ -95,12 +119,6 @@
(setq +vc-gutter-default-style nil))
;; Indent
(setq-default
indent-tabs-mode nil
tab-width 2
evil-shift-width 2
standard-indent 2
line-spacing 2)
(after! highlight-indent-guides
(setq highlight-indent-guides-method 'character
highlight-indent-guides-responsive t))
@ -119,6 +137,7 @@
projectile-auto-discover nil))
;; Ivy / Counsel
(setq +ivy-buffer-preview t)
(after! counsel
(setq counsel-linux-app-format-function #'counsel-linux-app-format-function-name-only))
(map! "C-M-j" 'counsel-switch-buffer)
@ -134,6 +153,7 @@
;; Company
(after! company
;;(add-hook 'evil-normal-state-entry-hook #'company-abort)
(setq company-idle-delay 0.5
company-minimum-prefix-length 2
company-show-numbers nil))
@ -292,6 +312,36 @@
:config
(setq tldr-directory-path "~/.local/share/tldr"))
;; Keycast
(use-package! keycast
:commands keycast-mode
:config
(define-minor-mode keycast-mode
"Show current command and its key binding in the mode line."
:global t
(if keycast-mode
(progn
(add-hook 'pre-command-hook 'keycast--update t)
(add-to-list 'global-mode-string '("" mode-line-keycast " ")))
(remove-hook 'pre-command-hook 'keycast--update)
(setq global-mode-string (remove '("" mode-line-keycast " ") global-mode-string))))
(custom-set-faces!
'(keycast-command :inherit doom-modeline-debug
:height 0.9)
'(keycast-key :inherit custom-modified
:height 1.1
:weight bold)))
;; To read big files
(use-package! vlf-setup
:defer-incrementally vlf-tune vlf-base vlf-write vlf-search vlf-occur vlf-follow vlf-ediff vlf)
;; Nicer page break
(use-package! page-break-lines
:commands page-break-lines-mode
:init
(autoload 'turn-on-page-break-lines-mode "page-break-lines"))
;; Here are some additional functions/macros that could help you configure Doom:
;;
;; - `load!' for loading external *.el files relative to this one

View File

@ -68,6 +68,11 @@
(package! tldr)
(package! lice)
(package! license-templates)
(package! keycast)
(package! vlf)
(package! page-break-lines)
;;(package! ox-gfm)
;;(package! gif-screencase)
;;(package! magit-delta)
;;(package! sudoku)
;;(package! mentor)