Compare commits
No commits in common. "050091fed2890d6f6e817d99f41fd6c30c12a343" and "60e8b7607da329be0c95a113e80231cc9e6b22d4" have entirely different histories.
050091fed2
...
60e8b7607d
@ -1,40 +1,28 @@
|
|||||||
;; -*- lexical-binding: t; -*-
|
;; -*- lexical-binding: t; -*-
|
||||||
|
|
||||||
;; Fix Emacs' bad defaults
|
;; Fix Emacs' bad defaults
|
||||||
(use-package emacs
|
|
||||||
:init
|
|
||||||
;; Save backups and autosaves in a centralized place
|
|
||||||
(defvar autosave-directory (expand-file-name "autosaves" user-emacs-directory))
|
|
||||||
(defvar backup-directory (expand-file-name "backups" user-emacs-directory))
|
|
||||||
(make-directory autosave-directory t)
|
|
||||||
(setq auto-save-file-name-transforms `((".*" ,autosave-directory t))
|
|
||||||
backup-directory-alist `(("." . ,backup-directory)))
|
|
||||||
|
|
||||||
;; Sensible variable defaults
|
;; Save backups and autosaves in a centralized place
|
||||||
(setq ring-bell-function 'ignore
|
(defvar autosave-directory (expand-file-name "autosaves" user-emacs-directory))
|
||||||
enable-recursive-minibuffers t
|
(defvar backup-directory (expand-file-name "backups" user-emacs-directory))
|
||||||
read-process-output-max (* 1024 1024)
|
(make-directory autosave-directory t)
|
||||||
vc-follow-symlinks t
|
(setq auto-save-file-name-transforms `((".*" ,autosave-directory t))
|
||||||
display-line-numbers-type 'visual
|
backup-directory-alist `(("." . ,backup-directory)))
|
||||||
display-buffer-alist '((".*"
|
|
||||||
(display-buffer-reuse-window display-buffer-same-window)
|
|
||||||
(reusable-frames . t)))
|
|
||||||
even-window-sizes nil)
|
|
||||||
(setq-default indent-tabs-mode nil)
|
|
||||||
|
|
||||||
;; default to utf-8 for all the things
|
;; Sensible variable defaults
|
||||||
(set-charset-priority 'unicode)
|
(setq ring-bell-function nil
|
||||||
(setq locale-coding-system 'utf-8
|
enable-recursive-minibuffers t
|
||||||
coding-system-for-read 'utf-8
|
read-process-output-max (* 1024 1024)
|
||||||
coding-system-for-write 'utf-8)
|
vc-follow-symlinks t
|
||||||
(set-terminal-coding-system 'utf-8)
|
display-line-numbers-type 'visual
|
||||||
(set-keyboard-coding-system 'utf-8)
|
display-buffer-alist '((".*"
|
||||||
(set-selection-coding-system 'utf-8)
|
(display-buffer-reuse-window display-buffer-same-window)
|
||||||
(prefer-coding-system 'utf-8)
|
(reusable-frames . t)))
|
||||||
(setq default-process-coding-system '(utf-8-unix . utf-8-unix))
|
even-window-sizes nil)
|
||||||
|
(setq-default indent-tabs-mode nil)
|
||||||
|
|
||||||
;; Always display line numbers in text/programming modes
|
;; Always display line numbers in text/programming modes
|
||||||
(add-hook 'prog-mode-hook #'display-line-numbers-mode)
|
(add-hook 'prog-mode-hook #'display-line-numbers-mode)
|
||||||
(add-hook 'text-mode-hook #'display-line-numbers-mode))
|
(add-hook 'text-mode-hook #'display-line-numbers-mode)
|
||||||
|
|
||||||
(provide 'init-defaults)
|
(provide 'init-defaults)
|
||||||
|
@ -176,26 +176,6 @@
|
|||||||
"::"
|
"::"
|
||||||
(python-info-current-defun)))))))))
|
(python-info-current-defun)))))))))
|
||||||
|
|
||||||
(defun run-command-recipe-nosetests()
|
|
||||||
(when (and (derived-mode-p 'python-mode)
|
|
||||||
(= 0 (call-process "python" nil nil nil "-c" "import nose")))
|
|
||||||
(let ((test-file-p (string-match-p "test" (or (buffer-file-name) ""))))
|
|
||||||
(list
|
|
||||||
(when (and (projectile-project-root)
|
|
||||||
(file-exists-p (concat (file-name-as-directory (projectile-project-root))
|
|
||||||
"tests")))
|
|
||||||
(list :command-name "test all"
|
|
||||||
:command-line "nosetests -w tests"
|
|
||||||
:working-dir (projectile-project-root)))
|
|
||||||
(when test-file-p
|
|
||||||
(list :command-name "test this file"
|
|
||||||
:command-line (format "nosetests %s" (buffer-file-name))))
|
|
||||||
(when (and test-file-p (python-info-current-defun))
|
|
||||||
(list :command-name "test this function"
|
|
||||||
:command-line (format "nosetests %s:%s"
|
|
||||||
(buffer-file-name)
|
|
||||||
(python-info-current-defun))))))))
|
|
||||||
|
|
||||||
(defun run-command-recipe-web-ext ()
|
(defun run-command-recipe-web-ext ()
|
||||||
(when-let* ((_ (executable-find "web-ext"))
|
(when-let* ((_ (executable-find "web-ext"))
|
||||||
(manifest (locate-dominating-file default-directory "manifest.json"))
|
(manifest (locate-dominating-file default-directory "manifest.json"))
|
||||||
@ -230,7 +210,6 @@
|
|||||||
run-command-recipe-kustomize
|
run-command-recipe-kustomize
|
||||||
run-command-recipe-sops
|
run-command-recipe-sops
|
||||||
run-command-recipe-pytest
|
run-command-recipe-pytest
|
||||||
run-command-recipe-nosetests
|
|
||||||
run-command-recipe-web-ext
|
run-command-recipe-web-ext
|
||||||
run-command-recipe-pip)))
|
run-command-recipe-pip)))
|
||||||
|
|
||||||
|
@ -24,12 +24,13 @@
|
|||||||
"7" #'winum-select-window-7
|
"7" #'winum-select-window-7
|
||||||
"8" #'winum-select-window-8
|
"8" #'winum-select-window-8
|
||||||
"9" #'winum-select-window-9
|
"9" #'winum-select-window-9
|
||||||
"w" '(evil-window-map :which-key "window"))
|
"w" '(nil :which-key "window")
|
||||||
|
"w/" #'split-window-horizontally
|
||||||
(general-def evil-window-map
|
"w-" #'split-window-vertically
|
||||||
"m" #'delete-other-windows
|
"wm" #'delete-other-windows
|
||||||
"u" #'winner-undo
|
"wd" #'delete-window
|
||||||
"C-r" #'winner-redo)
|
"wp" #'winner-undo
|
||||||
|
"wn" #'winner-redo)
|
||||||
|
|
||||||
;; Condense the which-key display for window selection bindings
|
;; Condense the which-key display for window selection bindings
|
||||||
(push '(("\\(.*\\) 0" . "select-window-0") . ("\\1 0..9" . "window 0..9"))
|
(push '(("\\(.*\\) 0" . "select-window-0") . ("\\1 0..9" . "window 0..9"))
|
||||||
|
@ -1,5 +0,0 @@
|
|||||||
;; -*- lexical-binding: t; -*-
|
|
||||||
|
|
||||||
;; Some startup time optimizations stolen from Doom emacs
|
|
||||||
(setq gc-cons-threshold most-positive-fixnum ; 2^61 bytes
|
|
||||||
gc-cons-percentage 0.6)
|
|
@ -1,6 +1,8 @@
|
|||||||
;; -*- lexical-binding: t; -*-
|
;; -*- lexical-binding: t; -*-
|
||||||
|
|
||||||
;; Some startup time optimizations stolen from Doom emacs
|
;; Some startup time optimizations stolen from Doom emacs
|
||||||
|
(setq gc-cons-threshold most-positive-fixnum ; 2^61 bytes
|
||||||
|
gc-cons-percentage 0.6)
|
||||||
(defvar file-name-handler-alist-backup file-name-handler-alist)
|
(defvar file-name-handler-alist-backup file-name-handler-alist)
|
||||||
(setq file-name-handler-alist nil)
|
(setq file-name-handler-alist nil)
|
||||||
(add-hook 'emacs-startup-hook
|
(add-hook 'emacs-startup-hook
|
||||||
@ -35,12 +37,6 @@
|
|||||||
(straight-use-package 'use-package)
|
(straight-use-package 'use-package)
|
||||||
(setq straight-use-package-by-default t)
|
(setq straight-use-package-by-default t)
|
||||||
|
|
||||||
;; "Garbage Collection Magic Hack"
|
|
||||||
(use-package gcmh
|
|
||||||
:demand t
|
|
||||||
:config
|
|
||||||
(gcmh-mode 1))
|
|
||||||
|
|
||||||
;; Fix $PATH
|
;; Fix $PATH
|
||||||
(use-package exec-path-from-shell
|
(use-package exec-path-from-shell
|
||||||
:hook (after-init . exec-path-from-shell-initialize)
|
:hook (after-init . exec-path-from-shell-initialize)
|
||||||
|
Loading…
Reference in New Issue
Block a user