From 48aacbe1edb9d8d3176c2c89e39d2f28b2ef7ad7 Mon Sep 17 00:00:00 2001 From: d6 Date: Mon, 10 Apr 2023 00:35:23 -0400 Subject: [PATCH] updates --- init.el | 40 ++++++++++++++++++++++++++++++++++------ 1 file changed, 34 insertions(+), 6 deletions(-) diff --git a/init.el b/init.el index 802d1fe..2c1053a 100644 --- a/init.el +++ b/init.el @@ -210,6 +210,9 @@ ;; distraction free writing (use-package writeroom-mode) +;; better hex editing +(use-package nhexl-mode) + ;; C-c restore old buffer view after popups (use-package winner :config (winner-mode 1)) @@ -255,7 +258,7 @@ :config (add-hook 'after-init-hook 'global-company-mode)) (defvar use-lsp) -(setq use-lsp (equal (system-name) "cult")) +(setq use-lsp nil) ;; when not using lsp use hippie expand (when (not use-lsp) @@ -427,6 +430,8 @@ ;; ;; git-timemachine ;; (use-package git-timemachine) +(use-package haskell-mode) + ;; json (use-package json-mode) @@ -442,7 +447,25 @@ :host github :repo "non/uxntal-mode") :bind ("C-c d" . uxntal-explain-word) - :config (setq uxntal-mode-strict-comments nil)) + :bind ("C-c C-c" . compile) + :config (setq uxntal-mode-strict-comments nil) + (setq compilation-read-command nil)) + + +;; Helper for compilation. Close the compilation window if +;; there was no error at all. +(defun compilation-exit-autoclose (status code msg) + ;; If M-x compile exists with a 0 + (when (and (eq status 'exit) (zerop code)) + ;; then bury the *compilation* buffer, so that C-x b doesn't go there + (bury-buffer) + ;; and delete the *compilation* window + (delete-window (get-buffer-window (get-buffer "*compilation*")))) + ;; Always return the anticipated result of compilation-exit-message-function + (cons msg code)) + +;; Specify my function (maybe I should have done a lambda function) +(setq compilation-exit-message-function 'compilation-exit-autoclose) ;; lua (use-package lua-mode) @@ -453,9 +476,6 @@ :host github :repo "Kaali/pico8-mode")) -;; C-c C-c for M-x compile -(global-set-key "\C-c\C-c" 'compile) - ;; bazel (use-package bazel :straight (bazel :type git @@ -514,6 +534,8 @@ :config (setq elpher-default-url-type "gemini://")) +(use-package gemini-mode) + ;; mastodon (use-package mastodon :config @@ -523,6 +545,10 @@ mastodon-media--avatar-height 40 mastodon-media--enable-image-caching t)) +;; read RFCs +(use-package rfc-mode + :config + (setq rfc-mode-directory (expand-file-name "~/w/rfc/"))) ;; ;; pdf/latex ;; (use-package doc-view @@ -548,7 +574,9 @@ (setq-default indent-tabs-mode nil tab-width 4 c-basic-offset 4) -(add-hook 'prog-mode-hook (lambda () (setq show-trailing-whitespace t))) +(add-hook 'prog-mode-hook + (lambda () (progn + (setq show-trailing-whitespace t)))) ;; handy function to toggle tabs (defun toggle-indent-tabs ()