Set the editor theme, plus... a bunch of miscellaneous changes
This commit is contained in:
parent
4e06e20b89
commit
068f63d507
2
.gitignore
vendored
2
.gitignore
vendored
@ -3,5 +3,7 @@ backup/
|
|||||||
elpa/
|
elpa/
|
||||||
transient/
|
transient/
|
||||||
|
|
||||||
|
.DS_Store
|
||||||
|
.lsp-session-*
|
||||||
history
|
history
|
||||||
recentf
|
recentf
|
||||||
|
@ -20,3 +20,10 @@
|
|||||||
tab-width 4)
|
tab-width 4)
|
||||||
(setq require-final-newline t)
|
(setq require-final-newline t)
|
||||||
(add-hook 'before-save-hook 'whitespace-cleanup)
|
(add-hook 'before-save-hook 'whitespace-cleanup)
|
||||||
|
|
||||||
|
;; Make sure that UTF-8 is *ALWAYS* the default encoding.
|
||||||
|
(set-charset-priority 'unicode)
|
||||||
|
(prefer-coding-system 'utf-8-unix)
|
||||||
|
|
||||||
|
;; Prettify symbols (eg. lambda -> λ).
|
||||||
|
(global-prettify-symbols-mode)
|
||||||
|
48
init.el
48
init.el
@ -17,6 +17,17 @@
|
|||||||
(package-install 'use-package))
|
(package-install 'use-package))
|
||||||
|
|
||||||
|
|
||||||
|
;; Configure how and where backup files are created.
|
||||||
|
|
||||||
|
(setq backup-directory-alist '(("." . "~/.emacs.d/backup"))
|
||||||
|
backup-by-copying t ; Don't delink hardlinks
|
||||||
|
version-control t ; Use version numbers on backups
|
||||||
|
delete-old-versions t ; Automatically delete excess backups
|
||||||
|
kept-new-versions 20 ; How many of the newest versions to keep
|
||||||
|
kept-old-versions 5 ; How many of the oldest versions to keep
|
||||||
|
)
|
||||||
|
|
||||||
|
|
||||||
;; Define a couple simple helper functions for loading user-defined
|
;; Define a couple simple helper functions for loading user-defined
|
||||||
;; configuration files.
|
;; configuration files.
|
||||||
|
|
||||||
@ -24,9 +35,12 @@
|
|||||||
|
|
||||||
(defun load-user-file (file)
|
(defun load-user-file (file)
|
||||||
"Load FILE in the current user's configuration directory.
|
"Load FILE in the current user's configuration directory.
|
||||||
File names which are prefixed with an underscore will be ignored."
|
File names which are prefixed with an underscore or which do not have the
|
||||||
|
extension '.el' will be ignored."
|
||||||
(interactive "f")
|
(interactive "f")
|
||||||
(unless (string-prefix-p "_" (file-name-nondirectory file))
|
(setq file-name (file-name-nondirectory file))
|
||||||
|
(when (and (string-suffix-p ".el" file-name)
|
||||||
|
(not (string-prefix-p "_" file-name)))
|
||||||
(load-file (expand-file-name file user-init-dir))))
|
(load-file (expand-file-name file user-init-dir))))
|
||||||
|
|
||||||
(defun load-user-dir (dir)
|
(defun load-user-dir (dir)
|
||||||
@ -38,34 +52,23 @@
|
|||||||
(load-user-file file)))
|
(load-user-file file)))
|
||||||
|
|
||||||
|
|
||||||
;; Configure how and where backup files are created:
|
;; Load all user-defined configuration files.
|
||||||
|
|
||||||
(setq backup-directory-alist '(("." . "~/.emacs.d/backup"))
|
|
||||||
backup-by-copying t ; Don't delink hardlinks
|
|
||||||
version-control t ; Use version numbers on backups
|
|
||||||
delete-old-versions t ; Automatically delete excess backups
|
|
||||||
kept-new-versions 20 ; How many of the newest versions to keep
|
|
||||||
kept-old-versions 5 ; How many of the oldest versions to keep
|
|
||||||
)
|
|
||||||
|
|
||||||
|
|
||||||
;; Diminish some built-in modes that we don't really care about:
|
|
||||||
|
|
||||||
(add-hook 'eldoc-mode-hook (lambda () (diminish 'eldoc-mode)))
|
|
||||||
(add-hook 'hs-minor-mode-hook (lambda () (diminish 'hs-minor-mode)))
|
|
||||||
|
|
||||||
|
|
||||||
;; Load all user-defined configuration files:
|
|
||||||
|
|
||||||
(load-user-file "editor.el")
|
(load-user-file "editor.el")
|
||||||
(load-user-file "interface.el")
|
(load-user-file "interface.el")
|
||||||
(load-user-file "key-bindings.el")
|
(load-user-file "key-bindings.el")
|
||||||
(load-user-file "typography.el")
|
(load-user-file "theme.el")
|
||||||
|
|
||||||
(load-user-dir "pkg")
|
(load-user-dir "pkg")
|
||||||
(load-user-dir "lang")
|
(load-user-dir "lang")
|
||||||
|
|
||||||
|
|
||||||
|
;; Diminish some built-in modes that we don't really care about.
|
||||||
|
|
||||||
|
(add-hook 'eldoc-mode-hook (lambda () (diminish 'eldoc-mode)))
|
||||||
|
(add-hook 'hs-minor-mode-hook (lambda () (diminish 'hs-minor-mode)))
|
||||||
|
|
||||||
|
|
||||||
;; WARNING: Don't touch anything after this comment!
|
;; WARNING: Don't touch anything after this comment!
|
||||||
|
|
||||||
(custom-set-variables
|
(custom-set-variables
|
||||||
@ -76,8 +79,7 @@
|
|||||||
'(git-gutter:added-sign " +")
|
'(git-gutter:added-sign " +")
|
||||||
'(git-gutter:deleted-sign " -")
|
'(git-gutter:deleted-sign " -")
|
||||||
'(git-gutter:modified-sign " *")
|
'(git-gutter:modified-sign " *")
|
||||||
'(package-selected-packages
|
'(package-selected-packages nil))
|
||||||
'(yaml-mode toml-mode markdown-mode yasnippet which-key vertico super-save solaire-mode smartparens rainbow-delimiters nerd-icons nerd-icons-dired magit lsp-mode hl-todo hl-line git-gutter flycheck diminish crux)))
|
|
||||||
(custom-set-faces
|
(custom-set-faces
|
||||||
;; custom-set-faces was added by Custom.
|
;; custom-set-faces was added by Custom.
|
||||||
;; If you edit it by hand, you could mess it up, so be careful.
|
;; If you edit it by hand, you could mess it up, so be careful.
|
||||||
|
15
lang/rust.el
Normal file
15
lang/rust.el
Normal file
@ -0,0 +1,15 @@
|
|||||||
|
;; Rust
|
||||||
|
;; https://github.com/emacs-rustic/rustic
|
||||||
|
(use-package rustic
|
||||||
|
:ensure t
|
||||||
|
:custom
|
||||||
|
(rustic-cargo-use-last-stored-arguments t)
|
||||||
|
:bind
|
||||||
|
(:map rustic-mode-map
|
||||||
|
("M-?" . lsp-find-references)
|
||||||
|
("C-c C-c l" . flycheck-list-errors)
|
||||||
|
("C-c C-c a" . lsp-execute-code-action)
|
||||||
|
("C-c C-c r" . lsp-rename)
|
||||||
|
("C-c C-c q" . lsp-workspace-restart)
|
||||||
|
("C-c C-c Q" . lsp-workspace-shutdown)
|
||||||
|
("C-c C-c s" . lsp-rust-analyzer-status)))
|
@ -3,5 +3,10 @@
|
|||||||
(use-package hl-todo
|
(use-package hl-todo
|
||||||
:ensure t
|
:ensure t
|
||||||
:config
|
:config
|
||||||
|
(setq hl-todo-keyword-faces
|
||||||
|
'(("FIXME" . "#f7768e")
|
||||||
|
("HACK" . "#7aa2f7")
|
||||||
|
("NOTE" . "#e0af68")
|
||||||
|
("TODO" . "#bb9af7")))
|
||||||
(add-hook 'prog-mode-hook #'hl-todo-mode)
|
(add-hook 'prog-mode-hook #'hl-todo-mode)
|
||||||
(add-hook 'text-mode-hook #'hl-todo-mode))
|
(add-hook 'text-mode-hook #'hl-todo-mode))
|
||||||
|
@ -2,5 +2,10 @@
|
|||||||
;; https://github.com/emacs-lsp/lsp-mode
|
;; https://github.com/emacs-lsp/lsp-mode
|
||||||
(use-package lsp-mode
|
(use-package lsp-mode
|
||||||
:ensure t
|
:ensure t
|
||||||
:commands (lsp lsp-deferred)
|
:diminish lsp-mode
|
||||||
:hook ((lsp-mode . lsp-enable-which-key-integration)))
|
:commands lsp
|
||||||
|
:init
|
||||||
|
;; Set prefix for lsp-command-keymap:
|
||||||
|
(setq lsp-keymap-prefix "C-c l")
|
||||||
|
:hook
|
||||||
|
((lsp-mode . lsp-enable-which-key-integration)))
|
||||||
|
5
pkg/org.el
Normal file
5
pkg/org.el
Normal file
@ -0,0 +1,5 @@
|
|||||||
|
;; Org mode.
|
||||||
|
(use-package org
|
||||||
|
:ensure t
|
||||||
|
:mode
|
||||||
|
(("\\.org$" . org-mode)))
|
7
theme.el
Normal file
7
theme.el
Normal file
@ -0,0 +1,7 @@
|
|||||||
|
;; https://github.com/doomemacs/themes
|
||||||
|
(use-package doom-themes
|
||||||
|
:ensure t
|
||||||
|
:config
|
||||||
|
(load-theme 'doom-tokyo-night t)
|
||||||
|
;(doom-themes-visual-bell-config)
|
||||||
|
)
|
@ -1,6 +0,0 @@
|
|||||||
;; Make sure that UTF-8 is *ALWAYS* the default encoding.
|
|
||||||
(set-charset-priority 'unicode)
|
|
||||||
(prefer-coding-system 'utf-8-unix)
|
|
||||||
|
|
||||||
;; Prettify symbols (eg. lambda -> λ).
|
|
||||||
(global-prettify-symbols-mode)
|
|
Loading…
Reference in New Issue
Block a user