Compare commits
10 commits
4a290a129a
...
b0840f4c9c
Author | SHA1 | Date | |
---|---|---|---|
b0840f4c9c | |||
71985c76ad | |||
dceb1f6243 | |||
7638d181e5 | |||
6ab04f3dce | |||
20eaed7051 | |||
010825f326 | |||
0e8a092a92 | |||
d9c6ffeb56 | |||
799ad215dc |
92
init.el
92
init.el
|
@ -31,6 +31,10 @@
|
|||
inhibit-splash-screen t
|
||||
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
|
||||
:demand t)
|
||||
|
||||
|
@ -201,7 +205,7 @@
|
|||
(meow-normal-define-key '("?" . avy-goto-char-timer))))
|
||||
|
||||
(use-package puni
|
||||
:hook prog-mode tex-mode slime-repl-mode racket-repl-mode
|
||||
:hook prog-mode tex-mode sly-mrepl-mode racket-repl-mode
|
||||
:bind (:map puni-mode-map
|
||||
("C-)" . puni-slurp-forward)
|
||||
("C-}" . puni-barf-forward)
|
||||
|
@ -269,6 +273,9 @@
|
|||
("\\.ts\\'" . typescript-ts-mode)
|
||||
("\\.tsx\\'" . tsx-ts-mode)
|
||||
("\\.rs\\'" . rust-ts-mode)
|
||||
("\\.ya?ml\\'" . yaml-ts-mode)
|
||||
("/Dockerfile\\'" . dockerfile-ts-mode)
|
||||
("\\(/CMakeLists.txt\\|\\.cmake\\)\\'" . cmake-ts-mode)
|
||||
:hook
|
||||
(typescript-ts-mode . my--set-tab-width-2)
|
||||
(tsx-ts-mode . my--set-tab-width-2)
|
||||
|
@ -284,6 +291,7 @@
|
|||
(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-json-mode . json-ts-mode))
|
||||
(add-to-list 'major-mode-remap-alist '(conf-toml-mode . toml-ts-mode))
|
||||
:config
|
||||
(unless my-is-nixos
|
||||
(add-to-list 'treesit-extra-load-path (expand-file-name "tree-sitter-module/dist/"
|
||||
|
@ -313,7 +321,7 @@
|
|||
'(my-meow-undo meow-undo meow-undo-in-selection)))))
|
||||
|
||||
(use-package rainbow-delimiters
|
||||
:hook prog-mode slime-repl-mode racket-repl-mode)
|
||||
:hook prog-mode sly-mrepl-mode racket-repl-mode)
|
||||
|
||||
(use-package highlight-indent-guides
|
||||
:hook prog-mode
|
||||
|
@ -351,6 +359,7 @@
|
|||
(c++-ts-mode . eglot-ensure)
|
||||
(java-mode . eglot-ensure)
|
||||
(java-ts-mode . eglot-ensure)
|
||||
(haskell-mode . eglot-ensure)
|
||||
(lua-mode . eglot-ensure)
|
||||
(nix-mode . eglot-ensure)
|
||||
(js-mode . eglot-ensure)
|
||||
|
@ -359,7 +368,12 @@
|
|||
(tsx-ts-mode . eglot-ensure)
|
||||
:custom
|
||||
(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
|
||||
:hook java-mode java-ts-mode)
|
||||
|
@ -473,6 +487,7 @@
|
|||
:demand t
|
||||
:after dired
|
||||
:custom
|
||||
(dired-auto-revert-buffer t)
|
||||
(dirvish-attributes '(all-the-icons))
|
||||
:config
|
||||
(dirvish-override-dired-mode))
|
||||
|
@ -490,12 +505,16 @@
|
|||
:config
|
||||
(pdf-tools-install))
|
||||
|
||||
(defun my-double-space-sentence ()
|
||||
(setq-local sentence-end-double-space t))
|
||||
|
||||
(use-package engrave-faces)
|
||||
|
||||
(use-package org
|
||||
:hook
|
||||
(org-mode . auto-fill-mode)
|
||||
(org-mode . my-inhibit-hl-line-mode)
|
||||
(org-mode . my-double-space-sentence)
|
||||
:custom
|
||||
(org-startup-indented t)
|
||||
(org-startup-with-inline-images t)
|
||||
|
@ -578,24 +597,38 @@
|
|||
:bind ("C-c v" . envrc-command-map)
|
||||
:hook (after-init . envrc-global-mode))
|
||||
|
||||
(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)
|
||||
(use-package sly
|
||||
:custom
|
||||
(slime-contribs '(slime-fancy slime-repl))
|
||||
(slime-lisp-implementations '((sbcl ("sbcl")
|
||||
:coding-system utf-8-unix)))
|
||||
(sly-symbol-completion-mode nil)
|
||||
:config
|
||||
(setq inferior-lisp-program "sbcl")
|
||||
(with-eval-after-load 'meow
|
||||
(add-to-list 'meow-mode-state-list '(sldb-mode . motion))))
|
||||
(defun my--sly-add-project-root-to-asdf (old-init)
|
||||
(let ((dir (if-let* ((proj (project-current))
|
||||
(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
|
||||
:hook (racket-mode . racket-xp-mode))
|
||||
|
||||
(use-package haskell-mode
|
||||
:custom
|
||||
(haskell-process-show-debug-tips nil))
|
||||
|
||||
;; (use-package web-mode
|
||||
;; :mode ("\\.\\([jt]sx?\\|css\\)\\'" . web-mode)
|
||||
;; :custom
|
||||
|
@ -686,10 +719,6 @@
|
|||
vc-ignore-dir-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
|
||||
:bind
|
||||
("C-c t" . vterm)
|
||||
|
@ -749,7 +778,7 @@
|
|||
:sasl-password ,(if (functionp secret)
|
||||
(funcall secret)
|
||||
secret)
|
||||
:channels ("#guix" "#nonguix" "#shirakumo" "#emacs"))))))
|
||||
:channels ("#guix" "#nonguix" "#emacs" "#nixos"))))))
|
||||
(add-hook 'lui-mode-hook
|
||||
(lambda ()
|
||||
(visual-line-mode)
|
||||
|
@ -762,7 +791,9 @@
|
|||
:hook (circe-server-connected . enable-circe-notifications))
|
||||
|
||||
(use-package mpv)
|
||||
(use-package lingva)
|
||||
(use-package lingva
|
||||
:custom
|
||||
(lingva-instance "lingva.garudalinux.org"))
|
||||
|
||||
(use-package mastodon
|
||||
:custom
|
||||
|
@ -772,7 +803,8 @@
|
|||
|
||||
(use-package elfeed
|
||||
: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)
|
||||
|
||||
|
@ -847,9 +879,6 @@
|
|||
(message-citation-line-function #'message-insert-formatted-citation-line)
|
||||
(message-kill-buffer-on-exit t))
|
||||
|
||||
(defun my-double-space-sentence ()
|
||||
(setq-local sentence-end-double-space t))
|
||||
|
||||
(use-package mu4e
|
||||
:if my-is-nixos
|
||||
:ensure nil
|
||||
|
@ -943,8 +972,8 @@
|
|||
:ensure nil
|
||||
:hook
|
||||
(prog-mode . electric-pair-local-mode)
|
||||
(eval-expression-minibuffer-setup-mode . electric-pair-local-mode)
|
||||
(slime-repl-mode . electric-pair-local-mode)
|
||||
(eval-expression-minibuffer-setup . electric-pair-local-mode)
|
||||
(sly-mrepl-mode . electric-pair-local-mode)
|
||||
(racket-repl-mode . electric-pair-local-mode))
|
||||
|
||||
(use-package ffap
|
||||
|
@ -962,6 +991,10 @@
|
|||
:ensure nil
|
||||
:bind ("C-x C-b" . ibuffer))
|
||||
|
||||
(use-package info
|
||||
:ensure nil
|
||||
:hook (Info-mode . my-inhibit-hl-line-mode))
|
||||
|
||||
(use-package tool-bar
|
||||
:ensure nil
|
||||
:config
|
||||
|
@ -1007,15 +1040,16 @@
|
|||
|
||||
(global-hl-line-mode)
|
||||
|
||||
(defun my-relative-linenum ()
|
||||
(defun my-relative-linenum (&optional toggle)
|
||||
"Simply enables relative line numbers."
|
||||
(setq display-line-numbers 'relative))
|
||||
(interactive "p")
|
||||
(setq display-line-numbers (if (and toggle display-line-numbers) nil 'relative)))
|
||||
(dolist (hook '(prog-mode-hook
|
||||
conf-mode-hook))
|
||||
(add-hook hook #'my-relative-linenum))
|
||||
|
||||
(defun my-use-spaces-for-indent ()
|
||||
"Simply turnoff `indent-tabs-mode'."
|
||||
"Simply turn off `indent-tabs-mode'."
|
||||
(setq indent-tabs-mode nil))
|
||||
(dolist (hook '(emacs-lisp-mode-hook
|
||||
lisp-mode-hook
|
||||
|
|
Loading…
Reference in a new issue