From 0b981a6ee6ca01210aeb5d58d6025509bc6f95fa Mon Sep 17 00:00:00 2001 From: wizard Date: Tue, 28 Jan 2020 08:36:50 -0500 Subject: [PATCH] Lots of changes --- config.org | 172 +++++++++++++++++++++++++++++++++++++++---------------------- 1 file changed, 111 insertions(+), 61 deletions(-) diff --git a/config.org b/config.org index 61d1012..fbcac42 100644 --- a/config.org +++ b/config.org @@ -7,6 +7,11 @@ Like notifications :body "Electronic Macros loading...") (message "Emacs initializing...") #+END_SRC +and sclang, if avaliable +#+BEGIN_SRC emacs-lisp + (add-to-list 'load-path "/usr/local/bin/sclang") + (require 'sclang) +#+END_SRC ** Helper Functions #+BEGIN_SRC emacs-lisp (defun wiz-kill-all-buffers () @@ -86,9 +91,9 @@ When you open a code block, close that block. ** Fonts Set the font to something cool #+BEGIN_SRC emacs-lisp - ;; (set-default-font "terminus-12") + ;; (set-default-font "Go Mono-11") (add-to-list 'default-frame-alist - '(font . "IBM Plex Mono-11") + '(font . "Go Mono-11") '(font . "Noto Sans Mono CJK JP-11")) #+END_SRC @@ -142,6 +147,7 @@ Enable lines when editing files (add-hook 'text-mode-hook 'display-line-numbers-mode) (add-hook 'prog-mode-hook 'display-line-numbers-mode) + (add-hook 'sclang-mode-hook 'display-line-numbers-mode) (add-hook 'conf-mode-hook 'display-line-numbers-mode) (setq display-line-numbers-grow-only t) @@ -256,9 +262,9 @@ Set the org mode directory and define some capture templates (setq org-default-notes-file "notes.org") #+END_SRC ** set browser -Default browser should be qutebrowser +Default browser should be firefox #+BEGIN_SRC emacs-lisp - (setq browse-url-generic-program "qutebrowser" + (setq browse-url-generic-program "firefox" browse-url-browser-program 'browse-url-generic browse-url-default-browser 'browse-url-generic browse-url-browser-function 'browse-url-generic @@ -337,12 +343,12 @@ Note: this requires base16-themes (defun theme-callback (event) (wiz-apply-theme)) - (require 'filenotify) - (file-notify-add-watch - wiz-theme-file '(change) 'theme-callback) - + ;; (require 'filenotify) + ;; (file-notify-add-watch + ;; wiz-theme-file '(change) 'theme-callback) + ;; Set the theme on startup - (wiz-apply-theme) + ;; (wiz-apply-theme) #+END_SRC *** TODO Move this to the base16 config ** tramp @@ -354,6 +360,10 @@ Enable a spellchecker #+BEGIN_SRC emacs-lisp (add-hook 'org-mode-hook 'flyspell-mode) #+END_SRC +** calc +#+BEGIN_SRC emacs-lisp +;; (add-to-list 'evil-emacs-state-modes 'calc-mode) +#+END_SRC * Package Repo Config ** Repo Location Let's start by configuring the repositories @@ -485,7 +495,7 @@ hit =e= to do that. ***** l - misc #+BEGIN_SRC emacs-lisp -(general-create-definer wiz-misc-def +(wiz-misc-def :keymaps 'override :states 'normal :prefix "SPC l") @@ -493,13 +503,13 @@ hit =e= to do that. ***** w - window #+BEGIN_SRC emacs-lisp -(general-create-definer wiz-window-def - :keymaps 'override - :states 'normal - :prefix "SPC w") + ;; (wiz-window-def + ;; :keymaps 'override + ;; :states 'normal + ;; :prefix "SPC w") -(wiz-window-def -"o" 'delete-other-windows) + (wiz-window-def + "o" 'delete-other-windows) #+END_SRC ***** ibuffer @@ -510,16 +520,27 @@ hit =e= to do that. #+END_SRC ***** Terminal #+BEGIN_SRC emacs-lisp - (wiz-leader-def - "RET" 'eshell) +(wiz-leader-def + "RET" 'eshell) #+END_SRC ***** Dired #+BEGIN_SRC emacs-lisp - (wiz-file-def - "d" 'dired) +(wiz-file-def + "d" 'dired) #+END_SRC +***** sclang-mode +#+BEGIN_SRC emacs-lisp + ;; (defun wiz-sclang-eval-region () "do nothing for now") + (general-define-key + :keymaps 'sclang-mode-map + "C-c C-d" 'sclang-eval-defun + "C-c C-c" 'sclang-eval-region-or-line) + (wiz-major-def + :keymaps 'sclang-mode-map + "SPC" 'sclang-eval-region-or-line) +#+END_SRC *** Vim bindings Let's get some vim up in here. **** evil @@ -613,13 +634,13 @@ Evil is pretty much the entirety of Vim in Emacs. :general ;; I'm still not too satisfied with these but whateves (:keymaps '(insert normal visual) - "M-l" 'sp-forward-slurp-sexp - "M-n" 'sp-backward-slurp-sexp - "M-." 'sp-forward-barf-sexp - "M-l" 'sp-backward-barf-sexp) + "M-." 'sp-forward-slurp-sexp + "M-l" 'sp-backward-slurp-sexp + "M-n" 'sp-forward-barf-sexp + "M-h" 'sp-backward-barf-sexp) :init ;; Start this shiznit when emacs starts yea boy it's good B) - (smartparens-global-strict-mode) + ;; (smartparens-global-strict-mode) :config (require 'smartparens-config)) #+END_SRC @@ -722,7 +743,7 @@ pinged. # :init # (beacon-mode 1)) # #+END_SRC -*** ranger file manager +*** ranger file manager (DISABLED) Let's not use this for now # #+BEGIN_SRC emacs-lisp # (use-package ranger @@ -738,6 +759,12 @@ Let's not use this for now # ranger-literal-preview nil # ranger-override-dired-mode 'ranger)) # #+END_SRC +*** w3m +#+BEGIN_SRC emacs-lisp +(use-package w3m + :ensure t) +#+END_SRC + ** Autocompletion *** Fuzzy matching Ivy, swiper, and counsel all provide fuzzy-matching on different emacs @@ -761,12 +788,11 @@ operations. :ensure t :demand t :general - (:keymaps 'override - :states 'normal + (:keymaps 'normal "/" 'swiper ;; For some reason, searching with swiper causes these to be reversed. - "N" 'evil-search-previous - "n" 'evil-search-next)) + "n" 'evil-search-previous + "N" 'evil-search-next)) (use-package ivy-rich :after ivy @@ -800,7 +826,6 @@ operations. :ensure t) #+END_SRC - *** Code completion [[https://company-mode.github.io/][company]] comlpetes anything in the buffer @@ -862,8 +887,7 @@ use =ga= and =gA= to hint letters n stuff. (use-package avy :ensure t :general - (:keymaps 'override - :states 'normal + (:states 'normal "ga" 'avy-goto-char-in-line "gA" 'avy-goto-char)) @@ -996,7 +1020,7 @@ Irony handles enhanced C / C++ operations powered by clang (add-to-list 'company-backends 'company-irony)) #+END_SRC *** Python -**** jedi for autocompletion sources n stuff +**** TODO jedi for autocompletion sources n stuff #+BEGIN_SRC emacs-lisp (use-package company-jedi :ensure t @@ -1103,12 +1127,26 @@ Show completions for shell mode buffers (use-package sclang-snippets :ensure t) #+END_SRC -*** Arch Linux PKGBUILD +*** OS DSL +**** Arch Linux PKGBUILD #+BEGIN_SRC emacs-lisp (use-package pkgbuild-mode - :ensure t - :defer t) + :ensure t) #+END_SRC +**** Nix +#+BEGIN_SRC emacs-lisp +(use-package nix-mode + :ensure t) +#+END_SRC +**** Puppet +#+BEGIN_SRC emacs-lisp +(use-package puppet-mode + :pin melpa + :ensure t) +#+END_SRC + +#+RESULTS: + ** IRC Internet relay chat. It's where hackers go to communicate. Think of it like two boats in a shipping channel. @@ -1237,14 +1275,14 @@ like two boats in a shipping channel. (erc-update-modules)) ;; Display images as links in a channel - (use-package erc-image - :after erc - :ensure t - :defer t - :init - (add-to-list 'erc-modules 'image) - :config - (erc-update-modules)) + ;; (use-package erc-image + ;; :after erc + ;; :ensure t + ;; :defer t + ;; :init + ;; (add-to-list 'erc-modules 'image) + ;; :config + ;; (erc-update-modules)) ;; (use-package ercn ;; :pin melpa @@ -1267,22 +1305,27 @@ like two boats in a shipping channel. #+END_SRC ** Ledger #+BEGIN_SRC emacs-lisp - (use-package ledger-mode - :ensure t - :mode ("\\.dat\\'" - "\\.ledger\\'") - ;; :general - ;; (wiz-file-def - ;; :keymap 'ledger-mode-map - ;; "w" 'wiz-ledger-save) - :preface - (defun wiz-ledger-save () - "Automatically clean the ledger buffer at each save." - (interactive) - (save-excursion - (when (buffer-modified-p) - (with-demoted-errors (ledger-mode-clean-buffer)) - (save-buffer))))) +(use-package ledger-mode + :ensure t + :init + (setq ledger-clear-whole-transactions 1) + :config + (add-to-list 'evil-emacs-state-modes 'ledger-report-mode) + ;; remove evil mode from ledger reports + :mode ("\\.dat\\'" + "\\.ledger\\'") + ;; :general + ;; (wiz-file-def + ;; :keymap 'ledger-mode-map + ;; "w" 'wiz-ledger-save) + :preface + (defun wiz-ledger-save () + "Automatically clean the ledger buffer at each save." + (interactive) + (save-excursion + (when (buffer-modified-p) + (with-demoted-errors (ledger-mode-clean-buffer)) + (save-buffer))))) #+END_SRC ** pass I use [[https://www.passwordstore.org/][=pass=]] for my password management. @@ -1323,6 +1366,13 @@ Enables usage of docker from within emacs, and supports dockerfiles :ensure t) #+END_SRC +** Themes +#+BEGIN_SRC emacs-lisp +(use-package base16 + :ensure t + :init + (load-theme 'base16-black-metal-mayhem)) +#+END_SRC * Final Touches Display a [[https://xkcd.com/37/][sick ass-message]] on the desktop to verify that dbus is good and all is well in the wold