193 lines
4.5 KiB
EmacsLisp
193 lines
4.5 KiB
EmacsLisp
;; set default font
|
|
(when (member "Fantasque Sans Mono" (font-family-list))
|
|
(set-face-attribute 'default nil :font "Fantasque Sans Mono-16")
|
|
(set-face-attribute 'mode-line nil :font "Fantasque Sans Mono-11")
|
|
(set-face-attribute 'mode-line-inactive nil :font "Fantasque Sans Mono-10"))
|
|
|
|
;; Always use slant for italic, not underline
|
|
'(italic ((t (:slant italic))))
|
|
|
|
;;;; Load my packages
|
|
;;Default theme
|
|
(use-package zenburn-theme
|
|
:config
|
|
(load-theme 'zenburn t))
|
|
|
|
;; My desktop environment
|
|
;; EXWM
|
|
;(use-package exwm
|
|
; :config
|
|
; (load "~/.emacs.d/elisp/exwm-setup.el"))
|
|
|
|
;; modeline
|
|
;; configure the default one
|
|
(load "~/.emacs.d/elisp/modeline-setup.el")
|
|
;; then use doom-modeline
|
|
(use-package all-the-icons)
|
|
(use-package doom-modeline
|
|
:config
|
|
(setq doom-modeline-buffer-encoding nil)
|
|
:hook
|
|
(after-init . doom-modeline-mode))
|
|
|
|
(use-package dashboard
|
|
:straight t
|
|
:config
|
|
(dashboard-setup-startup-hook))
|
|
|
|
;; Multimedia
|
|
;(use-package emms
|
|
; :config
|
|
; (load "~/.emacs.d/elisp/emms-mpd-setup.el"))
|
|
|
|
;; Reading
|
|
(use-package nov
|
|
:config
|
|
(add-to-list 'auto-mode-alist '("\\.epub\\'" . nov-mode)))
|
|
(use-package pdf-tools
|
|
:config
|
|
(pdf-tools-install))
|
|
|
|
;; Disk usage analyzer
|
|
(use-package disk-usage)
|
|
|
|
;; Mail reader
|
|
;; This package was installed with debian, I hope this works
|
|
(use-package
|
|
'(mu4e :files (:defaults "mu4e/*.el"))
|
|
:config
|
|
(load "~/.emacs.d/elisp/mu4e-setup.el"))
|
|
;; mail notification in modeline
|
|
(use-package mu4e-alert
|
|
:after mu4e
|
|
:init
|
|
(setq mu4e-alert-interesting-mail-query "flag:unread maildir:/posteo/INBOX")
|
|
:hook
|
|
(after-init . mu4e-alert-enable-mode-line-display))
|
|
;; dashboard for mu4e
|
|
;(use-package mu4e-dashboard
|
|
; :straight
|
|
; (mu4e-dashboard :type git :host github :repo "rougier/mu4e-dashboard"))
|
|
|
|
;; Orthodox file browser
|
|
(use-package sunrise-commander)
|
|
;; open files in external applications
|
|
;;(use-package openwith
|
|
;; :config
|
|
;; (load "~/.emacs.d/elisp/openwith-setup.el"))
|
|
|
|
;; Read Gopher and Gemini
|
|
(use-package elpher)
|
|
|
|
;; Read feeds
|
|
(use-package elfeed)
|
|
;; elfeed dashboard
|
|
(use-package elfeed-dashboard
|
|
:straight
|
|
(elfeed-dashboard :type git :host github :repo "Manoj321/elfeed-dashboard")
|
|
:config
|
|
(setq elfeed-dashboard-file "~/.emacs.d/elfeed-dashboard.org")
|
|
;; update feed counts on elfeed-quit
|
|
(advice-add 'elfeed-search-quit-window :after #'elfeed-dashboard-update-links))
|
|
|
|
;; Write gemtext
|
|
(use-package gemini-mode)
|
|
|
|
;; Interface with guix package manager
|
|
(use-package guix)
|
|
|
|
;; Programming environment
|
|
;; We need colors in eshell
|
|
(use-package xterm-color)
|
|
|
|
;; git
|
|
(use-package magit)
|
|
|
|
;;R
|
|
(use-package auto-complete)
|
|
(use-package ess
|
|
:config
|
|
(load "~/.emacs.d/elisp/ess-setup.el"))
|
|
|
|
;;Javascript
|
|
(use-package js2-mode
|
|
:config
|
|
(add-to-list 'auto-mode-alist '("\\.js\\'" . js2-mode)))
|
|
(use-package js2-refactor)
|
|
(use-package xref-js2)
|
|
(use-package rjsx-mode)
|
|
(use-package company)
|
|
(use-package company-tern)
|
|
(load "~/.emacs.d/elisp/javascript.el")
|
|
|
|
;;Typescript
|
|
(use-package tide
|
|
:config
|
|
(load "~/.emacs.d/elisp/typescript.el"))
|
|
|
|
;;Purescript
|
|
(use-package psc-ide
|
|
:config
|
|
(load "~/.emacs.d/elisp/purescript.el"))
|
|
|
|
(use-package org-brain
|
|
:disabled
|
|
:init
|
|
(setq org-brain-path "~/repos/csphy/drafts")
|
|
:config
|
|
(load "~/.emacs.d/elisp/org-brain-setup.el"))
|
|
|
|
;;Common Lisp
|
|
(use-package slime
|
|
:disabled
|
|
:config
|
|
(load "~/.emacs.d/elisp/slime-setup.el"))
|
|
|
|
;;Rust
|
|
(use-package rust-mode
|
|
:config
|
|
(load "~/.emacs.d/elisp/rust-setup.el"))
|
|
|
|
;; Haskell
|
|
(use-package haskell-mode)
|
|
|
|
;; Racket
|
|
(use-package racket-mode)
|
|
|
|
;;Org
|
|
(use-package org)
|
|
(use-package org-ref)
|
|
(load "~/.emacs.d/elisp/org-setup.el")
|
|
|
|
;;Ivy related stuff
|
|
(use-package ivy)
|
|
(use-package ivy-bibtex)
|
|
(use-package counsel)
|
|
(use-package swiper)
|
|
(load "~/.emacs.d/elisp/ivy-setup.el")
|
|
|
|
;;TRAMP
|
|
(load "~/.emacs.d/elisp/tramp-setup.el")
|
|
(load "~/.emacs.d/elisp/outline-keymap.el")
|
|
(load "~/.emacs.d/elisp/bibtex-setup.el")
|
|
(load "~/.emacs.d/elisp/keypad.el")
|
|
|
|
;; from https://www.anghyflawn.net/blog/2014/emacs-give-a-doi-get-a-bibtex-entry/
|
|
(defun get-bibtex-from-doi (doi)
|
|
"Get a BibTeX entry from the DOI"
|
|
(interactive "MDOI: ")
|
|
(let ((url-mime-accept-string "text/bibliography;style=bibtex"))
|
|
(with-current-buffer
|
|
(url-retrieve-synchronously
|
|
(format "http://dx.doi.org/%s"
|
|
(replace-regexp-in-string "http://dx.doi.org/" "" doi)))
|
|
(switch-to-buffer (current-buffer))
|
|
(goto-char (point-max))
|
|
(setq bibtex-entry
|
|
(buffer-substring
|
|
(string-match "@" (buffer-string))
|
|
(point)))
|
|
(kill-buffer (current-buffer))))
|
|
(insert (decode-coding-string bibtex-entry 'utf-8))
|
|
(bibtex-fill-entry))
|