2021-05-16 15:40:41 +00:00
|
|
|
;; Automatically update packages and removes old ones.
|
2020-12-30 00:08:12 +00:00
|
|
|
(use-package auto-package-update
|
|
|
|
:ensure t
|
|
|
|
:config
|
|
|
|
(setq auto-package-update-delete-old-versions t)
|
|
|
|
(setq auto-package-update-hide-results t)
|
2021-05-16 15:40:41 +00:00
|
|
|
(auto-package-update-maybe))
|
2021-01-30 23:14:36 +00:00
|
|
|
|
2021-05-16 15:40:41 +00:00
|
|
|
;; Light theme for using laptop outside.
|
2021-04-09 15:56:51 +00:00
|
|
|
(use-package basic-theme
|
|
|
|
:ensure t)
|
|
|
|
|
2021-05-16 15:40:41 +00:00
|
|
|
;;; Languages
|
2020-12-08 14:12:05 +00:00
|
|
|
(use-package haskell-mode
|
|
|
|
:ensure t
|
2021-05-16 15:40:41 +00:00
|
|
|
:config
|
|
|
|
(setq haskell-interactive-popup-errors nil)
|
2020-12-08 14:12:05 +00:00
|
|
|
:init
|
|
|
|
(add-hook 'haskell-mode-hook 'interactive-haskell-mode))
|
2020-12-10 16:05:32 +00:00
|
|
|
|
2021-01-28 21:26:52 +00:00
|
|
|
(use-package geiser
|
2021-04-28 18:08:51 +00:00
|
|
|
:ensure t
|
|
|
|
:config
|
2021-05-16 15:40:41 +00:00
|
|
|
;; Make geiser flash the region being evaluated on C-c C-c, like SLIME does.
|
2021-04-28 18:08:51 +00:00
|
|
|
(add-hook 'geiser-mode-hook
|
|
|
|
(lambda ()
|
|
|
|
(define-key geiser-mode-map (kbd "C-c C-c") nil) ;; remove default C-c C-c binding
|
|
|
|
(local-set-key (kbd "C-c C-c") (lambda ()
|
|
|
|
(interactive)
|
2021-05-16 15:40:41 +00:00
|
|
|
(fez/flash-region)
|
|
|
|
(geiser-eval-definition)))))
|
|
|
|
;; geiser requires extra packages for every implementation you want to use
|
|
|
|
(use-package geiser-guile
|
2021-05-04 12:42:01 +00:00
|
|
|
:ensure t)
|
2021-05-16 15:40:41 +00:00
|
|
|
(use-package geiser-mit
|
|
|
|
:ensure t)
|
|
|
|
(use-package geiser-chez
|
|
|
|
:ensure t))
|
2021-05-04 12:42:01 +00:00
|
|
|
|
2021-05-27 15:51:41 +00:00
|
|
|
(use-package sly
|
2021-04-09 15:56:51 +00:00
|
|
|
:ensure t
|
|
|
|
:config
|
2021-05-27 15:51:41 +00:00
|
|
|
(setq inferior-lisp-program "sbcl")
|
2021-05-27 18:28:10 +00:00
|
|
|
(add-hook 'sly-mode-hook
|
|
|
|
(lambda ()
|
|
|
|
(defun sly-flash-region (start end)
|
2021-06-03 09:34:57 +00:00
|
|
|
(fez/flash-region))
|
|
|
|
(defun sly-mrepl-default-prompt (_package
|
|
|
|
nickname
|
|
|
|
error-level
|
|
|
|
entry-idx
|
|
|
|
_condition)
|
|
|
|
"SLY REPL prompt."
|
|
|
|
(concat
|
|
|
|
(when (cl-plusp error-level)
|
|
|
|
(concat (sly-make-action-button
|
|
|
|
(format "[%d]" error-level)
|
|
|
|
#'sly-db-pop-to-debugger-maybe)
|
|
|
|
" "))
|
|
|
|
(propertize
|
|
|
|
(concat (number-to-string entry-idx) ":" nickname "> ")
|
|
|
|
'face 'sly-mrepl-prompt-face
|
2021-06-06 19:38:04 +00:00
|
|
|
'font-lock-face 'sly-mrepl-prompt-face))))))
|
2021-04-09 15:56:51 +00:00
|
|
|
|
2021-05-16 15:40:41 +00:00
|
|
|
;; Amazing s-expression editing mode.
|
2021-06-27 10:44:56 +00:00
|
|
|
(use-package lispy
|
2021-03-17 11:51:55 +00:00
|
|
|
:ensure t
|
|
|
|
:config
|
2021-06-27 10:44:56 +00:00
|
|
|
(add-hook 'scheme-mode-hook 'lispy-mode)
|
|
|
|
(add-hook 'lisp-mode-hook 'lispy-mode)
|
|
|
|
(add-hook 'emacs-lisp-mode-hook 'lispy-mode))
|
2021-03-17 11:51:55 +00:00
|
|
|
|
2021-05-16 15:40:41 +00:00
|
|
|
;;; Utility packages
|
|
|
|
;; undo-tree is mainly used for its redo functionality.
|
2021-02-23 11:53:35 +00:00
|
|
|
(use-package undo-tree
|
|
|
|
:ensure t
|
|
|
|
:bind
|
|
|
|
("C-_" . 'undo-tree-undo)
|
|
|
|
("M-_" . 'undo-tree-redo)
|
|
|
|
:config
|
2021-03-17 11:51:55 +00:00
|
|
|
(global-undo-tree-mode))
|
2021-01-28 21:26:52 +00:00
|
|
|
|
2021-05-16 15:40:41 +00:00
|
|
|
;; Nice startup screen.
|
2020-12-14 15:14:53 +00:00
|
|
|
(use-package dashboard
|
2020-12-10 16:05:32 +00:00
|
|
|
:ensure t
|
2020-12-14 15:14:53 +00:00
|
|
|
:config
|
|
|
|
(setq dashboard-banner-logo-title "")
|
2021-06-03 09:34:57 +00:00
|
|
|
(setq dashboard-startup-banner 3) ; add own image?
|
2020-12-14 15:14:53 +00:00
|
|
|
(setq dashboard-center-content t)
|
|
|
|
(setq dashboard-set-footer nil)
|
|
|
|
(dashboard-setup-startup-hook))
|
2020-12-15 12:03:18 +00:00
|
|
|
|
2021-05-16 15:40:41 +00:00
|
|
|
;; Easier selection for s-expressions and other things.
|
2020-12-17 05:54:31 +00:00
|
|
|
(use-package expand-region
|
|
|
|
:ensure t
|
2021-05-16 15:40:41 +00:00
|
|
|
:bind
|
|
|
|
("C-=" . er/expand-region)
|
2020-12-17 05:54:31 +00:00
|
|
|
:config
|
|
|
|
(pending-delete-mode t)) ; if you start typing while a word is selected, overwrite it
|
2020-12-20 10:02:24 +00:00
|
|
|
|
2021-05-16 15:40:41 +00:00
|
|
|
;; Multiple cursors make it easier to refactor stuff.
|
2021-02-23 11:46:16 +00:00
|
|
|
(use-package multiple-cursors
|
|
|
|
:ensure t
|
|
|
|
:config
|
2021-05-28 10:34:36 +00:00
|
|
|
(global-set-key (kbd "C->") 'mc/mark-next-like-this)
|
|
|
|
(setq mc/always-run-for-all t))
|
2021-02-23 11:46:16 +00:00
|
|
|
|
2020-12-30 00:08:12 +00:00
|
|
|
;; avy - jump around files more easily
|
|
|
|
(use-package avy
|
|
|
|
:ensure t
|
|
|
|
:bind ("M-s" . avy-goto-char))
|
|
|
|
|
2021-05-16 15:40:41 +00:00
|
|
|
;; Amazing git porcelain.
|
2020-12-24 11:27:57 +00:00
|
|
|
(use-package magit
|
|
|
|
:ensure t)
|
2021-02-23 11:46:16 +00:00
|
|
|
|
2021-05-16 15:40:41 +00:00
|
|
|
;; Minibuffer completion. Vertical display and faster than ido.
|
|
|
|
(use-package selectrum
|
|
|
|
:ensure t
|
|
|
|
:config
|
|
|
|
(selectrum-mode t))
|
|
|
|
|
|
|
|
;; better incremental search with minibuffer
|
|
|
|
(use-package swiper
|
|
|
|
:ensure t
|
|
|
|
:bind ("C-s" . 'swiper))
|
|
|
|
|
|
|
|
;; Instead of opening windows inside of Emacs, create new frames. This is great
|
|
|
|
;; for tiling window managers.
|
|
|
|
(use-package frames-only-mode
|
2021-02-23 11:46:16 +00:00
|
|
|
:ensure t
|
|
|
|
:config
|
2021-05-16 15:40:41 +00:00
|
|
|
(frames-only-mode))
|
2021-02-23 11:46:16 +00:00
|
|
|
|
2021-05-16 15:40:41 +00:00
|
|
|
;; Mode for browsing gemini/gopher sites.
|
|
|
|
(use-package elpher
|
|
|
|
:ensure t)
|
2021-03-17 11:51:55 +00:00
|
|
|
|
2021-05-28 10:42:44 +00:00
|
|
|
;; Highlight parentheses for Lisp
|
|
|
|
(use-package highlight-parentheses
|
|
|
|
:ensure t
|
|
|
|
:config
|
|
|
|
(add-hook 'scheme-mode-hook 'highlight-parentheses-mode)
|
|
|
|
(add-hook 'lisp-mode-hook 'highlight-parentheses-mode)
|
|
|
|
(add-hook 'emacs-lisp-mode-hook 'highlight-parentheses-mode))
|
|
|
|
|
2021-05-28 10:34:36 +00:00
|
|
|
;; org-mode
|
2021-05-17 16:01:52 +00:00
|
|
|
(use-package org
|
|
|
|
:ensure t
|
2021-06-16 22:27:18 +00:00
|
|
|
:bind
|
|
|
|
("C-c o c" . org-capture)
|
2021-05-17 16:01:52 +00:00
|
|
|
:config
|
|
|
|
;;; org-capture
|
|
|
|
;; Default location for org-capture is ~/org/notes.org
|
|
|
|
(setq org-default-notes-file (concat org-directory "/notes.org"))
|
|
|
|
(setq org-capture-templates
|
|
|
|
'(("t" "Task" entry (file+headline "~/org/tasks.org" "Tasks")
|
|
|
|
"* TODO %?\n %i\n %a")
|
|
|
|
("j" "Journal" entry (file+datetree "~/org/journal.org")
|
|
|
|
"* %?\nEntered on %U\n %i\n %a")))
|
2021-06-16 22:27:18 +00:00
|
|
|
(setq org-link-frame-setup '((vm . vm-visit-folder-other-frame)
|
|
|
|
(vm-imap . vm-visit-imap-folder-other-frame)
|
|
|
|
(gnus . org-gnus-no-new-news)
|
|
|
|
(file . find-file)
|
|
|
|
(wl . wl-other-frame))))
|
2021-05-17 16:01:52 +00:00
|
|
|
|
2021-06-03 09:34:57 +00:00
|
|
|
;; Notes
|
|
|
|
(use-package org-roam
|
|
|
|
:ensure t
|
2021-06-16 22:27:18 +00:00
|
|
|
:bind
|
|
|
|
("C-c o i" . org-roam-jump-to-index)
|
2021-07-17 17:35:14 +00:00
|
|
|
("C-c o n" . fez/org-roam-new-note)
|
|
|
|
:init
|
2021-06-03 09:34:57 +00:00
|
|
|
(setq org-roam-directory "~/Documents/org-roam"))
|
|
|
|
|
|
|
|
;; better shell-command
|
|
|
|
(use-package shell-command+
|
|
|
|
:ensure t
|
|
|
|
:config
|
|
|
|
(global-set-key (kbd "M-!") 'shell-command+))
|
|
|
|
|
2021-07-17 17:35:14 +00:00
|
|
|
;; Jump to definitions without tags
|
|
|
|
(use-package dumb-jump
|
|
|
|
:ensure t
|
|
|
|
:init
|
|
|
|
(add-hook 'xref-backend-functions 'dumb-jump-xref-activate)
|
|
|
|
(setq xref-show-definitions-function 'xref-show-definitions-completing-read))
|
|
|
|
|
2021-06-27 10:44:56 +00:00
|
|
|
;; Snippets
|
|
|
|
(use-package yasnippet
|
|
|
|
:ensure t
|
|
|
|
:config
|
|
|
|
(setq yas-snippet-dirs '("~/.emacs.d/snippets"))
|
|
|
|
(yas-global-mode 1))
|
|
|
|
|
2021-02-23 11:46:16 +00:00
|
|
|
(provide 'packages)
|