Merge branch 'cleanup-dot-emacs-dir' of gitlab.com:marcuskammer/emacs.d into cleanup-dot-emacs-dir

This commit is contained in:
Marcus Kammer 2020-06-26 08:15:17 +02:00
commit 8e2c84c7da
3 changed files with 170 additions and 149 deletions

View file

@ -14,7 +14,7 @@
'(default-frame-alist '(default-frame-alist
(quote (quote
((undecorated . t) ((undecorated . t)
(font . "Fira Code-11") (font . "Fira Code-13")
(fullscreen . maximized) (fullscreen . maximized)
(alpha . 100)))) (alpha . 100))))
'(delete-selection-mode nil) '(delete-selection-mode nil)

View file

@ -8,10 +8,13 @@
'(default-frame-alist '(default-frame-alist
(quote (quote
((vertical-scroll-bars) ((vertical-scroll-bars)
(font . "Iosevka Term-12") (font . "Fira Code-11")
(fullscreen . maximized)))) (fullscreen . maximized))))
'(delete-by-moving-to-trash t) '(delete-by-moving-to-trash t)
'(display-line-numbers-grow-only t) '(display-line-numbers-grow-only t)
'(elpy-modules
(quote
(elpy-module-company elpy-module-eldoc elpy-module-flymake elpy-module-pyvenv elpy-module-yasnippet elpy-module-sane-defaults)))
'(geiser-default-implementation (quote racket)) '(geiser-default-implementation (quote racket))
'(horizontal-scroll-bar-mode nil) '(horizontal-scroll-bar-mode nil)
'(inhibit-startup-buffer-menu t) '(inhibit-startup-buffer-menu t)
@ -19,6 +22,14 @@
'(initial-frame-alist nil) '(initial-frame-alist nil)
'(ls-lisp-dirs-first t) '(ls-lisp-dirs-first t)
'(menu-bar-mode nil) '(menu-bar-mode nil)
'(mode-line-format
(quote
("-" mode-line-mule-info mode-line-modified mode-line-frame-identification mode-line-buffer-identification " " mode-line-position mode-line-modes
(which-func-mode
("" which-func-format "--"))
(global-mode-string
("--" global-mode-string))
"-%-")))
'(olivetti-body-width 90) '(olivetti-body-width 90)
'(olivetti-lighter " Olv") '(olivetti-lighter " Olv")
'(olivetti-minimum-body-width 80) '(olivetti-minimum-body-width 80)
@ -48,7 +59,7 @@
"c:/Users/Marcus.Kammer/AppData/Local/Programs/plantuml/plantuml.jar") "c:/Users/Marcus.Kammer/AppData/Local/Programs/plantuml/plantuml.jar")
'(package-selected-packages '(package-selected-packages
(quote (quote
(racket-mode geiser slime web-mode js2-mode markdown-mode yaml-mode olivetti elpy use-package nord-theme nordless-theme org toc-org ox-reveal ace-window htmlize ivy magit))) (rust-mode sphinx-frontend sphinx-mode racket-mode geiser slime web-mode js2-mode markdown-mode yaml-mode olivetti elpy use-package nord-theme nordless-theme org toc-org ox-reveal ace-window htmlize ivy magit)))
'(python-indent-guess-indent-offset nil) '(python-indent-guess-indent-offset nil)
'(python-shell-interpreter "ipython") '(python-shell-interpreter "ipython")
'(ring-bell-function (quote ignore)) '(ring-bell-function (quote ignore))

146
init.el
View file

@ -5,87 +5,87 @@
(server-start)) (server-start))
;; PACKAGE ;; PACKAGE
(require 'package) (require 'package)
(let* ((no-ssl (and (memq system-type '(windows-nt ms-dos)) (let* ((no-ssl (and (memq system-type '(windows-nt ms-dos))
(not (gnutls-available-p)))) (not (gnutls-available-p))))
(proto (if no-ssl "http" "https"))) (proto (if no-ssl "http" "https")))
(when no-ssl (when no-ssl
(warn "\ (warn "\
Your version of Emacs does not support SSL connections, Your version of Emacs does not support SSL connections,
which is unsafe because it allows man-in-the-middle attacks. which is unsafe because it allows man-in-the-middle attacks.
There are two things you can do about this warning: There are two things you can do about this warning:
1. Install an Emacs version that does support SSL and be safe. 1. Install an Emacs version that does support SSL and be safe.
2. Remove this warning from your init file so you won't see it again.")) 2. Remove this warning from your init file so you won't see it again."))
;; Comment/uncomment these two lines to enable/disable MELPA and MELPA Stable as desired ;; Comment/uncomment these two lines to enable/disable MELPA and MELPA Stable as desired
(add-to-list 'package-archives (cons "melpa" (concat proto "://melpa.org/packages/")) t) (add-to-list 'package-archives (cons "melpa" (concat proto "://melpa.org/packages/")) t)
;;(add-to-list 'package-archives (cons "melpa-stable" (concat proto "://stable.melpa.org/packages/")) t) ;;(add-to-list 'package-archives (cons "melpa-stable" (concat proto "://stable.melpa.org/packages/")) t)
(when (< emacs-major-version 24) (when (< emacs-major-version 24)
;; For important compatibility libraries like cl-lib ;; For important compatibility libraries like cl-lib
(add-to-list 'package-archives (cons "gnu" (concat proto "://elpa.gnu.org/packages/"))))) (add-to-list 'package-archives (cons "gnu" (concat proto "://elpa.gnu.org/packages/")))))
(package-initialize) (package-initialize)
;; OS SETTINGS ;; OS SETTINGS
(when (eq system-type 'gnu/linux) (when (eq system-type 'gnu/linux)
(setq custom-file "~/.emacs.d/bundle/custom_gnu.el")) (setq custom-file "~/.emacs.d/bundle/custom_gnu.el"))
(when (eq system-type 'windows-nt) (when (eq system-type 'windows-nt)
(setq custom-file "~/.emacs.d/bundle/custom_win32.el") (setq custom-file "~/.emacs.d/bundle/custom_win32.el")
(add-to-list 'load-path (expand-file-name "~/AppData/Roaming/__secrets")) (add-to-list 'load-path (expand-file-name "~/AppData/Roaming/__secrets"))
(cd "~/opt") (cd "~/opt")
(when (string= (system-name) "EVG02667NB") (when (string= (system-name) "EVG02667NB")
(setq custom-file "~/.emacs.d/bundle/custom_win32_EVG02667NB.el")) (setq custom-file "~/.emacs.d/bundle/custom_win32_EVG02667NB.el"))
(when (string= (system-name) "XPS-8930"))) (when (string= (system-name) "XPS-8930")))
;; CUSTOM_FILE ;; CUSTOM_FILE
(load custom-file :noerror) (load custom-file :noerror)
;; DISPLAY SETTINGS ;; DISPLAY SETTINGS
;; General userinterface and appearance ;; General userinterface and appearance
(global-font-lock-mode t) ; Color enabled (global-font-lock-mode t) ; Color enabled
(global-prettify-symbols-mode t) ; Prettify symbols (global-prettify-symbols-mode t) ; Prettify symbols
(global-hl-line-mode 1) ; Highlight cursor line (global-hl-line-mode 1) ; Highlight cursor line
(global-whitespace-mode -1) ; Show whitespace globally (global-whitespace-mode -1) ; Show whitespace globally
(show-paren-mode 1) ; Visual matching parens (show-paren-mode 1) ; Visual matching parens
(global-display-line-numbers-mode -1) ; Display line numbers (global-display-line-numbers-mode -1) ; Display line numbers
;; Mode line specific ;; Mode line specific
(column-number-mode 1) ; Display column number in the mode line (column-number-mode 1) ; Display column number in the mode line
(size-indication-mode -1) ; Display buffer size in the mode line (size-indication-mode -1) ; Display buffer size in the mode line
(line-number-mode 1) ; Display line number in the mode line (line-number-mode 1) ; Display line number in the mode line
(display-battery-mode -1) ; Display battery status in the mode line (display-battery-mode -1) ; Display battery status in the mode line
(display-time-mode 1) ; Display time in the mode line (display-time-mode 1) ; Display time in the mode line
(load-theme 'nord t) (load-theme 'nord t)
;; GLOBAL KEYS ;; GLOBAL KEYS
(global-set-key (kbd "C-c l") 'org-store-link) (global-set-key (kbd "C-c l") 'org-store-link)
(global-set-key (kbd "C-c a") 'org-agenda) (global-set-key (kbd "C-c a") 'org-agenda)
(global-set-key (kbd "C-c c") 'org-capture) (global-set-key (kbd "C-c c") 'org-capture)
(global-set-key (kbd "C-c b") 'org-switchb) (global-set-key (kbd "C-c b") 'org-switchb)
;; (global-set-key (kbd "C-c C-x m") 'org-pomodoro) ;; (global-set-key (kbd "C-c C-x m") 'org-pomodoro)
(global-set-key (kbd "C-x g") 'magit-status) (global-set-key (kbd "C-x g") 'magit-status)
(global-set-key (kbd "C-x M-g") 'magit-dispatch) (global-set-key (kbd "C-x M-g") 'magit-dispatch)
(global-set-key (kbd "M-i") 'imenu) (global-set-key (kbd "M-i") 'imenu)
(global-set-key (kbd "C-c n") 'newsticker-start) (global-set-key (kbd "C-c n") 'newsticker-start)
(global-set-key (kbd "M-o") 'ace-window) (global-set-key (kbd "M-o") 'ace-window)
;; UTF-8 FTW ;; UTF-8 FTW
(prefer-coding-system 'utf-8) (prefer-coding-system 'utf-8)
(set-default-coding-systems 'utf-8) (set-default-coding-systems 'utf-8)
(set-terminal-coding-system 'utf-8) (set-terminal-coding-system 'utf-8)
(set-keyboard-coding-system 'utf-8) (set-keyboard-coding-system 'utf-8)
(setq default-buffer-file-coding-system 'utf-8) (setq default-buffer-file-coding-system 'utf-8)
(defalias 'yes-or-no-p 'y-or-n-p) (defalias 'yes-or-no-p 'y-or-n-p)
;; PACKAGES ;; PACKAGES
(ivy-mode 1) (ivy-mode 1)
(use-package elpy (use-package elpy
:ensure t :ensure t
:init :init
(elpy-enable)) (elpy-enable))
(use-package js2-mode (use-package js2-mode
:ensure t :ensure t
:interpreter (("node" . js2-mode)) :interpreter (("node" . js2-mode))
:bind (:map js2-mode-map ("C-c C-p" . js2-print-json-path)) :bind (:map js2-mode-map ("C-c C-p" . js2-print-json-path))
@ -97,7 +97,7 @@
js2-mode-show-parse-errors nil js2-mode-show-parse-errors nil
js2-mode-show-strict-warnings nil)) js2-mode-show-strict-warnings nil))
(use-package web-mode (use-package web-mode
:ensure t :ensure t
:mode "\\.html?\\'" :mode "\\.html?\\'"
:init :init
@ -128,12 +128,12 @@
(get-text-property (point) 'block-side))))) (get-text-property (point) 'block-side)))))
(sp-local-pair 'web-mode "<" nil :when '(zakame/sp-web-mode-code-context-p))) (sp-local-pair 'web-mode "<" nil :when '(zakame/sp-web-mode-code-context-p)))
(use-package slime (use-package slime
:ensure t :ensure t
:config (setq inferior-lisp-program (executable-find "sbcl"))) :config (setq inferior-lisp-program (executable-find "sbcl")))
;; ORG_MODE SETTINGS ;; ORG_MODE SETTINGS
(setq org-agenda-dim-blocked-tasks nil (setq org-agenda-dim-blocked-tasks nil
org-agenda-inhibit-startup nil org-agenda-inhibit-startup nil
org-babel-load-languages (quote org-babel-load-languages (quote
((js . t) ((js . t)
@ -157,16 +157,17 @@
org-startup-truncated nil org-startup-truncated nil
org-todo-keywords (quote ((sequence "TODO" "FEEDBACK" "VERIFY" "|" "DONE" "DELEGATED"))) org-todo-keywords (quote ((sequence "TODO" "FEEDBACK" "VERIFY" "|" "DONE" "DELEGATED")))
org-use-property-inheritance nil) org-use-property-inheritance nil)
(org-clock-persistence-insinuate) (org-clock-persistence-insinuate)
;; HOOKS ;; HOOKS
(add-hook 'diary-display-hook 'fancy-diary-display) (add-hook 'diary-display-hook 'fancy-diary-display)
(add-hook 'today-visible-calendar-hook 'calendar-mark-today) (add-hook 'today-visible-calendar-hook 'calendar-mark-today)
(add-hook 'write-file-hooks 'delete-trailing-whitespace) (add-hook 'write-file-hooks 'delete-trailing-whitespace)
(add-hook 'org-mode-hook 'turn-on-auto-fill)
(add-hook 'rst-mode-hook 'turn-on-orgstruct) (add-hook 'org-mode-hook 'turn-on-auto-fill)
(add-hook 'newsticker-mode-hook 'imenu-add-menubar-index) (add-hook 'rst-mode-hook 'turn-on-orgstruct)
(add-to-list 'auto-mode-alist '("\\.tmpl\\'" . web-mode)) (add-hook 'newsticker-mode-hook 'imenu-add-menubar-index)
(add-to-list 'auto-mode-alist '("\\.tmpl\\'" . web-mode))
;; DIARY ;; DIARY
(setq cal-html-directory "~/Documents/Diary" (setq cal-html-directory "~/Documents/Diary"
@ -193,16 +194,25 @@
timeclock-file (concat docs-path "\\Diary\\timelog"))))) timeclock-file (concat docs-path "\\Diary\\timelog")))))
(provide 'calendar-settings) (provide 'calendar-settings)
(put 'narrow-to-region 'disabled nil)
(put 'narrow-to-page 'disabled nil)
;; SBCL
(defun win-set-sbcl ()
;; %USERPROFILE%\AppData\Local\Programs\emacs-26.2-x86_64\bin\emacsclientw.exe -c -n -a runemacs.exe
;; (setq inferior-lisp-program (executable-find "sbcl"))
(setq sbcl-exe (expand-file-name "~/AppData/Local/Programs/Steel Bank Common Lisp/1.4.14/sbcl.exe")
sbcl-core (expand-file-name "~/AppData/Local/Programs/Steel Bank Common Lisp/1.4.14/sbcl.core")
inferior-lisp-program "sbcl"
slime-lisp-implementations `((sbcl (,sbcl-exe "--core" ,sbcl-core)))))
(when (eq system-type 'windows-nt)
(win-set-sbcl))
(defun mk-write-mode-enable () (defun mk-write-mode-enable ()
(setq olivetti-body-width 73) (setq olivetti-body-width 73)
(setq mode-line-format nil) (setq mode-line-format nil)
(olivetti-mode)) (olivetti-mode))
(defun mk-write-mode-toggle () (defun mk-write-mode-toggle ()
(defvar mode-line-format-current (defvar mode-line-format-current
(symbol-value 'mode-line-format)) (symbol-value 'mode-line-format)))
;; Local Variables:
;; mode: emacs-lisp
;; coding: utf-8
;; fill-column: 79
;; End: