This commit is contained in:
~d6 2023-04-10 00:35:23 -04:00
parent d272db56c9
commit 48aacbe1ed
1 changed files with 34 additions and 6 deletions

40
init.el
View File

@ -210,6 +210,9 @@
;; distraction free writing
(use-package writeroom-mode)
;; better hex editing
(use-package nhexl-mode)
;; C-c <left> 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 ()