Compare commits
No commits in common. "b0840f4c9c7065c9a8e3a1ffae303700f10321a8" and "4a290a129a41a46165c0f8dd95b2e084ecf37dd5" have entirely different histories.
b0840f4c9c
...
4a290a129a
92
init.el
92
init.el
|
@ -31,10 +31,6 @@
|
||||||
inhibit-splash-screen t
|
inhibit-splash-screen t
|
||||||
custom-file (expand-file-name "custom.el" temporary-file-directory))
|
custom-file (expand-file-name "custom.el" temporary-file-directory))
|
||||||
|
|
||||||
(defun my-inhibit-hl-line-mode ()
|
|
||||||
"Disable `gobal-hl-line-mode' for the current buffer."
|
|
||||||
(setq-local global-hl-line-mode nil))
|
|
||||||
|
|
||||||
(use-package f
|
(use-package f
|
||||||
:demand t)
|
:demand t)
|
||||||
|
|
||||||
|
@ -205,7 +201,7 @@
|
||||||
(meow-normal-define-key '("?" . avy-goto-char-timer))))
|
(meow-normal-define-key '("?" . avy-goto-char-timer))))
|
||||||
|
|
||||||
(use-package puni
|
(use-package puni
|
||||||
:hook prog-mode tex-mode sly-mrepl-mode racket-repl-mode
|
:hook prog-mode tex-mode slime-repl-mode racket-repl-mode
|
||||||
:bind (:map puni-mode-map
|
:bind (:map puni-mode-map
|
||||||
("C-)" . puni-slurp-forward)
|
("C-)" . puni-slurp-forward)
|
||||||
("C-}" . puni-barf-forward)
|
("C-}" . puni-barf-forward)
|
||||||
|
@ -273,9 +269,6 @@
|
||||||
("\\.ts\\'" . typescript-ts-mode)
|
("\\.ts\\'" . typescript-ts-mode)
|
||||||
("\\.tsx\\'" . tsx-ts-mode)
|
("\\.tsx\\'" . tsx-ts-mode)
|
||||||
("\\.rs\\'" . rust-ts-mode)
|
("\\.rs\\'" . rust-ts-mode)
|
||||||
("\\.ya?ml\\'" . yaml-ts-mode)
|
|
||||||
("/Dockerfile\\'" . dockerfile-ts-mode)
|
|
||||||
("\\(/CMakeLists.txt\\|\\.cmake\\)\\'" . cmake-ts-mode)
|
|
||||||
:hook
|
:hook
|
||||||
(typescript-ts-mode . my--set-tab-width-2)
|
(typescript-ts-mode . my--set-tab-width-2)
|
||||||
(tsx-ts-mode . my--set-tab-width-2)
|
(tsx-ts-mode . my--set-tab-width-2)
|
||||||
|
@ -291,7 +284,6 @@
|
||||||
(add-to-list 'major-mode-remap-alist '(html-mode . html-ts-mode))
|
(add-to-list 'major-mode-remap-alist '(html-mode . html-ts-mode))
|
||||||
(add-to-list 'major-mode-remap-alist '(js-mode . js-ts-mode))
|
(add-to-list 'major-mode-remap-alist '(js-mode . js-ts-mode))
|
||||||
(add-to-list 'major-mode-remap-alist '(js-json-mode . json-ts-mode))
|
(add-to-list 'major-mode-remap-alist '(js-json-mode . json-ts-mode))
|
||||||
(add-to-list 'major-mode-remap-alist '(conf-toml-mode . toml-ts-mode))
|
|
||||||
:config
|
:config
|
||||||
(unless my-is-nixos
|
(unless my-is-nixos
|
||||||
(add-to-list 'treesit-extra-load-path (expand-file-name "tree-sitter-module/dist/"
|
(add-to-list 'treesit-extra-load-path (expand-file-name "tree-sitter-module/dist/"
|
||||||
|
@ -321,7 +313,7 @@
|
||||||
'(my-meow-undo meow-undo meow-undo-in-selection)))))
|
'(my-meow-undo meow-undo meow-undo-in-selection)))))
|
||||||
|
|
||||||
(use-package rainbow-delimiters
|
(use-package rainbow-delimiters
|
||||||
:hook prog-mode sly-mrepl-mode racket-repl-mode)
|
:hook prog-mode slime-repl-mode racket-repl-mode)
|
||||||
|
|
||||||
(use-package highlight-indent-guides
|
(use-package highlight-indent-guides
|
||||||
:hook prog-mode
|
:hook prog-mode
|
||||||
|
@ -359,7 +351,6 @@
|
||||||
(c++-ts-mode . eglot-ensure)
|
(c++-ts-mode . eglot-ensure)
|
||||||
(java-mode . eglot-ensure)
|
(java-mode . eglot-ensure)
|
||||||
(java-ts-mode . eglot-ensure)
|
(java-ts-mode . eglot-ensure)
|
||||||
(haskell-mode . eglot-ensure)
|
|
||||||
(lua-mode . eglot-ensure)
|
(lua-mode . eglot-ensure)
|
||||||
(nix-mode . eglot-ensure)
|
(nix-mode . eglot-ensure)
|
||||||
(js-mode . eglot-ensure)
|
(js-mode . eglot-ensure)
|
||||||
|
@ -368,12 +359,7 @@
|
||||||
(tsx-ts-mode . eglot-ensure)
|
(tsx-ts-mode . eglot-ensure)
|
||||||
:custom
|
:custom
|
||||||
(eglot-events-buffer-size 0)
|
(eglot-events-buffer-size 0)
|
||||||
(eglot-autoshutdown t)
|
(eglot-autoshutdown t))
|
||||||
(eglot-confirm-server-initiated-edits nil)
|
|
||||||
:config
|
|
||||||
(setq-default eglot-workspace-configuration
|
|
||||||
'((haskell
|
|
||||||
(formattingProvider . "floskell")))))
|
|
||||||
|
|
||||||
(use-package eglot-java
|
(use-package eglot-java
|
||||||
:hook java-mode java-ts-mode)
|
:hook java-mode java-ts-mode)
|
||||||
|
@ -487,7 +473,6 @@
|
||||||
:demand t
|
:demand t
|
||||||
:after dired
|
:after dired
|
||||||
:custom
|
:custom
|
||||||
(dired-auto-revert-buffer t)
|
|
||||||
(dirvish-attributes '(all-the-icons))
|
(dirvish-attributes '(all-the-icons))
|
||||||
:config
|
:config
|
||||||
(dirvish-override-dired-mode))
|
(dirvish-override-dired-mode))
|
||||||
|
@ -505,16 +490,12 @@
|
||||||
:config
|
:config
|
||||||
(pdf-tools-install))
|
(pdf-tools-install))
|
||||||
|
|
||||||
(defun my-double-space-sentence ()
|
|
||||||
(setq-local sentence-end-double-space t))
|
|
||||||
|
|
||||||
(use-package engrave-faces)
|
(use-package engrave-faces)
|
||||||
|
|
||||||
(use-package org
|
(use-package org
|
||||||
:hook
|
:hook
|
||||||
(org-mode . auto-fill-mode)
|
(org-mode . auto-fill-mode)
|
||||||
(org-mode . my-inhibit-hl-line-mode)
|
(org-mode . my-inhibit-hl-line-mode)
|
||||||
(org-mode . my-double-space-sentence)
|
|
||||||
:custom
|
:custom
|
||||||
(org-startup-indented t)
|
(org-startup-indented t)
|
||||||
(org-startup-with-inline-images t)
|
(org-startup-with-inline-images t)
|
||||||
|
@ -597,38 +578,24 @@
|
||||||
:bind ("C-c v" . envrc-command-map)
|
:bind ("C-c v" . envrc-command-map)
|
||||||
:hook (after-init . envrc-global-mode))
|
:hook (after-init . envrc-global-mode))
|
||||||
|
|
||||||
(use-package sly
|
(defun my-slime-repl-set-parens ()
|
||||||
|
(define-key slime-repl-mode-map (kbd "DEL") nil)
|
||||||
|
(local-set-key (kbd "DEL") #'backward-delete-char-untabify))
|
||||||
|
|
||||||
|
(use-package slime
|
||||||
|
:hook (slime-repl-mode . my-slime-repl-set-parens)
|
||||||
:custom
|
:custom
|
||||||
(sly-symbol-completion-mode nil)
|
(slime-contribs '(slime-fancy slime-repl))
|
||||||
|
(slime-lisp-implementations '((sbcl ("sbcl")
|
||||||
|
:coding-system utf-8-unix)))
|
||||||
:config
|
:config
|
||||||
(setq inferior-lisp-program "sbcl")
|
(setq inferior-lisp-program "sbcl")
|
||||||
(defun my--sly-add-project-root-to-asdf (old-init)
|
(with-eval-after-load 'meow
|
||||||
(let ((dir (if-let* ((proj (project-current))
|
(add-to-list 'meow-mode-state-list '(sldb-mode . motion))))
|
||||||
(root (project-root proj)))
|
|
||||||
root
|
|
||||||
default-directory)))
|
|
||||||
(if (directory-files dir nil "\\.asd\\'" t 1)
|
|
||||||
(let ((old-init-list (read old-init)))
|
|
||||||
(setf (cddadr old-init-list)
|
|
||||||
(cons `(push (pathname ,(sly-to-lisp-filename dir))
|
|
||||||
(symbol-value
|
|
||||||
(read-from-string "asdf:*central-registry*")))
|
|
||||||
(cddadr old-init-list)))
|
|
||||||
(format "%S\n\n" old-init-list))
|
|
||||||
old-init)))
|
|
||||||
(advice-add #'sly-init-using-asdf :filter-return #'my--sly-add-project-root-to-asdf)
|
|
||||||
(sly-setup))
|
|
||||||
|
|
||||||
(use-package sly-asdf)
|
|
||||||
(use-package sly-named-readtables)
|
|
||||||
|
|
||||||
(use-package racket-mode
|
(use-package racket-mode
|
||||||
:hook (racket-mode . racket-xp-mode))
|
:hook (racket-mode . racket-xp-mode))
|
||||||
|
|
||||||
(use-package haskell-mode
|
|
||||||
:custom
|
|
||||||
(haskell-process-show-debug-tips nil))
|
|
||||||
|
|
||||||
;; (use-package web-mode
|
;; (use-package web-mode
|
||||||
;; :mode ("\\.\\([jt]sx?\\|css\\)\\'" . web-mode)
|
;; :mode ("\\.\\([jt]sx?\\|css\\)\\'" . web-mode)
|
||||||
;; :custom
|
;; :custom
|
||||||
|
@ -719,6 +686,10 @@
|
||||||
vc-ignore-dir-regexp
|
vc-ignore-dir-regexp
|
||||||
tramp-file-name-regexp)))
|
tramp-file-name-regexp)))
|
||||||
|
|
||||||
|
(defun my-inhibit-hl-line-mode ()
|
||||||
|
"Disable `gobal-hl-line-mode' for the current buffer."
|
||||||
|
(setq-local global-hl-line-mode nil))
|
||||||
|
|
||||||
(use-package vterm
|
(use-package vterm
|
||||||
:bind
|
:bind
|
||||||
("C-c t" . vterm)
|
("C-c t" . vterm)
|
||||||
|
@ -778,7 +749,7 @@
|
||||||
:sasl-password ,(if (functionp secret)
|
:sasl-password ,(if (functionp secret)
|
||||||
(funcall secret)
|
(funcall secret)
|
||||||
secret)
|
secret)
|
||||||
:channels ("#guix" "#nonguix" "#emacs" "#nixos"))))))
|
:channels ("#guix" "#nonguix" "#shirakumo" "#emacs"))))))
|
||||||
(add-hook 'lui-mode-hook
|
(add-hook 'lui-mode-hook
|
||||||
(lambda ()
|
(lambda ()
|
||||||
(visual-line-mode)
|
(visual-line-mode)
|
||||||
|
@ -791,9 +762,7 @@
|
||||||
:hook (circe-server-connected . enable-circe-notifications))
|
:hook (circe-server-connected . enable-circe-notifications))
|
||||||
|
|
||||||
(use-package mpv)
|
(use-package mpv)
|
||||||
(use-package lingva
|
(use-package lingva)
|
||||||
:custom
|
|
||||||
(lingva-instance "lingva.garudalinux.org"))
|
|
||||||
|
|
||||||
(use-package mastodon
|
(use-package mastodon
|
||||||
:custom
|
:custom
|
||||||
|
@ -803,8 +772,7 @@
|
||||||
|
|
||||||
(use-package elfeed
|
(use-package elfeed
|
||||||
:custom
|
:custom
|
||||||
(elfeed-feeds '(("https://archlinux.org/feeds/news/" arch-linux)
|
(elfeed-feeds '(("https://archlinux.org/feeds/news/" arch-linux))))
|
||||||
("https://nixos.org/blog/announcements-rss.xml" nixos))))
|
|
||||||
|
|
||||||
(use-package xkcd)
|
(use-package xkcd)
|
||||||
|
|
||||||
|
@ -879,6 +847,9 @@
|
||||||
(message-citation-line-function #'message-insert-formatted-citation-line)
|
(message-citation-line-function #'message-insert-formatted-citation-line)
|
||||||
(message-kill-buffer-on-exit t))
|
(message-kill-buffer-on-exit t))
|
||||||
|
|
||||||
|
(defun my-double-space-sentence ()
|
||||||
|
(setq-local sentence-end-double-space t))
|
||||||
|
|
||||||
(use-package mu4e
|
(use-package mu4e
|
||||||
:if my-is-nixos
|
:if my-is-nixos
|
||||||
:ensure nil
|
:ensure nil
|
||||||
|
@ -972,8 +943,8 @@
|
||||||
:ensure nil
|
:ensure nil
|
||||||
:hook
|
:hook
|
||||||
(prog-mode . electric-pair-local-mode)
|
(prog-mode . electric-pair-local-mode)
|
||||||
(eval-expression-minibuffer-setup . electric-pair-local-mode)
|
(eval-expression-minibuffer-setup-mode . electric-pair-local-mode)
|
||||||
(sly-mrepl-mode . electric-pair-local-mode)
|
(slime-repl-mode . electric-pair-local-mode)
|
||||||
(racket-repl-mode . electric-pair-local-mode))
|
(racket-repl-mode . electric-pair-local-mode))
|
||||||
|
|
||||||
(use-package ffap
|
(use-package ffap
|
||||||
|
@ -991,10 +962,6 @@
|
||||||
:ensure nil
|
:ensure nil
|
||||||
:bind ("C-x C-b" . ibuffer))
|
:bind ("C-x C-b" . ibuffer))
|
||||||
|
|
||||||
(use-package info
|
|
||||||
:ensure nil
|
|
||||||
:hook (Info-mode . my-inhibit-hl-line-mode))
|
|
||||||
|
|
||||||
(use-package tool-bar
|
(use-package tool-bar
|
||||||
:ensure nil
|
:ensure nil
|
||||||
:config
|
:config
|
||||||
|
@ -1040,16 +1007,15 @@
|
||||||
|
|
||||||
(global-hl-line-mode)
|
(global-hl-line-mode)
|
||||||
|
|
||||||
(defun my-relative-linenum (&optional toggle)
|
(defun my-relative-linenum ()
|
||||||
"Simply enables relative line numbers."
|
"Simply enables relative line numbers."
|
||||||
(interactive "p")
|
(setq display-line-numbers 'relative))
|
||||||
(setq display-line-numbers (if (and toggle display-line-numbers) nil 'relative)))
|
|
||||||
(dolist (hook '(prog-mode-hook
|
(dolist (hook '(prog-mode-hook
|
||||||
conf-mode-hook))
|
conf-mode-hook))
|
||||||
(add-hook hook #'my-relative-linenum))
|
(add-hook hook #'my-relative-linenum))
|
||||||
|
|
||||||
(defun my-use-spaces-for-indent ()
|
(defun my-use-spaces-for-indent ()
|
||||||
"Simply turn off `indent-tabs-mode'."
|
"Simply turnoff `indent-tabs-mode'."
|
||||||
(setq indent-tabs-mode nil))
|
(setq indent-tabs-mode nil))
|
||||||
(dolist (hook '(emacs-lisp-mode-hook
|
(dolist (hook '(emacs-lisp-mode-hook
|
||||||
lisp-mode-hook
|
lisp-mode-hook
|
||||||
|
|
Loading…
Reference in a new issue