Repositories of Emacs-lisp packages.
(defvar gnutls-algorithm-priority "NORMAL:-VERS-TLS1.3")
(require 'package)
(setq package-archives '(("gnu" . "https://elpa.gnu.org/packages/")
("melpa" . "https://melpa.org/packages/")
("org" . "https://orgmode.org/elpa/")))
A purely functional package manager for an Emacs hacker.
(defvar bootstrap-version)
(let ((bootstrap-file
(expand-file-name "straight/repos/straight.el/bootstrap.el" user-emacs-directory))
(bootstrap-version 5))
(unless (file-exists-p bootstrap-file)
(with-current-buffer
(url-retrieve-synchronously
"https://raw.githubusercontent.com/raxod502/straight.el/develop/install.el"
'silent 'inhibit-cookies)
(goto-char (point-max))
(eval-print-last-sexp)))
(load bootstrap-file nil 'nomessage))
Bootstrapping use-package - A cool macro that can both speed-up and make tidier your config.
(straight-use-package 'use-package)
Try is a tool for trying packages in Emacs without installing them permanently.
(use-package try
:straight t)
If you don’t use Emacs in a server mode then you definitely doing something wrong.
(server-start)
A modern list library for Emacs.
(use-package dash
:straight t)
Sequence-manipulation functions that complement basic functions.
(use-package seq
:ensure nil)
*”Simple but effective sorting and filtering for Emacs.”*
(use-package prescient
:straight t
:custom
(prescient-filter-method '(literal regexp initialism))
:config
(prescient-persist-mode t))
Here’s an interface for it to work with company.
(use-package company-prescient
:straight t
:after company
:config
(company-prescient-mode t))
…and with Selectrum
(use-package selectrum-prescient
:straight t
:after selectrum
:config
(selectrum-prescient-mode t))
…and with ivy
(use-package ivy-prescient
:straight t
:after ivy
:config
(ivy-prescient-mode t))
Common-lisp extensions for Emacs.
(use-package cl-lib
:ensure nil)
(use-package emacs
:ensure nil
:init
(put 'narrow-to-page 'disabled nil)
(put 'narrow-to-region 'disabled nil)
(put 'downcase-region 'disabled nil)
:custom
(use-dialog-box nil "Dialogs via minibuffer only.")
(tool-bar-mode nil "Disable toolbar.")
(menu-bar-mode nil "Disable menubar.")
(scroll-bar-mode nil "Disable scrollbar.")
(blink-cursor-mode nil "Disable cursor blinking.")
(scroll-step 1 "Scroll line by line.")
(scroll-margin 4 "Top and bottom scrolling margin.")
(inhibit-splash-screen t "Don't show the splash screen.")
(indicate-empty-lines t "Visually indicate empty lines.")
(indent-tabs-mode nil "Tabs are evil.")
(tab-width 4 "Sane default for me.")
(confirm-kill-processes nil "Don't bother confirming killing processes"))
(use-package simple
:ensure nil
:config
(defalias 'yes-or-no-p 'y-or-n-p)
:custom
(line-number-mode nil)
(column-number-mode nil)
(display-line-numbers-type 'relative)
(global-display-line-numbers-mode t ))
(use-package doom-themes
:straight t
:config
(load-theme 'doom-one t))
(use-package faces
:ensure nil
:config
(set-face-attribute 'default
nil
:family "Source Code Variable"
:weight 'semi-light
:width 'semi-condensed
:height 145))
(when (display-graphic-p)
(use-package highlight-indent-guides
:diminish
:functions (ivy-cleanup-string
my-ivy-cleanup-indentation)
:commands highlight-indent-guides--highlighter-default
:functions my-indent-guides-for-all-but-first-column
;; :hook (prog-mode . highlight-indent-guides-mode)
:init (setq highlight-indent-guides-method 'character
highlight-indent-guides-responsive 'top)
:config
;; Don't display indentations while editing with `company'
(with-eval-after-load 'company
(add-hook 'company-completion-started-hook
(lambda (&rest _)
"Trun off indentation highlighting."
(when highlight-indent-guides-mode
(highlight-indent-guides-mode -1))))
(add-hook 'company-after-completion-hook
(lambda (&rest _)
"Trun on indentation highlighting."
(when (and (derived-mode-p 'prog-mode)
(not highlight-indent-guides-mode))
(highlight-indent-guides-mode 1)))))
;; Don't display first level of indentation
(defun my-indent-guides-for-all-but-first-column (level responsive display)
(unless (< level 1)
(highlight-indent-guides--highlighter-default level responsive display)))
(setq highlight-indent-guides-highlighter-function
#'my-indent-guides-for-all-but-first-column)
Don’t display indentation in swiper.
(with-eval-after-load 'ivy
(defun my-ivy-cleanup-indentation (str)
"Clean up indentation highlighting in ivy minibuffer."
(let ((pos 0)
(next 0)
(limit (length str))
(prop 'highlight-indent-guides-prop))
(while (and pos next)
(setq next (text-property-not-all pos limit prop nil str))
(when next
(setq pos (text-property-any next limit prop nil str))
(ignore-errors
(remove-text-properties next pos '(display nil face nil) str))))))
(advice-add #'ivy-cleanup-string :after #'my-ivy-cleanup-indentation))))
(use-package doom-modeline
:straight t
:custom
(doom-modeline-height '50)
:config
(doom-modeline-mode t))
(use-package diminish
:straight t
:config
(diminish 'flycheck-mode)
(diminish 'counsel-mode)
(diminish 'ivy-mode)
(diminish 'text-scale-mode)
(diminish 'beacon-mode)
(diminish 'auto-fill-function)
(diminish 'which-key-mode))
(use-package all-the-icons
:if window-system
:straight t
:defer t)
(use-package all-the-icons-dired
:if window-system
:straight t
:hook
(dired-mode . all-the-icons-dired-mode))
(use-package all-the-icons-ivy
:if window-system
:straight t
:after ivy
:custom
(all-the-icons-ivy-buffer-commands '() "Don't use for buffers.")
:config
(unless (file-exists-p "~/.local/share/fonts/all-the-icons.ttf")
(all-the-icons-install-fonts t)
(all-the-icons-ivy-setup)))
* “Here your cursor is” *
(use-package beacon
:straight t
:config
(beacon-mode t))
A cool dashboard to see every time I load muh Emacs.
(use-package dashboard
:straight t
:config
(dashboard-setup-startup-hook)
;; Set the title
(setq dashboard-banner-logo-title "Welcome to Emacs, thermo-nuclear Man-Machine Interface for Texual data. Happy Hacking.")
;; Set the banner
(setq dashboard-startup-banner 'logo)
(setq dashboard-center-content t)
(setq dashboard-items '((recents . 5)
(bookmarks . 5))))
Distraction-free mode.
(use-package darkroom
:straight t)
(use-package focus
:straight t)
(use-package flycheck
:straight t
:config
(global-flycheck-mode t))
(use-package frame
:ensure nil
:after general
:general
;; Disable suspending
("C-z" . nil)
("C-z C-z" . nil))
(use-package ace-window
:straight t)
(use-package avy
:straight t
:custom
(avy-style 'words))
General.el is a cool interface for making key bindings.
(use-package general
:straight t)
* “Make bindings that stick around” *
(use-package hydra
:straight t)
Hydra integration with use-package.
(use-package use-package-hydra
:straight t)
(use-package evil
:straight t
:preface
(defun save-and-kill-this-buffer ()
(interactive)
(save-buffer)
(kill-this-buffer))
:config
(with-eval-after-load 'evil-maps ; avoid conflict with company tooltip selection
(define-key evil-insert-state-map (kbd "C-n") nil)
(define-key evil-insert-state-map (kbd "C-p") nil))
(evil-ex-define-cmd "q" #'kill-this-buffer)
(evil-ex-define-cmd "wq" #'save-and-kill-this-buffer)
(undo-tree-mode nil)
(evil-mode t))
(evil-want-keybinding 'nil)
(use-package evil-collection
:straight t)
A nice little tool to remind you about what keys do you want to press.
(use-package which-key
:straight t
:config
(which-key-mode t)
(setq which-key-idle-delay 0.4
which-key-idle-secondary-delay 0.4))
(use-package rg
:straight t)
Ag is a faster grep
(use-package ag
:straight t)
Not configured yet
(use-package paredit
:straight t
:general
('paredit-mode-map
";" 'nil)
:hook
((scheme-mode lisp-mode clojure-mode emacs-lisp-mode) . paredit-mode))
Not configured yet.
(use-package parinfer
:straight t
:general
('parinfer-mode-map
";" 'nil)
:hook
((scheme-mode lisp-mode clojure-mode emacs-lisp-mode) . parinfer-mode))
(use-package rainbow-delimiters
:straight t
:hook
(prog-mode . rainbow-delimiters-mode))
Short and sweet lisp editing Not configured yet
(use-package lispy
:straight t)
Not configured yet
(use-package sly
:straight t
:custom
(inferior-lisp-program "sbcl"))
(use-package ivy
:straight t
:general
('ivy-mode-map
"C-j" 'ivy-previous-line
"C-l" 'ivy-next-line
"TAB" 'ivy-partial-or-done)
:config
(ivy-mode t))
(use-package ivy-rich
:after counsel
:straight t
:config
(ivy-rich-mode t))
Amx is used by Counsel-M-x
.
(use-package amx
:straight t
:defer t)
Counsel itself.
(use-package counsel
:straight t
:bind
(([remap insert-char] . counsel-unicode-char)
([remap isearch-forward] . counsel-grep-or-swiper))
:init
(counsel-mode))
(use-package swiper
:straight t)
I don’t use that one anymore.
(use-package selectrum
:straight t
:config
(selectrum-mode t))
(use-package company
:straight t
:config
(setq company-idle-delay 0)
(setq company-minimum-prefix-length 1)
(setq company-selection-wrap-around t)
(company-tng-configure-default)
:hook
(after-init . global-company-mode))
(use-package elec-pair
:config
(electric-pair-mode t))
Helpful provides better Emacs “help” buffer
(use-package helpful
:straight t)
(use-package vterm
:straight t)
(use-package org
:ensure nil
:hook
(org-mode . auto-fill-mode))
(use-package org-pretty-table
:straight (org-pretty-table :type git :host github :repo "Fuco1/org-pretty-table")
:hook
(org-mode . org-pretty-table-mode))
For viewing Pointless-Document-Format docs in Emacs.
(use-package pdf-tools
:straight t)
Dired is a built-in Emacs file manager.
(use-package dired
:ensure nil)
Extra dired things
(use-package dired-x
:ensure nil)
(use-package dired-subtree
:straight t
:after dired
:bind
(:map dired-mode-map
("t" . dired-subtree-toggle)))
Image preview support for dired.
(use-package image-dired
:ensure nil)
(use-package image-dired+
:straight t
:after image-dired)
Hide dotfiles in dired buffers.
(use-package dired-hide-dotfiles
:straight t
:bind
(:map dired-mode-map
("." . dired-hide-dotfiles-mode))
:hook
(dired-mode . dired-hide-dotfiles-mode))
Asynchronous dired
(use-package async
:straight t
:defer t
:init
(dired-async-mode t))
(use-package files
:ensure nil
:custom
(require-final-newline t)
(delete-old-versions t)
(backup-directory-alist
`((".*" . ,(expand-file-name (concat user-emacs-directory "autosaves/")))))
(auto-save-file-name-transforms
`((".*" ,(expand-file-name (concat user-emacs-directory "autosaves/")) t)))
(insert-default-directory nil))
(use-package magit
:straight t
:config
;; Add binding in SPC-commands hydra.
(defhydra+ hydra-space-commands ()
("m" magit)))
I don’t use M-x customize
insterface, so custom-file is set to /dev/null.
(use-package cus-edit
:ensure nil
:custom
(custom-file "/dev/null"))