Updating dotfiles.

This commit is contained in:
Derek Taylor
2020-09-29 16:28:27 -05:00
parent e8ae19d7ad
commit af5b75ee4d
204 changed files with 1870 additions and 2063 deletions

View File

@@ -70,44 +70,117 @@ URxvt*depth: 32
! Palenight Xresources palette
!! COLORS
! special
URxvt*foreground: #bbc5ff
URxvt*background: [95]#282a36
URxvt*cursorColor: #bbc5ff
!!URxvt*foreground: #bbc5ff
!!URxvt*background: [95]#282a36
!!URxvt*cursorColor: #bbc5ff
!!
!!XTerm*foreground: #bbc5ff
!!XTerm*background: #282a36
!!XTerm*cursorColor: #bbc5ff
!!
!!! black
!!*.color0: #101010 !! originally #292d3e
!!*.color8: #434758
!!
!!! red
!!*.color1: #f07178
!!*.color9: #ff8b92
!!
!!! green
!!*.color2: #c3e88d
!!*.color10: #ddffa7
!!
!!! yellow
!!*.color3: #ffcb6b
!!*.color11: #ffe585
!!
!!! blue
!!*.color4: #82aaff
!!*.color12: #9cc4ff
!!
!!! magenta
!!*.color5: #c792ea
!!*.color13: #e1acff
!!
!!! cyan
!!*.color6: #89ddff
!!*.color14: #a3f7ff
!!
!!! white
!!*.color7: #d0d0d0
!!*.color15: #ffffff
!!! special
!!*.foreground: #bbc2cf
!!*.background: #282c34
!!*.cursorColor: #bbc2cf
!!
!!! black
!!*.color0: #1c1f24
!!*.color8: #5b6268
!!
!!! red
!!*.color1: #ff6c6b
!!*.color9: #da8548
!!
!!! green
!!*.color2: #98be65
!!*.color10: #4db5bd
!!
!!! yellow
!!*.color3: #da8548
!!*.color11: #ecbe7b
!!
!!! blue
!!*.color4: #51afef
!!*.color12: #2257a0
!!
!!! magenta
!!*.color5: #c678dd
!!*.color13: #a9a1e1
!!
!!! cyan
!!*.color6: #5699af
!!*.color14: #46d9ff
!!
!!! white
!!*.color7: #202328
!!*.color15: #dfdfdf
!!
XTerm*foreground: #bbc5ff
XTerm*background: #282a36
XTerm*cursorColor: #bbc5ff
! special
*.foreground: #bbc2cf
*.background: #282c34
*.cursorColor: #bbc2cf
! black
*.color0: #101010 !! originally #292d3e
*.color8: #434758
*.color0: #1c1f24
*.color8: #5b6268
! red
*.color1: #f07178
*.color9: #ff8b92
*.color1: #ff6c6b
*.color9: #da8548
! green
*.color2: #c3e88d
*.color10: #ddffa7
*.color2: #98be65
*.color10: #4db5bd
! yellow
*.color3: #ffcb6b
*.color11: #ffe585
*.color3: #da8548
*.color11: #ecbe7b
! blue
*.color4: #82aaff
*.color12: #9cc4ff
*.color4: #51afef
*.color12: #3071db
! magenta
*.color5: #c792ea
*.color13: #e1acff
*.color5: #c678dd
*.color13: #a9a1e1
! cyan
*.color6: #89ddff
*.color14: #a3f7ff
*.color6: #5699af
*.color14: #46d9ff
! white
*.color7: #d0d0d0
*.color15: #ffffff
*.color7: #202328
*.color15: #dfdfdf

View File

@@ -117,7 +117,7 @@ font:
# family: UbuntuMono Nerd Font
# family: Monofur Nerd Font
# family: TerminessTTF Nerd Font
family: Mononoki Nerd Font
family: SauceCodePro Nerd Font
# The `style` can be specified to pick a specific face.
style: Regular
@@ -136,7 +136,7 @@ font:
# family: UbuntuMono Nerd Font
# family: Monofur Nerd Font
# family: TerminessTTF Nerd Font
family: Mononoki Nerd Font
family: SauceCodePro Nerd Font
# The `style` can be specified to pick a specific face.
style: Bold
@@ -155,7 +155,7 @@ font:
# family: UbuntuMono Nerd Font
# family: Monofuritalic Nerd Font Mono
# family: TerminessTTF Nerd Font
family: Mononoki Nerd Font
family: SauceCodePro Nerd Font
# The `style` can be specified to pick a specific face.
style: Italic
@@ -174,7 +174,7 @@ font:
# family: UbuntuMono Nerd Font
# family: Monofuritalic Nerd Font Mono
# family: TerminessTTF Nerd Font
family: Mononoki Nerd Font
family: SauceCodePro Nerd Font
# The `style` can be specified to pick a specific face.
style: Bold Italic
@@ -185,7 +185,7 @@ font:
# Offset is the extra space around each character. `offset.y` can be thought of
# as modifying the line spacing, and `offset.x` as modifying the letter spacing.
offset:
x: 1
x: 0
y: 1
# Glyph offset determines the locations of the glyphs within their cells with
@@ -212,14 +212,14 @@ font:
#use_thin_strokes: true
# If `true`, bold text is drawn using the bright color variants.
#draw_bold_text_with_bright_colors: true
draw_bold_text_with_bright_colors: true
# Colors (Tomorrow Night Bright)
colors:
# Default colors
primary:
background: '0x292d3e'
foreground: '0xbbc5ff'
background: '0x282c34'
foreground: '0xbbc2cf'
# Bright and dim foreground colors
#
@@ -243,30 +243,30 @@ colors:
# background is unset, selection color will be the inverse of the cell colors.
# If only text is unset the cell text color will remain the same.
selection:
text: '0x292d3e'
background: '0xbbc5ff'
text: '0xbbc2cf'
background: '0x282c34'
# Normal colors
normal:
black: '0x292d3e'
red: '0xf07178'
green: '0xc3e88d'
yellow: '0xffcb6b'
blue: '0x82aaff'
magenta: '0xc792ea'
cyan: '0x89ddff'
white: '0xd0d0d0'
black: '0x1c1f24'
red: '0xff6c6b'
green: '0x98be65'
yellow: '0xda8548'
blue: '0x51afef'
magenta: '0xc678dd'
cyan: '0x5699af'
white: '0x202328'
# Bright colors
bright:
black: '0x434758'
red: '0xff8b92'
green: '0xddffa7'
yellow: '0xffe585'
blue: '0x9cc4ff'
magenta: '0xe1acff'
cyan: '0xa3f7ff'
white: '0xffffff'
black: '0x5b6268'
red: '0xda8548'
green: '0x4db5bd'
yellow: '0xecbe7b'
blue: '0x3071db' # This is 2257a0 in Doom Emacs but I lightened it.
magenta: '0xa9a1e1'
cyan: '0x46d9ff'
white: '0xdfdfdf'
# Dim colors
#

View File

@@ -42,7 +42,7 @@
'Active' - where the active window is -->
</placement>
<theme>
<name>Adapta-Nokto</name>
<name>dt-dark-theme</name>
<titleLayout>CSIML</titleLayout>
<!--
available characters are NDSLIMC, each can occur at most once.

View File

@@ -10,7 +10,6 @@
(in-package :stumpwm)
;;; Startup Programs
;;; Set Background
(run-shell-command "nitrogen --restore")
@@ -49,14 +48,14 @@
stumpwm:*normal-border-width* 1
)
(stumpwm:set-focus-color "#7799CC")
(stumpwm:grename "Alpha")
(stumpwm:gnewbg "Beta")
(stumpwm:gnewbg "Tau")
(stumpwm:gnewbg "Pi")
(stumpwm:gnewbg "Zeta")
(stumpwm:gnewbg "Teta")
(stumpwm:gnewbg "Phi")
(stumpwm:gnewbg "Rho")
(stumpwm:grename "One")
(stumpwm:gnewbg "Two")
(stumpwm:gnewbg "Three")
(stumpwm:gnewbg "Four")
(stumpwm:gnewbg "Five")
(stumpwm:gnewbg "Six")
(stumpwm:gnewbg "Seven")
(stumpwm:gnewbg "Eight")
(stumpwm:toggle-mode-line (stumpwm:current-screen) (stumpwm:current-head))
;; change the prefix key to something else
@@ -106,7 +105,7 @@
(define-key *root-map* (kbd "i") "imdb")
;; Message window font
(set-font "-xos4-terminus-medium-r-normal--14-140-72-72-c-80-iso8859-14")
(set-font "-xos4-terminus-medium-r-normal--13-140-72-72-c-80-iso8859-14")
;;; Define window placement policy...

View File

@@ -7,8 +7,8 @@ Config { font = "xft:Ubuntu:weight=bold:pixelsize=11:antialias=true:hinting=t
, "xft:Mononoki Nerd Font:pixelsize=16:antialias=true:hinting=true"
, "xft:FontAwesome:pixelsize=13"
]
, bgColor = "#292d3e"
, fgColor = "#f07178"
, bgColor = "#282c34"
, fgColor = "#ff6c6b"
, position = Static { xpos = 0 , ypos = 0, width = 1920, height = 24 }
, lowerOnStart = True
, hideOnStart = False
@@ -37,5 +37,5 @@ Config { font = "xft:Ubuntu:weight=bold:pixelsize=11:antialias=true:hinting=t
]
, sepChar = "%"
, alignSep = "}{"
, template = " <action=`xdotool key control+alt+g`><icon=haskell_20.xpm/> </action><fc=#666666> |</fc> %UnsafeStdinReader% }{ <fc=#666666><fn=2>|</fn> </fc><fc=#b3afc2><fn=1></fn> %uname% </fc><fc=#666666> <fn=2>|</fn></fc> <fc=#FFB86C> %cpu% </fc><fc=#666666> <fn=2>|</fn></fc> <fc=#FF5555> %memory% </fc><fc=#666666> <fn=2>|</fn></fc> <fc=#82AAFF> %disku% </fc><fc=#666666> <fn=2>|</fn></fc> <fc=#c3e88d> %enp6s0% </fc><fc=#666666> <fn=2>|</fn></fc> <fc=#e1acff><fn=1></fn> %pacupdate% </fc><fc=#666666> <fn=2>|</fn></fc> <fc=#8BE9FD> %date% </fc>"
, template = " <action=`xdotool key control+alt+g`><icon=haskell_20.xpm/> </action><fc=#666666> |</fc> %UnsafeStdinReader% }{ <fc=#666666><fn=2>|</fn> </fc><fc=#b3afc2><fn=1></fn> %uname% </fc><fc=#666666> <fn=2>|</fn></fc> <fc=#ecbe7b> %cpu% </fc><fc=#666666> <fn=2>|</fn></fc> <fc=#ff6c6b> %memory% </fc><fc=#666666> <fn=2>|</fn></fc> <fc=#51afef> %disku% </fc><fc=#666666> <fn=2>|</fn></fc> <fc=#98be65> %enp6s0% </fc><fc=#666666> <fn=2>|</fn></fc> <fc=#c678dd><fn=1></fn> %pacupdate% </fc><fc=#666666> <fn=2>|</fn></fc> <fc=#46d9ff> %date% </fc>"
}

View File

@@ -7,8 +7,8 @@ Config { font = "xft:Ubuntu:weight=bold:pixelsize=11:antialias=true:hinting=t
, "xft:Mononoki Nerd Font:pixelsize=16:antialias=true:hinting=true"
, "xft:FontAwesome:pixelsize=13"
]
, bgColor = "#292d3e"
, fgColor = "#f07178"
, bgColor = "#282c34"
, fgColor = "#ff6c6b"
, position = Static { xpos = 3840 , ypos = 0, width = 1920, height = 24 }
, lowerOnStart = True
, hideOnStart = False
@@ -37,5 +37,5 @@ Config { font = "xft:Ubuntu:weight=bold:pixelsize=11:antialias=true:hinting=t
]
, sepChar = "%"
, alignSep = "}{"
, template = " <action=`xdotool key control+alt+g`><icon=haskell_20.xpm/> </action><fc=#666666> |</fc> %UnsafeStdinReader% }{ <fc=#666666><fn=2>|</fn> </fc><fc=#b3afc2><fn=1></fn> %uname% </fc><fc=#666666> <fn=2>|</fn></fc> <fc=#FFB86C> %cpu% </fc><fc=#666666> <fn=2>|</fn></fc> <fc=#FF5555> %memory% </fc><fc=#666666> <fn=2>|</fn></fc> <fc=#82AAFF> %disku% </fc><fc=#666666> <fn=2>|</fn></fc> <fc=#c3e88d> %enp6s0% </fc><fc=#666666> <fn=2>|</fn></fc> <fc=#e1acff><fn=1></fn> %pacupdate% </fc><fc=#666666> <fn=2>|</fn></fc> <fc=#8BE9FD> %date% </fc>"
, template = " <action=`xdotool key control+alt+g`><icon=haskell_20.xpm/> </action><fc=#666666> |</fc> %UnsafeStdinReader% }{ <fc=#666666><fn=2>|</fn> </fc><fc=#b3afc2><fn=1></fn> %uname% </fc><fc=#666666> <fn=2>|</fn></fc> <fc=#ecbe7b> %cpu% </fc><fc=#666666> <fn=2>|</fn></fc> <fc=#ff6c6b> %memory% </fc><fc=#666666> <fn=2>|</fn></fc> <fc=#51afef> %disku% </fc><fc=#666666> <fn=2>|</fn></fc> <fc=#98be65> %enp6s0% </fc><fc=#666666> <fn=2>|</fn></fc> <fc=#c678dd><fn=1></fn> %pacupdate% </fc><fc=#666666> <fn=2>|</fn></fc> <fc=#46d9ff> %date% </fc>"
}

View File

@@ -3,12 +3,12 @@
-- you can find weather location codes here: http://weather.noaa.gov/index.html
Config { font = "xft:Ubuntu:weight=bold:pixelsize=11:antialias=true:hinting=true"
, additionalFonts = [ "xft:Mononoki Nerd Font:pixelsize=11:antialias=true:hinting=true"
, "xft:Mononoki Nerd Font:pixelsize=16:antialias=true:hinting=true"
, additionalFonts = [ "xft:SauceCodePro Nerd Font:pixelsize=11:antialias=true:hinting=true"
, "xft:SauceCodePro Nerd Font:pixelsize=16:antialias=true:hinting=true"
, "xft:FontAwesome:pixelsize=13"
]
, bgColor = "#292d3e"
, fgColor = "#f07178"
, bgColor = "#282c34"
, fgColor = "#ff6c6b"
, position = Static { xpos = 1920 , ypos = 0, width = 1920, height = 24 }
, lowerOnStart = True
, hideOnStart = False
@@ -39,5 +39,5 @@ Config { font = "xft:Ubuntu:weight=bold:pixelsize=11:antialias=true:hinting=t
]
, sepChar = "%"
, alignSep = "}{"
, template = " <action=`xdotool key control+alt+g`><icon=haskell_20.xpm/> </action><fc=#666666> |</fc> %UnsafeStdinReader% }{ <fc=#666666><fn=2>|</fn> </fc><fc=#b3afc2><fn=1></fn> %uname% </fc><fc=#666666> <fn=2>|</fn></fc> <fc=#FFB86C> %cpu% </fc><fc=#666666> <fn=2>|</fn></fc> <fc=#FF5555> %memory% </fc><fc=#666666> <fn=2>|</fn></fc> <fc=#82AAFF> %disku% </fc><fc=#666666> <fn=2>|</fn></fc> <fc=#c3e88d> %enp6s0% </fc><fc=#666666> <fn=2>|</fn></fc> <fc=#e1acff><fn=1></fn> %pacupdate% </fc><fc=#666666> <fn=2>|</fn></fc> <fc=#8BE9FD> %date% </fc><fc=#666666><fn=2>|</fn></fc>%trayerpad%"
, template = " <action=`xdotool key control+alt+g`><icon=haskell_20.xpm/> </action><fc=#666666> |</fc> %UnsafeStdinReader% }{ <fc=#666666><fn=2>|</fn> </fc><fc=#b3afc2><fn=1></fn> %uname% </fc><fc=#666666> <fn=2>|</fn></fc> <fc=#ecbe7b> %cpu% </fc><fc=#666666> <fn=2>|</fn></fc> <fc=#ff6c6b> %memory% </fc><fc=#666666> <fn=2>|</fn></fc> <fc=#51afef> %disku% </fc><fc=#666666> <fn=2>|</fn></fc> <fc=#98be65> %enp6s0% </fc><fc=#666666> <fn=2>|</fn></fc> <fc=#c678dd><fn=1></fn> %pacupdate% </fc><fc=#666666> <fn=2>|</fn></fc> <fc=#46d9ff> %date% </fc><fc=#666666><fn=2>|</fn></fc>%trayerpad%"
}

View File

@@ -1,11 +1,19 @@
(setq doom-font (font-spec :family "Mononoki Nerd Font" :size 15)
doom-variable-pitch-font (font-spec :family "Mononoki Nerd Font" :size 15))
(setq doom-font (font-spec :family "SauceCodePro Nerd Font" :size 15)
doom-variable-pitch-font (font-spec :family "SauceCodePro Nerd Font" :size 15)
doom-big-font (font-spec :family "SauceCodePro Nerd Font" :size 24)
)
(setq doom-theme 'doom-palenight)
(setq doom-theme 'doom-one)
(setq org-directory "~/Documents/org/")
(require 'org-bullets)
(add-hook 'org-mode-hook (lambda () (org-bullets-mode 1)))
(after! org
(setq org-directory "~/Documents/org/")
(setq org-agenda-files '("~/Documents/org/agenda.org"))
;;(setq org-log-done 'time)
(setq org-log-done 'note)
(setq org-todo-keywords '((sequence "TODO(t)" "PROJ(p)" "VIDEO(v)" "WAIT(w)" "|" "DONE(d)" "CANCELLED(c)" )))
(require 'org-bullets)
(add-hook 'org-mode-hook (lambda () (org-bullets-mode 1)))
)
(setq display-line-numbers-type t)
(global-set-key "\C-x\ t" 'toggle-truncate-lines)
@@ -68,9 +76,9 @@
smtpmail-smtp-server "smtp.1and1.com"
smtpmail-smtp-service 587)
(use-package mastodon
:ensure t)
(setq mastodon-instance-url "https://mastodon.technology/")
(after! mastodon
(setq mastodon-instance-url "https://mastodon.technology/")
)
(setq md4rd-subs-active '(archlinux commandline DistroTube DoomEmacs emacs freesoftware lbry linux linux4noobs linuxmasterrace linnuxquestions orgmode qutebrowser suckless Ubuntu unixporn UsabilityPorn vim xmonad))

View File

@@ -11,24 +11,30 @@ are the three important ones:
+ `doom-big-font' -- used for `doom-big-font-mode'; use this for
presentations or streaming.
They all accept either a font-spec, font string ("Input Mono-12"), or xlfd
font string. You generally only need these two:
#+BEGIN_SRC emacs-lisp
(setq doom-font (font-spec :family "Mononoki Nerd Font" :size 15)
doom-variable-pitch-font (font-spec :family "Mononoki Nerd Font" :size 15))
(setq doom-font (font-spec :family "SauceCodePro Nerd Font" :size 15)
doom-variable-pitch-font (font-spec :family "SauceCodePro Nerd Font" :size 15)
doom-big-font (font-spec :family "SauceCodePro Nerd Font" :size 24)
)
#+END_SRC
** DOOM THEME
#+BEGIN_SRC emacs-lisp
(setq doom-theme 'doom-palenight)
(setq doom-theme 'doom-one)
#+END_SRC
** ORG MODE
Note that I wrapped everything in (after! org). Without this, my settings might be evaluated too early, which will result in my settings being overwritten by Doom's defaults.
#+BEGIN_SRC emacs-lisp
(setq org-directory "~/Documents/org/")
(require 'org-bullets)
(add-hook 'org-mode-hook (lambda () (org-bullets-mode 1)))
(after! org
(setq org-directory "~/Documents/org/")
(setq org-agenda-files '("~/Documents/org/agenda.org"))
;;(setq org-log-done 'time)
(setq org-log-done 'note)
(setq org-todo-keywords '((sequence "TODO(t)" "PROJ(p)" "VIDEO(v)" "WAIT(w)" "|" "DONE(d)" "CANCELLED(c)" )))
(require 'org-bullets)
(add-hook 'org-mode-hook (lambda () (org-bullets-mode 1)))
)
#+END_SRC
** LINE SETTINGS
@@ -123,10 +129,11 @@ Image previews in dired
#+END_SRC
** MASTODON CLIENT (mastodon)
Note that I wrapped my settings with (after! mastodon). Without this, my settings will be overwritten by the default settings for this module, which is "mastodon.social".
#+BEGIN_SRC emacs-lisp
(use-package mastodon
:ensure t)
(setq mastodon-instance-url "https://mastodon.technology/")
(after! mastodon
(setq mastodon-instance-url "https://mastodon.technology/")
)
#+END_SRC
#+BEGIN_SRC emacs-lisp

View File

@@ -48,7 +48,7 @@
;(unpin! pinned-package another-pinned-package)
;; ...Or *all* packages (NOT RECOMMENDED; will likely break things)
;(unpin! t)
(package! exwm)
(package! evil-tutor)
(package! emms)
(package! emojify)
(package! elfeed)

View File

@@ -1,127 +1,131 @@
#!/usr/bin/env sh
:; ( echo "$EMACS" | grep -q "term" ) && EMACS=emacs || EMACS=${EMACS:-emacs} # -*-emacs-lisp-*-
:; command -v $EMACS >/dev/null || { >&2 echo "Can't find emacs in your PATH"; exit 1; }
:; _VERSION=$($EMACS --version | head -n1)
:; case "$_VERSION" in *\ 2[0-5].[0-9]) echo "Detected Emacs $_VERSION"; echo "Doom only supports Emacs 26.1 and newer"; echo; exit 2 ;; esac
:; _DOOMBASE="${EMACSDIR:-$(dirname "$0")/..}"
:; _DOOMPOST="$_DOOMBASE/.local/.doom.sh"
:; rm -f "$_DOOMPOST"
:; $EMACS --no-site-file --script "$0" -- "$@"
:; CODE=$?
:; [ -x "$_DOOMPOST" ] && PATH="$_DOOMBASE/bin:$PATH" "$_DOOMPOST" "$0" "$@"
:; exit $CODE
:; set -e # -*- mode: emacs-lisp; lexical-binding: t -*-
:; case "$EMACS" in *term*) EMACS=emacs ;; *) EMACS="${EMACS:-emacs}" ;; esac
:; $EMACS --version >/dev/null 2>&1 || { >&2 echo "Can't find emacs in your PATH"; exit 1; }
:; $EMACS --no-site-file --script "$0" -- "$@" || __DOOMCODE=$?
:; [ "${__DOOMCODE:-0}" -eq 128 ] && { "`$EMACS -Q --batch --eval '(princ temporary-file-directory)'`/doom.sh" "$0" "$@" && true; __DOOMCODE=$?; }
:; exit $__DOOMCODE
;; CLI ops tend to eat a lot of memory. To speed it up, stave off the GC, but
;; not to `most-positive-fixnum' like we do in init.el; that's too high -- we
;; don't want to intentionally leak memory.
;; The garbage collector isn't important during CLI ops. A higher threshold
;; makes it 15-30% faster, but set it too high and we risk spiralling memory
;; usage in longer sessions.
(setq gc-cons-threshold 134217728) ; 128mb
(let* ((loaddir (file-name-directory (file-truename load-file-name)))
(emacsdir (getenv "EMACSDIR"))
(user-emacs-directory
(abbreviate-file-name
(if emacsdir
(file-name-as-directory emacsdir)
(expand-file-name "../" loaddir)))))
;; Prioritize non-byte-compiled source files in non-interactive sessions to
;; prevent loading stale byte-code.
(setq load-prefer-newer t)
;;
(load (expand-file-name "core/core.el" user-emacs-directory) nil t)
;; Ensure Doom runs out of this file's parent directory, where Doom is
;; presumably installed. EMACSDIR is set in the shell script preamble earlier in
;; this file.
(setq user-emacs-directory
(if (getenv "EMACSDIR")
(file-name-as-directory (expand-file-name (getenv "EMACSDIR")))
(expand-file-name
"../" (file-name-directory (file-truename load-file-name)))))
;; HACK Load `cl' and site files manually so we can stop them from polluting
;; CLI logs with deprecation and file load messages.
(quiet! (when (> emacs-major-version 26)
(require 'cl))
(load "site-start" t t))
;; Handle some potential issues early
(when (version< emacs-version "26.1")
(error (concat "Detected Emacs %s (at %s).\n\n"
"Doom only supports Emacs 26.1 and newer. 27.1 is highly recommended. A guide\n"
"to install a newer version of Emacs can be found at:\n\n "
(cond ((eq system-type 'darwin)
"https://github.com/hlissner/doom-emacs/blob/develop/docs/getting_started.org#on-macos")
((memq system-type '(cygwin windows-nt ms-dos))
"https://github.com/hlissner/doom-emacs/blob/develop/docs/getting_started.org#on-windows")
("https://github.com/hlissner/doom-emacs/blob/develop/docs/getting_started.org#on-linux"))
"Aborting...")
emacs-version
(car command-line-args)))
(doom-log "Initializing Doom CLI")
(require 'core-cli)
(unless (file-exists-p (expand-file-name "core/core.el" user-emacs-directory))
(error (concat "Couldn't find Doom Emacs in %S.\n\n"
"This is likely because this script (or its parent directory) is a symlink.\n"
"If you must use a symlink, you'll need to specify an EMACSDIR so Doom knows\n"
"where to find itself. e.g.\n\n "
(if (string-match-p "/fish$" (getenv "SHELL"))
"env EMACSDIR=~/.emacs.d doom"
"EMACSDIR=~/.emacs.d doom sync")
"\n\n"
"Aborting...")
(abbreviate-file-name (file-truename user-emacs-directory))
(abbreviate-file-name load-file-name)))
(defcli! :main
((help-p ["-h" "--help"] "Same as help command")
(debug-p ["-d" "--debug"] "Turns on doom-debug-p (and debug-on-error)")
(yes-p ["-y" "--yes"] "Auto-accept all confirmation prompts")
&optional command &rest args)
"A command line interface for managing Doom Emacs.
(when (and (equal (user-real-uid) 0)
(not (file-in-directory-p user-emacs-directory "/root")))
(error (concat "This script is running as root. This likely wasn't intentional and\n"
"will cause file permissions errors later if this Doom install is\n"
"ever used on a non-root account.\n\n"
"Aborting...")))
Includes package management, diagnostics, unit tests, and byte-compilation.
;; Load the heart of the beast and its CLI processing library
(load (expand-file-name "core/core.el" user-emacs-directory) nil t)
(require 'core-cli)
This tool also makes it trivial to launch Emacs out of a different folder or
with a different private module."
:bare t
(when debug-p
(setenv "DEBUG" "1")
(setq doom-debug-p t)
(print! (info "Debug mode on")))
(when yes-p
(setenv "YES" "1")
(setq doom-auto-accept t)
(print! (info "Auto-yes on")))
(when help-p
(when command
(push command args))
(setq command "help"))
;; Use our own home-grown debugger to display and log errors + backtraces.
;; Control over its formatting is important, because Emacs produces
;; difficult-to-read debug information otherwise. By making its errors more
;; presentable (and storing them somewhere users can access later) we go a long
;; way toward making it easier for users to write better bug reports.
(setq debugger #'doom-cli--debugger
debug-on-error t
debug-ignored-errors nil)
(when (equal (user-real-uid) 0)
(print!
(concat "WARNING: This script is running as root. This likely wasn't intentional, and\n"
"is unnecessary to use this script. This will cause file permissions errors\n"
"later if you use this Doom installation on a non-root account.\n"))
(unless (or doom-auto-accept (y-or-n-p "Continue anyway?"))
(user-error "Aborted")))
;; HACK Load `cl' and site files manually to prevent polluting logs and stdout
;; with deprecation and/or file load messages.
(quiet! (if EMACS27+ (require 'cl))
(load "site-start" t t))
;; Load any the user's private init.el or any cli.el files in modules. This
;; gives the user (and modules) an opportunity to define their own CLI
;; commands, or to customize the CLI to better suit them.
(load! doom-module-init-file doom-private-dir t)
(maphash (doom-module-loader doom-cli-file) doom-modules)
(load! doom-cli-file doom-private-dir t)
(run-hooks 'doom-cli-pre-hook)
(let (print-level print-gensym print-length)
(condition-case e
(if (null command)
(doom-cli-execute "help")
(let ((start-time (current-time)))
(and (doom-cli-execute command args)
(progn (run-hooks 'doom-cli-post-hook) t)
(print! (success "Finished! (%.4fs)")
(float-time
(time-subtract (current-time)
start-time))))))
(user-error
(print! (error "%s\n") (error-message-string e))
(print! (yellow "See 'doom help %s' for documentation on this command.") (car args))
(error "")) ; Ensure non-zero exit code
((debug error)
(print! (error "There was an unexpected error:"))
(print-group!
(print! "%s %s" (bold "Type:") (car e))
(print! (bold "Message:"))
(print-group!
(print! "%s" (get (car e) 'error-message)))
(print! (bold "Data:"))
(print-group!
(if (cdr e)
(dolist (item (cdr e))
(print! "%S" item))
(print! "n/a")))
(when (and (bound-and-true-p straight-process-buffer)
(string-match-p (regexp-quote straight-process-buffer)
(error-message-string e)))
(print! (bold "Straight output:"))
(print-group! (print! "%s" (straight--process-get-output)))))
(unless debug-on-error
(terpri)
(print!
(concat "Run the command again with the -d (or --debug) switch to enable debug\n"
"mode and (hopefully) generate a backtrace from this error:\n"
"\n %s\n\n"
"If you file a bug report, please include it!")
(string-join (append (list (file-name-nondirectory load-file-name) "-d" command)
args)
" "))
;; Ensure non-zero exit code
(error ""))))))
(doom-cli-execute :main (cdr (member "--" argv)))
(setq argv nil))
(kill-emacs
(pcase
(catch 'exit
;; Process the arguments passed to this script. `doom-cli-execute' should
;; return a boolean, integer (error code) or throw an 'exit event, which
;; we handle specially.
(apply #'doom-cli-execute :doom (cdr (member "--" argv))))
;; Any non-zero integer is treated as an error code.
((and (pred integerp) code) code)
;; If, instead, we were given a list or string, copy these as shell script
;; commands to a temp script file which this script will execute after this
;; session finishes. Also accepts special keywords, like `:restart', to rerun
;; the current command.
((and (or (pred consp)
(pred stringp)
(pred keywordp))
command)
(let ((script (expand-file-name "doom.sh" temporary-file-directory))
(coding-system-for-write 'utf-8-unix)
(coding-system-for-read 'utf-8-unix))
(with-temp-file script
(insert "#!/usr/bin/env sh\n"
"_postscript() {\n"
" rm -f " (shell-quote-argument script) "\n "
(cond ((eq command :restart)
"$@")
((stringp command)
command)
((string-join
(if (listp (car-safe command))
(cl-loop for line in (doom-enlist command)
collect (mapconcat #'shell-quote-argument (remq nil line) " "))
(list (mapconcat #'shell-quote-argument (remq nil command) " ")))
"\n ")))
"\n}\n"
(save-match-data
(cl-loop for env
in (cl-set-difference process-environment
doom--initial-process-environment
:test #'equal)
if (string-match "^\\([a-zA-Z0-9_]+\\)=\\(.+\\)$" env)
concat (format "%s=%s \\\n"
(match-string 1 env)
(shell-quote-argument (match-string 2 env)))))
(format "PATH=\"%s%s$PATH\" \\\n" (concat doom-emacs-dir "bin/") path-separator)
"_postscript $@\n"))
(set-file-modes script #o700))
;; Error code 128 is special: it means run the post-script after this
;; session ends.
128)
;; Anything else (e.g. booleans) is treated as a successful run. Yes, a `nil'
;; indicates a successful run too!
(_ 0)))

View File

@@ -30,6 +30,9 @@ shift $((OPTIND-1))
[ -t 0 ] && str="$*" || str=$(cat)
# Fix incompatible terminals that cause odd 'not a valid terminal' errors
[ $TERM = "alacritty" ] && export TERM=xterm-256color
if [ $daemon ]; then
emacsclient -a "" \
-c -F '((name . "doom-capture") (width . 70) (height . 25) (transient . t))' \

View File

@@ -179,9 +179,11 @@ If DERIVED-P, test with `derived-mode-p', otherwise use `eq'."
;;;###autoload
(defun doom-visible-buffers (&optional buffer-list)
"Return a list of visible buffers (i.e. not buried)."
(if buffer-list
(cl-remove-if-not #'get-buffer-window buffer-list)
(delete-dups (mapcar #'window-buffer (window-list)))))
(let ((buffers (delete-dups (mapcar #'window-buffer (window-list)))))
(if buffer-list
(cl-delete-if (lambda (b) (memq b buffer-list))
buffers)
(delete-dups buffers))))
;;;###autoload
(defun doom-buried-buffers (&optional buffer-list)

View File

@@ -98,7 +98,7 @@ Runs `doom-reload-hook' afterwards."
;;;###autoload
(defun doom/reload-autoloads ()
"Reload only `doom-autoload-file' and `doom-package-autoload-file'.
"Reload only `doom-autoloads-file' and `doom-package-autoload-file'.
This is much faster and safer than `doom/reload', but not as comprehensive. This
reloads your package and module visibility, but does not install new packages or

View File

@@ -5,26 +5,62 @@
;;;###autoload
(defvar doom-debug-variables
'(doom-debug-p
init-file-debug
debug-on-error
'(debug-on-error
doom-debug-p
garbage-collection-messages
use-package-verbose
jka-compr-verbose
lsp-log-io
gcmh-verbose
magit-refresh-verbose
url-debug)
"A list of variable to toggle on `doom-debug-mode'.")
init-file-debug
jka-compr-verbose
url-debug
use-package-verbose)
"A list of variable to toggle on `doom-debug-mode'.
Each entry can be a variable symbol or a cons cell whose CAR is the variable
symbol and CDR is the value to set it to when `doom-debug-mode' is activated.")
(defvar doom--debug-vars-old-values nil)
(defvar doom--debug-vars-undefined nil)
(defun doom--watch-debug-vars-h (&rest _)
(when-let (bound-vars (cl-remove-if-not #'boundp doom--debug-vars-undefined))
(doom-log "New variables available: %s" bound-vars)
(let ((message-log-max nil))
(doom-debug-mode -1)
(doom-debug-mode +1))))
;;;###autoload
(define-minor-mode doom-debug-mode
"Toggle `debug-on-error' and `doom-debug-p' for verbose logging."
:init-value nil
:global t
(let ((value doom-debug-mode))
(mapc (doom-rpartial #'set value) doom-debug-variables)
(message "Debug mode %s" (if value "on" "off"))))
(let ((enabled doom-debug-mode))
(setq doom--debug-vars-undefined nil)
(dolist (var doom-debug-variables)
(cond ((listp var)
(cl-destructuring-bind (var . val) var
(if (not (boundp var))
(add-to-list 'doom--debug-vars-undefined var)
(set-default
var (if (not enabled)
(alist-get var doom--debug-vars-old-values)
(setf (alist-get var doom--debug-vars-old-values)
(symbol-value var))
val)))))
((if (boundp var)
(set-default var enabled)
(add-to-list 'doom--debug-vars-undefined var)))))
(when (fboundp 'explain-pause-mode)
(explain-pause-mode enabled))
;; Watch for changes in `doom-debug-variables', or when packages load (and
;; potentially define one of `doom-debug-variables'), in case some of them
;; aren't defined when `doom-debug-mode' is first loaded.
(cond (enabled
(add-variable-watcher 'doom-debug-variables #'doom--watch-debug-vars-h)
(add-hook 'after-load-functions #'doom--watch-debug-vars-h))
(t
(remove-variable-watcher 'doom-debug-variables #'doom--watch-debug-vars-h)
(remove-hook 'after-load-functions #'doom--watch-debug-vars-h)))
(message "Debug mode %s" (if enabled "on" "off"))))
;;
@@ -68,35 +104,44 @@
ready to be pasted in a bug report on github."
(require 'vc-git)
(require 'core-packages)
(let ((default-directory doom-emacs-dir)
(doom-modules (doom-module-list)))
(letf! (defun sh (&rest args) (cdr (apply #'doom-call-process args)))
`((emacs
(version . ,emacs-version)
(features ,@system-configuration-features)
(build . ,(format-time-string "%b %d, %Y" emacs-build-time))
(buildopts ,system-configuration-options)
(windowsys . ,(if doom-interactive-p window-system 'batch))
(daemonp . ,(cond ((daemonp) 'daemon)
((and (require 'server)
(server-running-p))
'server-running))))
(doom
(version . ,doom-version)
(build . ,(sh "git" "log" "-1" "--format=%D %h %ci"))
(dir . ,(abbreviate-file-name (file-truename doom-private-dir))))
(system
(type . ,system-type)
(let ((default-directory doom-emacs-dir))
(letf! ((defun sh (&rest args) (cdr (apply #'doom-call-process args)))
(defun abbrev-path (path)
(replace-regexp-in-string
(regexp-quote (user-login-name)) "$USER"
(abbreviate-file-name path))))
`((system
(type . ,system-type)
(config . ,system-configuration)
(shell . ,shell-file-name)
(uname . ,(if IS-WINDOWS
"n/a"
(sh "uname" "-msrv")))
(path . ,(mapcar #'abbreviate-file-name exec-path)))
(config
(envfile
. ,(cond ((file-exists-p doom-env-file) 'envvar-file)
((featurep 'exec-path-from-shell) 'exec-path-from-shell)))
(shell . ,(abbrev-path shell-file-name))
(uname . ,(if IS-WINDOWS "n/a" (sh "uname" "-msrv")))
(path . ,(mapcar #'abbrev-path exec-path)))
(emacs
(dir . ,(abbrev-path (file-truename doom-emacs-dir)))
(version . ,emacs-version)
(build . ,(format-time-string "%b %d, %Y" emacs-build-time))
(buildopts . ,system-configuration-options)
(features . ,system-configuration-features)
(traits . ,(delq
nil (list (if (not doom-interactive-p) 'batch)
(if (daemonp) 'daemon)
(if (and (require 'server)
(server-running-p))
'server-running)
(if (boundp 'chemacs-profiles-path)
'chemacs)
(if (file-exists-p doom-env-file)
'envvar-file)
(if (featurep 'exec-path-from-shell)
'exec-path-from-shell)
(if (file-symlink-p user-emacs-directory)
'symlinked-emacsdir)
(if (file-symlink-p doom-private-dir)
'symlinked-doomdir)))))
(doom
(dir . ,(abbrev-path (file-truename doom-private-dir)))
(version . ,doom-version)
(build . ,(sh "git" "log" "-1" "--format=%D %h %ci"))
(elc-files
. ,(length (doom-files-in `(,@doom-modules-dirs
,doom-core-dir
@@ -110,10 +155,18 @@ ready to be pasted in a bug report on github."
do (setq cat (car key))
and collect cat
collect
(let ((flags (doom-module-get cat (cdr key) :flags)))
(if flags
`(,(cdr key) ,@flags)
(cdr key))))
(let* ((flags (doom-module-get cat (cdr key) :flags))
(path (doom-module-get cat (cdr key) :path))
(module (append (cond ((null path)
(list '&nopath))
((file-in-directory-p path doom-private-dir)
(list '&user)))
(if flags
`(,(cdr key) ,@flags)
(list (cdr key))))))
(if (= (length module) 1)
(car module)
module)))
'("n/a")))
(packages
,@(or (condition-case e
@@ -150,16 +203,10 @@ ready to be pasted in a bug report on github."
"Display the current version of Doom & Emacs, including the current Doom
branch and commit."
(interactive)
(require 'vc-git)
(let ((default-directory doom-core-dir))
(print! "Doom v%s (%s)\nEmacs v%s\nBranch: %s\nBuild date: %s"
(print! "Doom v%s (%s)"
doom-version
(or (vc-git-working-revision doom-core-dir)
"n/a")
emacs-version
(or (vc-git--symbolic-ref doom-core-dir)
"n/a")
(or (cdr (doom-call-process "git" "log" "-1" "--format=%ci"))
(or (cdr (doom-call-process "git" "log" "-1" "--format=%D %h %ci"))
"n/a"))))
;;;###autoload
@@ -190,7 +237,7 @@ markdown and copies it to your clipboard, ready to be pasted into bug reports!"
(insert "<details>\n\n```\n")
(dolist (group info)
(insert! "%-8s%-10s %s\n"
((car group)
((upcase (symbol-name (car group)))
(caadr group)
(cdadr group)))
(dolist (spec (cddr group))

View File

@@ -11,12 +11,9 @@
(csharp-mode :lang csharp)
(clojure-mode :lang clojure)
(clojurescript-mode :lang clojure)
(graphql-mode :lang data)
(toml-mode :lang data)
(json-mode :lang data)
(yaml-mode :lang data)
(json-mode :lang json)
(yaml-mode :lang yaml)
(csv-mode :lang data)
(dhall-mode :lang data)
(erlang-mode :lang erlang)
(elixir-mode :lang elixir)
(elm-mode :lang elm)
@@ -193,7 +190,7 @@ selection of all minor-modes, active or not."
"troubleshooting.org"
"tutorials.org"
"faq.org")
2 t initial-input
3 t initial-input
(mapcar (lambda (x)
(setcar x (concat "Doom Modules > " (car x)))
x)

View File

@@ -106,10 +106,11 @@ in some cases."
(thing
(thing-at-point thing t))
((require 'xref nil t)
;; Eglot defines a dummy for `xref-find-backend', so we need a special
;; case to avoid xref when using eglot. See
;; https://github.com/joaotavora/eglot/issues/503
(if (eq (xref-find-backend) 'eglot)
;; Eglot, nox (a fork of eglot), and elpy implementations for
;; `xref-backend-identifier-at-point' betray the documented purpose of
;; the interface. Eglot/nox return a hardcoded string and elpy prepends
;; the line number to the symbol.
(if (memq (xref-find-backend) '(eglot elpy nox))
(thing-at-point 'symbol t)
;; A little smarter than using `symbol-at-point', though in most
;; cases, xref ends up using `symbol-at-point' anyway.

View File

@@ -113,48 +113,77 @@ See `display-line-numbers' for what these values mean."
(delete-frame))
(save-buffers-kill-emacs)))
(defvar doom--maximize-last-wconf nil)
;;;###autoload
(defun doom/window-maximize-buffer ()
"Close other windows to focus on this one. Activate again to undo this. If the
window changes before then, the undo expires.
Alternatively, use `doom/window-enlargen'."
(interactive)
(setq doom--maximize-last-wconf
(if (and (null (cdr (cl-remove-if #'window-dedicated-p (window-list))))
doom--maximize-last-wconf)
(ignore (set-window-configuration doom--maximize-last-wconf))
(when (and (bound-and-true-p +popup-mode)
(+popup-window-p))
(user-error "Cannot maximize a popup, use `+popup/raise' first or use `doom/window-enlargen' instead"))
(prog1 (current-window-configuration)
(delete-other-windows)))))
(defun doom--enlargened-forget-last-wconf-h ()
(set-frame-parameter nil 'doom--maximize-last-wconf nil)
(set-frame-parameter nil 'doom--enlargen-last-wconf nil)
(remove-hook 'doom-switch-window-hook #'doom--enlargened-forget-last-wconf-h))
(defvar doom--enlargen-last-wconf nil)
;;;###autoload
(defun doom/window-enlargen ()
(defun doom/window-maximize-buffer (&optional arg)
"Close other windows to focus on this one.
Activate again to undo this. If prefix ARG is non-nil, don't restore the last
window configuration and re-maximize the current window. Alternatively, use
`doom/window-enlargen'."
(interactive "P")
(let ((param 'doom--maximize-last-wconf))
(cl-destructuring-bind (window . wconf)
(or (frame-parameter nil param)
(cons nil nil))
(set-frame-parameter
nil param
(if (and (equal window (selected-window))
(not arg)
(null (cdr (cl-remove-if #'window-dedicated-p (window-list))))
wconf)
(ignore
(let ((source-window (selected-window)))
(set-window-configuration wconf)
(when (window-live-p source-window)
(select-window source-window))))
(when (and (bound-and-true-p +popup-mode)
(+popup-window-p))
(user-error "Cannot maximize a popup, use `+popup/raise' first or use `doom/window-enlargen' instead"))
(prog1 (cons (selected-window) (or wconf (current-window-configuration)))
(delete-other-windows)
(add-hook 'doom-switch-window-hook #'doom--enlargened-forget-last-wconf-h)))))))
;;;###autoload
(defun doom/window-enlargen (&optional arg)
"Enlargen the current window to focus on this one. Does not close other
windows (unlike `doom/window-maximize-buffer'). Activate again to undo."
(interactive)
(setq doom--enlargen-last-wconf
(if doom--enlargen-last-wconf
(ignore (set-window-configuration doom--enlargen-last-wconf))
(prog1 (current-window-configuration)
(let* ((window (selected-window))
(dedicated-p (window-dedicated-p window))
(preserved-p (window-parameter window 'window-preserved-size))
(ignore-window-parameters t))
(unwind-protect
(progn
(when dedicated-p
(set-window-dedicated-p window nil))
(when preserved-p
(set-window-parameter window 'window-preserved-size nil))
(maximize-window window))
(set-window-dedicated-p window dedicated-p)
(when preserved-p
(set-window-parameter window 'window-preserved-size preserved-p))))))))
(interactive "P")
(let ((param 'doom--enlargen-last-wconf))
(cl-destructuring-bind (window . wconf)
(or (frame-parameter nil param)
(cons nil nil))
(set-frame-parameter
nil param
(if (and (equal window (selected-window))
(not arg)
wconf)
(ignore
(let ((source-window (selected-window)))
(set-window-configuration wconf)
(when (window-live-p source-window)
(select-window source-window))))
(prog1 (cons (selected-window) (or wconf (current-window-configuration)))
(let* ((window (selected-window))
(dedicated-p (window-dedicated-p window))
(preserved-p (window-parameter window 'window-preserved-size))
(ignore-window-parameters t))
(unwind-protect
(progn
(when dedicated-p
(set-window-dedicated-p window nil))
(when preserved-p
(set-window-parameter window 'window-preserved-size nil))
(maximize-window window))
(set-window-dedicated-p window dedicated-p)
(when preserved-p
(set-window-parameter window 'window-preserved-size preserved-p))
(add-hook 'doom-switch-window-hook #'doom--enlargened-forget-last-wconf-h)))))))))
;;;###autoload
(defun doom/window-maximize-horizontally ()

View File

@@ -14,7 +14,7 @@ one wants that.")
auto-mode-alist
interpreter-mode-alist
Info-directory-list)
"A list of variables to be cached in `doom-autoload-file'.")
"A list of variables to be cached in `doom-autoloads-file'.")
(defvar doom-autoloads-files ()
"A list of additional files or file globs to scan for autoloads.")
@@ -26,7 +26,7 @@ one wants that.")
(defun doom-autoloads-reload (&optional file)
"Regenerates Doom's autoloads and writes them to FILE."
(unless file
(setq file doom-autoload-file))
(setq file doom-autoloads-file))
(print! (start "(Re)generating autoloads file..."))
(print-group!
(cl-check-type file string)

View File

@@ -59,6 +59,16 @@ in."
"typically installed. If you're seeing a vanilla Emacs splash screen, this "
"may explain why. If you use Chemacs, you may ignore this warning."))
(when EMACS27+
(print! (start "Checking for great Emacs features..."))
(unless (and (functionp 'json-serialize)
(string-match-p "\\_<JSON\\_>" system-configuration-features))
(warn! "Emacs was not built with native JSON support")
(explain! "Users will see a substantial performance gain by building Emacs with "
"jansson support (i.e. a native JSON library), particularly LSP users. "
"You must install a prebuilt Emacs binary with this included, or compile "
"Emacs with the --with-json option.")))
(print! (start "Checking for private config conflicts..."))
(let ((xdg-dir (concat (or (getenv "XDG_CONFIG_HOME")
"~/.config")

View File

@@ -61,11 +61,14 @@ Why this over exec-path-from-shell?
;; Helpers
(defvar doom-env-blacklist
'("^DBUS_SESSION_BUS_ADDRESS$"
"^GPG_AGENT_INFO$" "^\\(SSH\\|GPG\\)_TTY$"
"^SSH_\\(AUTH_SOCK\\|AGENT_PID\\)$"
"^HOME$" "^PWD$" "^PS1$" "^R?PROMPT$" "^TERM$"
;; Doom envvars
'(;; State that may be problematic if overwritten
"^HOME$" "^\\(OLD\\)?PWD$" "^SHLVL$" "^PS1$" "^R?PROMPT$" "^TERM$" "^USER$"
;; X server or services' variables
"^DISPLAY$" "^DBUS_SESSION_BUS_ADDRESS$"
;; ssh and gpg variables (likely to become stale)
"^SSH_\\(AUTH_SOCK\\|AGENT_PID\\)$" "^\\(SSH\\|GPG\\)_TTY$"
"^GPG_AGENT_INFO$"
;; Internal Doom envvars
"^DEBUG$" "^INSECURE$" "^YES$" "^__")
"Environment variables to not save in `doom-env-file'.

View File

@@ -74,7 +74,7 @@
:bare t
(if command
(doom--cli-print (doom-cli-get (intern command)))
(doom--cli-print (doom-cli-get :main))
(doom--cli-print (doom-cli-get :doom))
(terpri)
(print! (bold "Commands:"))
(print-group!

View File

@@ -126,8 +126,14 @@ list remains lean."
(doom-log "%s is newer than %s" file elc-file)
t)))
;; DEPRECATED Remove later
(defun doom--comp-output-filename (file)
(if (fboundp 'comp-output-filename)
(comp-output-filename file)
(comp-el-to-eln-filename file)))
(defun doom--eln-file-outdated-p (file)
(when-let* ((eln-file (comp-output-filename file))
(when-let* ((eln-file (doom--comp-output-filename file))
(error-file (concat eln-file ".error")))
(push eln-file doom--expected-eln-files)
(cond ((file-exists-p eln-file)
@@ -144,7 +150,7 @@ list remains lean."
(defun doom--native-compile-done-h (file)
(when-let* ((file)
(eln-file (comp-output-filename file))
(eln-file (doom--comp-output-filename file))
(error-file (concat eln-file ".error")))
(if (file-exists-p eln-file)
(doom-log "Compiled %s" eln-file)
@@ -484,8 +490,9 @@ If ELPA-P, include packages installed with package.el (M-x package-install)."
(and (or repos-p regraft-repos-p)
(straight--directory-files (straight--repos-dir) nil nil 'sort))))
(list (when builds-p
(seq-remove (doom-rpartial #'gethash straight--profile-cache)
(straight--directory-files (straight--build-dir) nil nil 'sort)))
(seq-filter #'file-directory-p
(seq-remove (doom-rpartial #'gethash straight--profile-cache)
(straight--directory-files (straight--build-dir) nil nil 'sort))))
(when repos-p
(seq-remove (doom-rpartial #'straight--checkhash straight--repo-cache)
rdirs))

View File

@@ -17,16 +17,17 @@ following shell commands:
(let ((doom-auto-discard force-p))
(cond
(packages-only-p
(doom-cli-execute "sync" '("-u"))
(doom-cli-execute "sync" "-u")
(print! (success "Finished upgrading Doom Emacs")))
((doom-cli-upgrade doom-auto-accept doom-auto-discard)
;; Reload Doom's CLI & libraries, in case there were any upstream changes.
;; Major changes will still break, however
(print! (info "Reloading Doom Emacs"))
(doom-cli-execute-after "doom" "upgrade" "-p" (if force-p "-f")))
(throw 'exit (list "doom" "upgrade" "-p" (if force-p "-f"))))
((print! "Doom is up-to-date!")))))
((print! "Doom is up-to-date!")
(doom-cli-execute "sync" "-u")))))
;;
@@ -92,7 +93,7 @@ following shell commands:
((equal this-rev new-rev)
(print! (success "Doom is already up-to-date!"))
t)
nil)
((print! (info "A new version of Doom Emacs is available!\n\n Old revision: %s (%s)\n New revision: %s (%s)\n"
(substring this-rev 0 10)

View File

@@ -1,13 +1,12 @@
;;; -*- lexical-binding: t; no-byte-compile: t; -*-
(require 'seq)
;;; core/core-cli.el --- -*- lexical-binding: t; no-byte-compile: t; -*-
(load! "autoload/process")
(load! "autoload/plist")
(load! "autoload/files")
(load! "autoload/output")
(require 'seq)
;; Create all our core directories to quell file errors
;; Create all our core directories to quell file errors.
(mapc (doom-rpartial #'make-directory 'parents)
(list doom-local-dir
doom-etc-dir
@@ -21,6 +20,9 @@
;; Don't generate superfluous files when writing temp buffers
(setq make-backup-files nil)
;; Stop user configuration from interfering with Doom
(setq enable-dir-local-variables nil)
;;
;;; Variables
@@ -40,10 +42,26 @@ These are loaded when a Doom's CLI starts up. There users and modules can define
additional CLI commands, or reconfigure existing ones to better suit their
purpose.")
(defvar doom-cli-log-file (concat doom-local-dir "doom.log")
"File to write the extended output to.")
(defvar doom-cli-log-error-file (concat doom-local-dir "doom.error.log")
"File to write the last backtrace to.")
(defvar doom--cli-commands (make-hash-table :test 'equal))
(defvar doom--cli-groups (make-hash-table :test 'equal))
(defvar doom--cli-group nil)
(define-error 'doom-cli-error "There was an unexpected error" 'doom-error)
(define-error 'doom-cli-command-not-found-error "Could not find that command" 'doom-cli-error)
(define-error 'doom-cli-wrong-number-of-arguments-error "Wrong number of CLI arguments" 'doom-cli-error)
(define-error 'doom-cli-unrecognized-option-error "Not a recognized option" 'doom-cli-error)
(define-error 'doom-cli-deprecated-error "Command is deprecated" 'doom-cli-error)
;;
;;; CLI library
(cl-defstruct
(doom-cli
(:constructor nil)
@@ -159,7 +177,7 @@ purpose.")
"Return non-nil if CLI is an internal (non-public) command."
(string-prefix-p ":" (doom-cli-name cli)))
(defun doom-cli-execute (command &optional args)
(defun doom-cli-execute (command &rest args)
"Execute COMMAND (string) with ARGS (list of strings).
Executes a cli defined with `defcli!' with the name or alias specified by
@@ -169,24 +187,6 @@ COMMAND, and passes ARGS to it."
(doom--cli-process cli (remq nil args)))
(user-error "Couldn't find any %S command" command)))
(defun doom-cli-execute-after (&rest args)
"Execute shell command ARGS after this CLI session quits.
This is particularly useful when the capabilities of Emacs' batch terminal are
insufficient (like opening an instance of Emacs, or reloading Doom after a 'doom
upgrade')."
(let ((post-script (concat doom-local-dir ".doom.sh")))
(with-temp-file post-script
(insert "#!/usr/bin/env sh\n"
"rm -f " (prin1-to-string post-script) "\n"
"exec " (mapconcat #'shell-quote-argument (remq nil args) " ")
"\n"))
(let* ((current-mode (file-modes post-script))
(add-mode (logand ?\111 (default-file-modes))))
(or (/= (logand ?\111 current-mode) 0)
(zerop add-mode)
(set-file-modes post-script (logior current-mode add-mode))))))
(defmacro defcli! (name speclist &optional docstring &rest body)
"Defines a CLI command.
@@ -247,6 +247,65 @@ BODY will be run when this dispatcher is called."
,@body))
;;
;;; Debugger
(cl-defun doom-cli--debugger (error data)
(cl-incf num-nonmacro-input-events)
(cl-destructuring-bind (backtrace &optional type data . _)
(cons (doom-cli--backtrace) data)
(cond
((and (bound-and-true-p straight-process-buffer)
(stringp data)
(string-match-p (regexp-quote straight-process-buffer)
data))
(print! (error "There was an unexpected package error"))
(print-group!
(print! "%s" (string-trim-right (straight--process-get-output)))))
((print! (error "There was an unexpected error"))
(print-group!
(print! "%s %s" (bold "Message:") (get type 'error-message))
(print! "%s %S" (bold "Data:") (cons type data))
(when backtrace
(print! (bold "Backtrace:"))
(print-group!
(dolist (frame (seq-take backtrace 10))
(print!
"%0.74s" (replace-regexp-in-string
"[\n\r]" "\\\\n" (format "%S" frame)))))))))
(when backtrace
(with-temp-file doom-cli-log-error-file
(insert "# -*- lisp-interaction -*-\n")
(insert "# vim: set ft=lisp:\n")
(let ((standard-output (current-buffer))
(print-quoted t)
(print-escape-newlines t)
(print-escape-control-characters t)
(print-level nil)
(print-circle nil))
(mapc #'print (cons (list type data) backtrace)))
(print! (warn "Extended backtrace logged to %s")
(relpath doom-cli-log-error-file)))))
(throw 'exit 255))
(defun doom-cli--backtrace ()
(let* ((n 0)
(frame (backtrace-frame n))
(frame-list nil)
(in-program-stack nil))
(while frame
(when in-program-stack
(push (cdr frame) frame-list))
(when (eq (elt frame 1) 'doom-cli--debugger)
(setq in-program-stack t))
(when (and (eq (elt frame 1) 'doom-cli-execute)
(eq (elt frame 2) :doom))
(setq in-program-stack nil))
(setq n (1+ n)
frame (backtrace-frame n)))
(reverse frame-list)))
;;
;;; straight.el hacks
@@ -366,52 +425,102 @@ everywhere we use it (and internally)."
interactive)))
;;
;;; Entry point
(defcli! :doom
((help-p ["-h" "--help"] "Same as help command")
(auto-accept-p ["-y" "--yes"] "Auto-accept all confirmation prompts")
(debug-p ["-d" "--debug"] "Enables on verbose output")
(doomdir ["--doomdir" dir] "Use the private module at DIR (e.g. ~/.doom.d)")
(localdir ["--localdir" dir] "Use DIR as your local storage directory")
&optional command
&rest args)
"A command line interface for managing Doom Emacs.
Includes package management, diagnostics, unit tests, and byte-compilation.
This tool also makes it trivial to launch Emacs out of a different folder or
with a different private module."
(condition-case e
(with-output-to! doom-cli-log-file
(catch 'exit
(when (and (not (getenv "__DOOMRESTART"))
(or doomdir
localdir
debug-p
auto-accept-p))
(when doomdir
(setenv "DOOMDIR" (file-name-as-directory doomdir))
(print! (info "DOOMDIR=%s") localdir))
(when localdir
(setenv "DOOMLOCALDIR" (file-name-as-directory localdir))
(print! (info "DOOMLOCALDIR=%s") localdir))
(when debug-p
(setenv "DEBUG" "1")
(print! (info "DEBUG=1")))
(when auto-accept-p
(setenv "YES" auto-accept-p)
(print! (info "Confirmations auto-accept enabled")))
(throw 'exit "__DOOMRESTART=1 $@"))
;; TODO Rotate logs out, instead of overwriting them?
(delete-file doom-cli-log-file)
(delete-file doom-cli-log-error-file)
(when help-p
(when command
(push command args))
(setq command "help"))
(if (null command)
(doom-cli-execute "help")
(let ((start-time (current-time)))
(run-hooks 'doom-cli-pre-hook)
(when (apply #'doom-cli-execute command args)
(run-hooks 'doom-cli-post-hook)
(print! (success "Finished in %.4fs")
(float-time (time-subtract (current-time) start-time))))))))
;; TODO Not implemented yet
(doom-cli-command-not-found-error
(print! (error "Command 'doom %s' not recognized") (string-join (cdr e) " "))
(print! "\nDid you mean one of these commands?")
(apply #'doom-cli-execute "help" "--similar" (string-join (cdr e) " "))
2)
;; TODO Not implemented yet
(doom-cli-wrong-number-of-arguments-error
(cl-destructuring-bind (route opt arg n d) (cdr e)
(print! (error "doom %s: %S requires %d arguments, but %d given\n")
(mapconcat #'symbol-name route " ") arg n d)
(print-group!
(apply #'doom-cli-execute "help" (mapcar #'symbol-name route))))
3)
;; TODO Not implemented yet
(doom-cli-unrecognized-option-error
(let ((option (cadr e)))
(print! (error "Unrecognized option: %S") option)
(when (string-match "^--[^=]+=\\(.+\\)$" option)
(print! "The %S syntax isn't supported. Use '%s %s' instead."
option (car (split-string option "="))
(match-string 1 option))))
4)
;; TODO Not implemented yet
(doom-cli-deprecated-error
(cl-destructuring-bind (route . commands) (cdr e)
(print! (warn "The 'doom %s' command was removed and replaced with:\n")
(mapconcat #'symbol-name route " "))
(print-group!
(dolist (command commands)
(print! (info "%s") command))))
5)
(user-error
(print! (warn "%s") (cadr e))
1)))
;;
;;; CLI Commands
(load! "cli/help")
(load! "cli/install")
(defcli! (refresh re) ()
"Deprecated for 'doom sync'"
:hidden t
(user-error "'doom refresh' has been replaced with 'doom sync'. Use that instead"))
(defcli! (sync s)
((inhibit-envvar-p ["-e"] "Don't regenerate the envvar file")
(inhibit-elc-p ["-c"] "Don't recompile config")
(update-p ["-u"] "Update installed packages after syncing")
(prune-p ["-p" "--prune"] "Purge orphaned package repos & regraft them"))
"Synchronize your config with Doom Emacs.
This is the equivalent of running autoremove, install, autoloads, then
recompile. Run this whenever you:
1. Modify your `doom!' block,
2. Add or remove `package!' blocks to your config,
3. Add or remove autoloaded functions in module autoloaded files.
4. Update Doom outside of Doom (e.g. with git)
It will ensure that unneeded packages are removed, all needed packages are
installed, autoloads files are up-to-date and no byte-compiled files have gone
stale."
(print! (start "Synchronizing your config with Doom Emacs..."))
(print-group!
(delete-file doom-autoload-file)
(when (and (not inhibit-envvar-p)
(file-exists-p doom-env-file))
(doom-cli-reload-env-file 'force))
(run-hooks 'doom-sync-pre-hook)
(doom-cli-packages-install)
(doom-cli-packages-build)
(when update-p
(doom-cli-packages-update))
(doom-cli-packages-purge prune-p 'builds-p prune-p prune-p)
(run-hooks 'doom-sync-post-hook)
(when (doom-autoloads-reload)
(print! (info "Restart Emacs or use 'M-x doom/reload' for changes to take effect")))
t))
(load! "cli/sync")
(load! "cli/env")
(load! "cli/upgrade")
(load! "cli/packages")
@@ -427,12 +536,10 @@ stale."
;; (load! "cli/test")
)
(defcligroup! "Compilation"
"For compiling Doom and your config"
(load! "cli/byte-compile"))
(defcligroup! "Utilities"
"Conveniences for interacting with Doom externally"
(defcli! run (&rest args)
@@ -446,8 +553,16 @@ All arguments are passed on to Emacs.
WARNING: this command exists for convenience and testing. Doom will suffer
additional overhead by being started this way. For the best performance, it is
best to run Doom out of ~/.emacs.d and ~/.doom.d."
(apply #'doom-cli-execute-after invocation-name args)
nil))
(throw 'exit (cons invocation-name args))))
;;
;;; Bootstrap
(doom-log "Initializing Doom CLI")
(load! doom-module-init-file doom-private-dir t)
(maphash (doom-module-loader doom-cli-file) doom-modules)
(load! doom-cli-file doom-private-dir t)
(provide 'core-cli)
;;; core-cli.el ends here

View File

@@ -114,6 +114,10 @@ possible."
(setq-default indent-tabs-mode nil
tab-width 4)
;; Only indent the line when at BOL or in a line's indentation. Anywhere else,
;; insert literal indentation.
(setq-default tab-always-indent nil)
;; Make `tabify' and `untabify' only affect indentation. Not tabs/spaces in the
;; middle of a line.
(setq tabify-regexp "^\t* [ \t]+")
@@ -189,17 +193,23 @@ possible."
;; Only prompts for confirmation when buffer is unsaved.
revert-without-query (list "."))
;; Instead of `auto-revert-mode' or `global-auto-revert-mode', we lazily auto
;; revert; when we save a file or switch buffers/windows (or focus on Emacs).
;; `auto-revert-mode' and `global-auto-revert-mode' would, normally, abuse the
;; heck out of inotify handles _or_ aggresively poll your buffer list every X
;; seconds. Too many inotify handles can grind Emacs to a halt if you preform
;; expensive or batch processes on files outside of Emacs (e.g. their mtime
;; changes), and polling your buffer list is terribly inefficient as your
;; buffer list grows into the tens or hundreds.
;;
;; Autorevert normally abuses the heck out of inotify handles which can grind
;; Emacs to a halt if you do expensive IO (outside of Emacs) on the files you
;; have open (like compression). The only alternative is aggressive polling,
;; which is unreliable and expensive with a lot of buffers open.
;; So Doom uses a different strategy: we lazily auto revert buffers when the
;; user a) saves a file, b) switches to a buffer (or its window), or c) you
;; focus Emacs (after using another program). This way, Emacs only ever has to
;; operate on, at minimum, a single buffer and, at maximum, X buffers, where X
;; is the number of open windows (which is rarely, if ever, over 10).
(defun doom-auto-revert-buffer-h ()
"Auto revert current buffer, if necessary."
(unless (or auto-revert-mode (active-minibuffer-window))
(auto-revert-handler)))
(let ((auto-revert-mode t))
(auto-revert-handler))))
(defun doom-auto-revert-buffers-h ()
"Auto revert stale buffers in visible windows, if necessary."
@@ -220,9 +230,15 @@ possible."
(file-truename file)
file))
(setq recentf-filename-handlers
'(substring-no-properties ; strip out lingering text properties
doom--recent-file-truename ; resolve symlinks of local files
abbreviate-file-name) ; replace $HOME with ~
'(;; Text properties inflate the size of recentf's files, and there is
;; no purpose in persisting them, so we strip them out.
substring-no-properties
;; Resolve symlinks of local files. Otherwise we get duplicate
;; entries opening symlinks.
doom--recent-file-truename
;; Replace $HOME with ~, which is more portable, and reduces how much
;; horizontal space the recentf listing uses to list recent files.
abbreviate-file-name)
recentf-save-file (concat doom-cache-dir "recentf")
recentf-auto-cleanup 'never
recentf-max-menu-items 0
@@ -309,7 +325,6 @@ files, so we replace calls to `pp' with the much faster `prin1'."
(use-package! better-jumper
:hook (doom-first-input . better-jumper-mode)
:hook (better-jumper-post-jump . recenter)
:commands doom-set-jump-a doom-set-jump-maybe-a doom-set-jump-h
:preface
;; REVIEW Suppress byte-compiler warning spawning a *Compile-Log* buffer at

View File

@@ -27,8 +27,11 @@ and Emacs states, and for non-evil users.")
;;; Keybind settings
(cond (IS-MAC
(setq mac-command-modifier 'super
mac-option-modifier 'meta))
(setq mac-command-modifier 'super
mac-option-modifier 'meta
ns-command-modifier 'super
ns-option-modifier 'meta
ns-right-option-modifier 'none))
(IS-WINDOWS
(setq w32-lwindow-modifier 'super
w32-rwindow-modifier 'super)))

View File

@@ -220,19 +220,19 @@ writes to `standard-output'."
(funcall write-region start end filename append visit lockname mustbenew)))
,@forms))))
(defmacro if! (cond then &rest body)
(defmacro eval-if! (cond then &rest body)
"Expands to THEN if COND is non-nil, to BODY otherwise.
COND is checked at compile/expansion time, allowing BODY to be omitted
entirely when the elisp is byte-compiled. Use this for forms that contain
expensive macros that could safely be removed at compile time."
COND is checked at compile/expansion time, allowing BODY to be omitted entirely
when the elisp is byte-compiled. Use this for forms that contain expensive
macros that could safely be removed at compile time."
(declare (indent 2))
(if (eval cond)
then
(macroexp-progn body)))
(defmacro when! (cond &rest body)
(defmacro eval-when! (cond &rest body)
"Expands to BODY if CONDITION is non-nil at compile/expansion time.
See `if!' for details on this macro's purpose."
See `eval-if!' for details on this macro's purpose."
(declare (indent 1))
(when (eval cond)
(macroexp-progn body)))
@@ -639,7 +639,7 @@ testing advice (when combined with `rotate-text').
;;
;;; Backports
(when! (version< emacs-version "27.0.90")
(eval-when! (version< emacs-version "27.0.90")
;; DEPRECATED Backported from Emacs 27
(defmacro setq-local (&rest pairs)
"Make variables in PAIRS buffer-local and assign them the corresponding values.

View File

@@ -39,7 +39,8 @@ run before `doom-init-modules-hook'. Relevant to `doom-module-init-file'.")
(vterm (:term vterm))
(password-store (:tools pass))
(flycheck (:checkers syntax))
(flyspell (:checkers spell)))
(flyspell (:checkers spell))
(macos (:os macos)))
(:emacs (electric-indent (:emacs electric))
(hideshow (:editor fold))
(eshell (:term eshell))
@@ -47,7 +48,8 @@ run before `doom-init-modules-hook'. Relevant to `doom-module-init-file'.")
(:ui (doom-modeline (:ui modeline))
(fci (:ui fill-column))
(evil-goggles (:ui ophints))
(tabbar (:ui tabs)))
(tabbar (:ui tabs))
(pretty-code (:ui ligatures)))
(:app (email (:email mu4e))
(notmuch (:email notmuch)))
(:lang (perl (:lang raku))))
@@ -441,7 +443,7 @@ otherwise, MODULES is a multiple-property list (a plist where each key can have
multiple, linear values).
The bootstrap process involves making sure the essential directories exist, core
packages are installed, `doom-autoload-file' is loaded, `doom-packages-file'
packages are installed, `doom-autoloads-file' is loaded, `doom-packages-file'
cache exists (and is loaded) and, finally, loads your private init.el (which
should contain your `doom!' block).

View File

@@ -97,9 +97,11 @@ uses a straight or package.el command directly).")
;; we don't have to deal with them at all.
autoload-compute-prefixes nil
;; We handle it ourselves
straight-fix-org nil
;; HACK Disable native-compilation for some troublesome files
comp-deferred-compilation-black-list '("/evil-collection-vterm\\.el$"))
straight-fix-org nil)
(with-eval-after-load 'straight
;; `let-alist' is built into Emacs 26 and onwards
(add-to-list 'straight-built-in-pseudo-packages 'let-alist))
(defadvice! doom--read-pinned-packages-a (orig-fn &rest args)
"Read `:pin's in `doom-packages' on top of straight's lockfiles."
@@ -126,7 +128,8 @@ uses a straight or package.el command directly).")
((null pin)
(funcall call "git" "clone" "--origin" "origin" repo-url repo-dir
"--depth" (number-to-string straight-vc-git-default-clone-depth)
"--branch" straight-repository-branch))
"--branch" straight-repository-branch
"--single-branch" "--no-tags"))
((integerp straight-vc-git-default-clone-depth)
(make-directory repo-dir t)
(let ((default-directory repo-dir))
@@ -134,7 +137,8 @@ uses a straight or package.el command directly).")
(funcall call "git" "checkout" "-b" straight-repository-branch)
(funcall call "git" "remote" "add" "origin" repo-url)
(funcall call "git" "fetch" "origin" pin
"--depth" (number-to-string straight-vc-git-default-clone-depth))
"--depth" (number-to-string straight-vc-git-default-clone-depth)
"--no-tags")
(funcall call "git" "checkout" "--detach" pin)))))
(require 'straight (concat repo-dir "/straight.el"))
(doom-log "Initializing recipes")
@@ -184,10 +188,20 @@ processed."
(error "Failed to read any packages"))
(dolist (package doom-packages)
(cl-destructuring-bind
(name &key recipe disable ignore &allow-other-keys) package
(name &key recipe disable ignore shadow &allow-other-keys) package
(unless ignore
(if disable
(cl-pushnew name doom-disabled-packages)
(when shadow
(straight-override-recipe (cons shadow '(:local-repo nil)))
(let ((site-load-path (copy-sequence doom--initial-load-path))
lib)
(while (setq
lib (locate-library (concat (symbol-name shadow) ".el")
nil site-load-path))
(let ((lib (directory-file-name (file-name-directory lib))))
(setq site-load-path (delete lib site-load-path)
load-path (delete lib load-path))))))
(when recipe
(straight-override-recipe (cons name recipe)))
(straight-register-package name)))))))
@@ -327,6 +341,7 @@ installed."
If ALL-P, gather packages unconditionally across all modules, including disabled
ones."
(let ((packages-file (concat doom-packages-file ".el"))
doom-disabled-packages
doom-packages)
(doom--read-packages
(doom-path doom-core-dir packages-file) all-p 'noerror)
@@ -338,10 +353,12 @@ ones."
(doom-files-in doom-modules-dir
:depth 2
:match "/packages\\.el$"))
;; We load the private packages file twice to ensure disabled packages
;; are seen ASAP, and a second time to ensure privately overridden
;; packages are properly overwritten.
(doom--read-packages private-packages nil 'noerror)
;; We load the private packages file twice to populate
;; `doom-disabled-packages' disabled packages are seen ASAP, and a
;; second time to ensure privately overridden packages are properly
;; overwritten.
(let (doom-packages)
(doom--read-packages private-packages nil 'noerror))
(cl-loop for key being the hash-keys of doom-modules
for path = (doom-module-path (car key) (cdr key) packages-file)
for doom--current-module = key
@@ -382,7 +399,7 @@ ones."
;;; Module package macros
(cl-defmacro package!
(name &rest plist &key built-in recipe ignore _type _pin _disable)
(name &rest plist &key built-in recipe ignore _type _pin _disable _shadow)
"Declares a package and how to install it (if applicable).
This macro is declarative and does not load nor install packages. It is used to
@@ -419,6 +436,10 @@ Accepts the following properties:
inform help commands like `doom/help-packages' that this is a built-in
package. If set to 'prefer, the package will not be installed if it is
already provided by Emacs.
:shadow PACKAGE
Informs Doom that this package is shadowing a built-in PACKAGE; the original
package will be removed from `load-path' to mitigate conflicts, and this new
package will satisfy any dependencies on PACKAGE in the future.
Returns t if package is successfully registered, and nil if it was disabled
elsewhere."
@@ -453,7 +474,7 @@ elsewhere."
(when-let (recipe (plist-get plist :recipe))
(cl-destructuring-bind
(&key local-repo _files _flavor
_no-build _no-byte-compile _no-autoloads
_no-build _no-byte-compile _no-native-compile _no-autoloads
_type _repo _host _branch _remote _nonrecursive _fork _depth)
recipe
;; Expand :local-repo from current directory
@@ -469,9 +490,10 @@ elsewhere."
(signal 'doom-package-error
(cons ,(symbol-name name)
(error-message-string e)))))
;; This is the only side-effect of this macro!
;; These are the only side-effects of this macro!
(setf (alist-get name doom-packages) plist)
(unless (plist-get plist :disable)
(if (plist-get plist :disable)
(add-to-list 'doom-disabled-packages name)
(with-no-warnings
(cons name plist)))))

View File

@@ -200,11 +200,6 @@ or if the current buffer is read-only or not file-visiting."
;; Remove hscroll-margin in shells, otherwise it causes jumpiness
(setq-hook! '(eshell-mode-hook term-mode-hook) hscroll-margin 0)
(when IS-MAC
;; sane trackpad/mouse scroll settings
(setq mac-redisplay-dont-reset-vscroll t
mac-mouse-wheel-smooth-scroll nil))
;;
;;; Cursor
@@ -307,33 +302,6 @@ windows, switch to `doom-fallback-buffer'. Otherwise, delegate to original
tool-bar-mode nil
scroll-bar-mode nil)
(when! IS-MAC
;; Curse Lion and its sudden but inevitable fullscreen mode!
;; NOTE Meaningless to railwaycat's emacs-mac build
(setq ns-use-native-fullscreen nil)
;; Visit files opened outside of Emacs in existing frame, not a new one
(setq ns-pop-up-frames nil)
;; Sets `ns-transparent-titlebar' and `ns-appearance' frame parameters so
;; window borders will match the enabled theme.
(and (or (daemonp)
(display-graphic-p))
(require 'ns-auto-titlebar nil t)
(ns-auto-titlebar-mode +1))
;; HACK On MacOS, disabling the menu bar makes MacOS treat Emacs as a
;; non-application window -- which means it doesn't automatically capture
;; focus when it is started, among other things. We enable menu-bar-lines
;; there, but we still want it disabled in terminal frames because there
;; it activates an ugly menu bar.
(add-hook! '(window-setup-hook after-make-frame-functions)
(defun doom-init-menu-bar-in-gui-frames-h (&optional frame)
"Re-enable menu-bar-lines in GUI frames."
(when-let (frame (or frame (selected-frame)))
(when (display-graphic-p frame)
(set-frame-parameter frame 'menu-bar-lines 1))))))
;; The native border "consumes" a pixel of the fringe on righter-most splits,
;; `window-divider' does not. Available since Emacs 25.1.
(setq window-divider-default-places t
@@ -630,7 +598,7 @@ behavior). Do not set this directly, this is let-bound in `doom-init-theme-h'.")
(run-hooks 'doom-load-theme-hook))
result)))
(when! (not EMACS27+)
(eval-when! (not EMACS27+)
;; DEPRECATED `doom--load-theme-a' handles this for us after the theme is
;; loaded, but this only works on Emacs 27+. Disabling old themes
;; must be done *before* the theme is loaded in Emacs 26.

View File

@@ -127,7 +127,7 @@ Use this for files that change often, like cache files. Must end with a slash.")
Defaults to ~/.config/doom, ~/.doom.d or the value of the DOOMDIR envvar;
whichever is found first. Must end in a slash.")
(defconst doom-autoload-file (concat doom-local-dir "autoloads.el")
(defconst doom-autoloads-file (concat doom-local-dir "autoloads.el")
"Where `doom-reload-core-autoloads' stores its core autoloads.
This file is responsible for informing Emacs where to find all of Doom's
@@ -270,6 +270,26 @@ config.el instead."
(apply orig-fn args)))
;;
;;; Native Compilation support (http://akrl.sdf.org/gccemacs.html)
;; Don't store eln files in ~/.emacs.d/eln-cache (they are likely to be purged
;; when upgrading Doom).
(when (boundp 'comp-eln-load-path)
(add-to-list 'comp-eln-load-path (concat doom-cache-dir "eln/")))
(after! comp
;; HACK `comp-eln-load-path' isn't fully respected yet, because native
;; compilation occurs in another emacs process that isn't seeded with our
;; value for `comp-eln-load-path', so we inject it ourselves:
(setq comp-async-env-modifier-form
`(progn
,comp-async-env-modifier-form
(setq comp-eln-load-path ',(bound-and-true-p comp-eln-load-path))))
;; HACK Disable native-compilation for some troublesome packages
(add-to-list 'comp-deferred-compilation-black-list "/evil-collection-vterm\\.el\\'"))
;;
;;; Optimizations
@@ -303,8 +323,9 @@ config.el instead."
(setq ffap-machine-p-known 'reject)
;; Font compacting can be terribly expensive, especially for rendering icon
;; fonts on Windows. Whether it has a notable affect on Linux and Mac hasn't
;; been determined, but we inhibit it there anyway.
;; fonts on Windows. Whether disabling it has a notable affect on Linux and Mac
;; hasn't been determined, but we inhibit it there anyway. This increases memory
;; usage, however!
(setq inhibit-compacting-font-caches t)
;; Performance on Windows is considerably worse than elsewhere. We'll need
@@ -319,10 +340,6 @@ config.el instead."
(unless IS-MAC (setq command-line-ns-option-alist nil))
(unless IS-LINUX (setq command-line-x-option-alist nil))
;; Delete files to trash on macOS, as an extra layer of precaution against
;; accidentally deleting wanted files.
(setq delete-by-moving-to-trash IS-MAC)
;; Adopt a sneaky garbage collection strategy of waiting until idle time to
;; collect; staving off the collector while the user is working.
(setq gcmh-idle-delay 5
@@ -330,8 +347,10 @@ config.el instead."
gcmh-verbose doom-debug-p)
;; HACK `tty-run-terminal-initialization' is *tremendously* slow for some
;; reason. Disabling it completely could have many side-effects, so we
;; defer it until later, at which time it (somehow) runs very quickly.
;; reason; inexplicably doubling startup time for terminal Emacs. Keeping
;; it disabled will have nasty side-effects, so we simply delay it until
;; later in the startup process and, for some reason, it runs much faster
;; when it does.
(unless (daemonp)
(advice-add #'tty-run-terminal-initialization :override #'ignore)
(add-hook! 'window-setup-hook
@@ -346,12 +365,12 @@ config.el instead."
;; File+dir local variables are initialized after the major mode and its hooks
;; have run. If you want hook functions to be aware of these customizations, add
;; them to MODE-local-vars-hook instead.
(defvar doom--inhibit-local-var-hooks nil)
(defvar doom-inhibit-local-var-hooks nil)
(defun doom-run-local-var-hooks-h ()
"Run MODE-local-vars-hook after local variables are initialized."
(unless doom--inhibit-local-var-hooks
(set (make-local-variable 'doom--inhibit-local-var-hooks) t)
(unless doom-inhibit-local-var-hooks
(set (make-local-variable 'doom-inhibit-local-var-hooks) t)
(run-hook-wrapped (intern-soft (format "%s-local-vars-hook" major-mode))
#'doom-try-run-hook)))
@@ -473,7 +492,7 @@ If RETURN-P, return the message as a string instead of displaying it."
"Bootstrap Doom, if it hasn't already (or if FORCE-P is non-nil).
The bootstrap process ensures that everything Doom needs to run is set up;
essential directories exist, core packages are installed, `doom-autoload-file'
essential directories exist, core packages are installed, `doom-autoloads-file'
is loaded (failing if it isn't), that all the needed hooks are in place, and
that `core-packages' will load when `package' or `straight' is used.
@@ -505,7 +524,7 @@ to least)."
load-path doom--initial-load-path
process-environment doom--initial-process-environment)
;; Doom caches a lot of information in `doom-autoload-file'. Module and
;; Doom caches a lot of information in `doom-autoloads-file'. Module and
;; package autoloads, autodefs like `set-company-backend!', and variables
;; like `doom-modules', `doom-disabled-packages', `load-path',
;; `auto-mode-alist', and `Info-directory-list'. etc. Compiling them into
@@ -514,18 +533,18 @@ to least)."
;; Avoid `file-name-sans-extension' for premature optimization reasons.
;; `string-remove-suffix' is cheaper because it performs no file sanity
;; checks; just plain ol' string manipulation.
(load (string-remove-suffix ".el" doom-autoload-file)
(load (string-remove-suffix ".el" doom-autoloads-file)
nil 'nomessage)
(file-missing
;; If the autoloads file fails to load then the user forgot to sync, or
;; aborted a doom command midway!
(if (equal (nth 3 e) doom-autoload-file)
(if (equal (nth 3 e) doom-autoloads-file)
(signal 'doom-error
(list "Doom is in an incomplete state"
"run 'bin/doom sync' on the command line to repair it"))
"run 'doom sync' on the command line to repair it"))
;; Otherwise, something inside the autoloads file is triggering this
;; error; forward it!
(apply #'doom-autoload-error e))))
(signal 'doom-autoload-error e))))
;; Load shell environment, optionally generated from 'doom env'. No need
;; to do so if we're in terminal Emacs, where Emacs correctly inherits

View File

@@ -4,6 +4,10 @@
;; core.el
(package! auto-minor-mode :pin "17cfa1b54800fdef2975c0c0531dad34846a5065")
(package! gcmh :pin "b1bde5089169a74f62033d027e06e98cbeedd43f")
(package! explain-pause-mode
:recipe (:host github
:repo "lastquestion/explain-pause-mode")
:pin "2356c8c3639cbeeb9751744dbe737267849b4b51")
;; core-packages.el
(package! straight
@@ -14,15 +18,15 @@
:local-repo "straight.el"
:files ("straight*.el")
:no-build t)
:pin "fc077dda27dc603c6a287d9cffe0bf0ba5018d66")
:pin "0c7c7571349b628d87acde474a754f05e86ca876")
;; core-modules.el
(package! use-package
:type 'core
:pin "7d925367ef0857d513d62eab4cb57b7436b9ffe9")
:pin "4fb1f9a68f1e7e7d614652afc017a6652fd029f1")
;; core-ui.el
(package! all-the-icons :pin "ed8e44de4fa601309d2bba902c3b37cb73e4daa0")
(package! all-the-icons :pin "8c0228053dd6693d926970d89270094be52b0f75")
(package! hide-mode-line :pin "88888825b5b27b300683e662fa3be88d954b1cea")
(package! highlight-numbers :pin "8b4744c7f46c72b1d3d599d4fb75ef8183dee307")
(package! rainbow-delimiters :pin "5125f4e47604ad36c3eb4706310fcafac729ca8c")
@@ -32,8 +36,6 @@
(package! better-jumper :pin "6d240032ca213ccb3347e25f26c29b6822bf03a7")
(package! dtrt-indent :pin "50c440c80e0d15303d8ab543bce4c56e9c2bf407")
(package! helpful :pin "c0662aa07266fe204f4e6d72ccaa6af089400556")
(when IS-MAC
(package! ns-auto-titlebar :pin "1efc30d38509647b417f05587fd7003457719256"))
(package! pcre2el :pin "0b5b2a2c173aab3fd14aac6cf5e90ad3bf58fa7d")
(package! smartparens :pin "555626a43f9bb1985aa9a0eb675f2b88b29702c8")
(package! so-long
@@ -50,8 +52,8 @@
:pin "2bb49d3ee7d2cba133bc7e9cdac416cd1c5e4fe0")
;; core-projects.el
(package! projectile :pin "bbcf781d3fddb8e00d0dc10eb68bc2528fb409b3")
(package! projectile :pin "46d2010c6a6cccfc4be72317f10ea99fd041ab54")
;; core-keybinds.el
(package! general :pin "a0b17d207badf462311b2eef7c065b884462cb7c")
(package! which-key :pin "3642c11d5ef9be3c6fb9edb8fd5ec3c370abd889")
(package! which-key :pin "e48e190a75a0c176e1deac218b891e77792d6921")

View File

@@ -28,7 +28,7 @@
(spy-on 'doom-initialize-packages :and-return-value t))
(it "initializes packages if core autoload file doesn't exist"
(let ((doom-autoload-file "doesnotexist"))
(let ((doom-autoloads-file "doesnotexist"))
(expect (doom-initialize nil 'noerror))
(expect 'doom-initialize-packages :to-have-been-called))
@@ -51,12 +51,12 @@
(it "loads autoloads files"
(ignore-errors (doom-initialize nil 'noerror))
(expect 'doom-load-autoloads-file
:to-have-been-called-with doom-autoload-file)
:to-have-been-called-with doom-autoloads-file)
(expect 'doom-load-autoloads-file
:to-have-been-called-with doom-package-autoload-file))
(it "throws doom-autoload-error when autoload files don't exist"
(let ((doom-autoload-file "doesnotexist")
(let ((doom-autoloads-file "doesnotexist")
(doom-package-autoload-file "doesnotexist"))
(expect (doom-initialize) :to-throw 'doom-autoload-error)))))
@@ -72,26 +72,26 @@
(expect 'require :to-have-been-called-with 'core-editor))))
(describe "doom-load-autoloads-file"
:var (doom-autoload-file doom-alt-autoload-file result)
:var (doom-autoloads-file doom-alt-autoload-file result)
(before-each
(setq doom-autoload-file (make-temp-file "doom-autoload" nil ".el"))
(with-temp-file doom-autoload-file)
(byte-compile-file doom-autoload-file))
(setq doom-autoloads-file (make-temp-file "doom-autoload" nil ".el"))
(with-temp-file doom-autoloads-file)
(byte-compile-file doom-autoloads-file))
(after-each
(delete-file doom-autoload-file)
(delete-file (byte-compile-dest-file doom-autoload-file)))
(delete-file doom-autoloads-file)
(delete-file (byte-compile-dest-file doom-autoloads-file)))
(it "loads the byte-compiled autoloads file if available"
(doom-load-autoloads-file doom-autoload-file)
(doom-load-autoloads-file doom-autoloads-file)
(expect (caar load-history) :to-equal-file
(byte-compile-dest-file doom-autoload-file))
(byte-compile-dest-file doom-autoloads-file))
(delete-file (byte-compile-dest-file doom-autoload-file))
(doom-load-autoloads-file doom-autoload-file)
(expect (caar load-history) :to-equal-file doom-autoload-file))
(delete-file (byte-compile-dest-file doom-autoloads-file))
(doom-load-autoloads-file doom-autoloads-file)
(expect (caar load-history) :to-equal-file doom-autoloads-file))
(it "returns non-nil if successful"
(expect (doom-load-autoloads-file doom-autoload-file)))
(expect (doom-load-autoloads-file doom-autoloads-file)))
(it "returns nil on failure or error, non-fatally"
(expect (doom-load-autoloads-file "/does/not/exist") :to-be nil)))

View File

@@ -152,7 +152,7 @@ It is integrated into Helpful, in Doom.
*** custom-theme-set-faces!
#+BEGIN_SRC elisp :eval no
(custom-theme-set-faces! 'doom-one-theme
(custom-theme-set-faces! 'doom-one
'(outline-1 :weight normal)
'(outline-2 :weight normal)
'(outline-3 :weight normal)

View File

@@ -479,10 +479,10 @@ lines (200 characters+) and we've got ourselves a really poor experience. And
that's before we factor in plugins and poorly optimized major modes.
There is an unfortunate but necessary adjustment of expectations new users must
undergo, when they adopt Emacs. Doom has inherited this curse. It's raison
d'etre is to improve the situation, but I can only go so far, especially if you
choose to enable all the most expensive features. You will unavoidable find
cases where Emacs *is just slow*.
undergo, when they adopt Emacs. Doom has inherited this curse. Its raison d'etre
is to improve the situation, but I can only go so far, especially if you choose
to enable all the most expensive features. You will unavoidably find cases where
Emacs *is just slow*.
What can you do about it?
@@ -492,7 +492,7 @@ What can you do about it?
but can be a bit of a hassle to set up. There are packages available for
[[https://aur.archlinux.org/packages/emacs-native-comp-git/][Arch Linux]], [[https://github.com/flatwhatson/guix-channel][Guix]] and [[https://github.com/nix-community/emacs-overlay][Nix users]]. [[https://www.emacswiki.org/emacs/GccEmacs][More information available on EmacsWiki]].
3. Disable some of Doom's slowest modules. The biggest offenders tend to be:
=:ui tabs=, =:ui indent-guides=, =:ui pretty-code=, =:ui word-wrap= and =:ui
=:ui tabs=, =:ui indent-guides=, =:ui ligatures=, =:editor word-wrap= and =:ui
vc-gutter=.
4. Turn off line numbers ~(setq display-line-numbers-type nil)~. It's known to
slow down scrolling, in particular.
@@ -1213,7 +1213,7 @@ Here are a few common causes for random crashes:
Or disable the =:ui doom-dashboard= & =:tools magit= modules (see [[https://github.com/hlissner/doom-emacs/issues/1170][#1170]]).
+ Ligatures and some fonts can cause Emacs to crash. You may want to try a
different font, or disable the =:ui pretty-code= module.
different font, or disable the =:ui ligatures module.
** Can't load my theme; ~unable to find theme file for X~ errors
This means Emacs can't find the X-theme.el file for the theme you want to load.

View File

@@ -52,8 +52,6 @@ us know!
- [[#disabling-packages][Disabling packages]]
- [[#changing-a-recipe-for-a-included-package][Changing a recipe for a included package]]
- [[#usingloading-local-packages][Using/loading local packages]]
- [[#adjust-your-load-path][Adjust your ~load-path~]]
- [[#local-repo][:local-repo]]
- [[#configuring-doom][Configuring Doom]]
- [[#configuring-packages][Configuring packages]]
- [[#reloading-your-config][Reloading your config]]
@@ -155,8 +153,7 @@ pacman -S git emacs ripgrep
pacman -S fd
#+END_SRC
The above installs Emacs 26.3 (at the time of writing). To acquire Emacs 27
[[https://aur.archlinux.org/packages/emacs27-git/][emacs27-git]] is available on the AUR.
The above installs Emacs 27 (at the time of writing).
**** NixOS
On NixOS Emacs 26.3 can be installed via ~nix-env -Ai nixos.emacs~, or
@@ -248,8 +245,6 @@ to least recommended for Doom (based on compatibility).
ln -s /usr/local/opt/emacs-plus/Emacs.app /Applications/Emacs.app
#+END_SRC
Replace =emacs-plus= with =emacs-plus@27= to install Emacs 27.x instead.
- [[https://bitbucket.org/mituharu/emacs-mac/overview][emacs-mac]] is another acceptable option. It offers slightly better integration
with macOS, native emojis and better childframe support. However, at the time
of writing, it [[https://github.com/railwaycat/homebrew-emacsmacport/issues/52][lacks multi-tty support]] (which impacts daemon usage):
@@ -917,40 +912,42 @@ changes.
#+end_quote
*** Using/loading local packages
Say you have a local elisp package that you are developing, and want to
"install" it for live testing. You have two options:
**** Adjust your ~load-path~
Emacs searches for packages in your ~load-path~. Add the path to your package
and Emacs will find it when it tries to load it. e.g.
Say you are developing an Emacs package locally and want to "install" it for
live testing. To do this specify a ~:local-repo~ in that package's recipe:
#+BEGIN_SRC elisp
(add-load-path! "lisp/package")
(package! my-package
:recipe (:local-repo "/path/to/my/package"))
;; Relative paths are expanded to ~/.emacs.d/.local/straight/repos/{local-repo}
;; or ~/.doom.d/{local-repo} -- the first that is found.
(package! my-package
:recipe (:local-repo "my/package")) ; looks for ~/.doom.d/my/package/my-package.el
(package! my-package
:recipe (:local-repo "/path/to/my/package"
;; By default, the package manager grabs all *.el files at the root
;; of the project and nothing else. To include other files, or
;; accommodate unconventional project structures, specify what :files
;; you want:
:files ("*.el" "src/lisp/*.el")
;; With ':no-byte-compile t' you can avoid having to run 'doom sync'
;; every time you change the package.
:no-byte-compile t))
#+END_SRC
Alternatively, add the package's location to Emacs' ~load-path~. Do this if you
don't need/care for autoload cookies or byte-compilation:
#+BEGIN_SRC elisp
;; Doom has modified `use-package's `:load-path' to expand relative paths from
;; your DOOMDIR. e.g. ~/.doom.d/lisp/package
(use-package my-package
:load-path "lisp/package")
;; or
(use-package my-package
:load-path "/path/to/my/package")
#+END_SRC
**** :local-repo
Alternatively, you can specify a ~:local-repo~ in a ~package!~'s ~:recipe~
declaration:
#+BEGIN_SRC elisp
(package! my-package :recipe (:local-repo "/path/to/my/package"))
;; Don't forget to use :files to include files in an unconventional project structure:
(package! my-package
:recipe (:local-repo "/path/to/my/package"
:files ("*.el" "src/lisp/*.el")))
;; It is recommended you use ':no-byte-compile t' as well, so you don't have to
;; run `doom build -r` every time you make a change to your package.
(package! my-package
:recipe (:local-repo "/path/to/my/package"
:files ("*.el" "src/lisp/*.el")
:no-byte-compile t))
(add-load-path! "lisp/package")
#+END_SRC
#+begin_quote

View File

@@ -26,3 +26,7 @@
;; in this file and can conflict with later config (particularly where the
;; cursor color is concerned).
(advice-add #'x-apply-session-resources :override #'ignore)
;; Prevent unwanted runtime builds; packages are compiled ahead-of-time when
;; they are installed and site files are compiled when gccemacs is installed.
(setq comp-deferred-compilation nil)

View File

@@ -17,6 +17,7 @@
(doom! :input
;;chinese
;;japanese
;;layout ; auie,ctsrnm is the superior home row
:completion
company ; the ultimate code completion backend
@@ -33,13 +34,13 @@
hl-todo ; highlight TODO/FIXME/NOTE/DEPRECATED/HACK/REVIEW
;;hydra
;;indent-guides ; highlighted indent columns
;;ligatures ; ligatures and symbols to make your code pretty again
;;minimap ; show a map of the code on the side
modeline ; snazzy, Atom-inspired modeline, plus API
;;nav-flash ; blink cursor line after big motions
;;neotree ; a project drawer, like NERDTree for vim
ophints ; highlight the region an operation acts on
(popup +defaults) ; tame sudden yet inevitable temporary windows
;;pretty-code ; ligatures or substitute text with pretty symbols
;;tabs ; a tab bar for Emacs
;;treemacs ; a project drawer, like neotree but cooler
;;unicode ; extended unicode support for various languages
@@ -92,7 +93,6 @@
;;gist ; interacting with github gists
lookup ; navigate your code and its documentation
;;lsp
;;macos ; MacOS-specific commands
magit ; a git porcelain for Emacs
;;make ; run make tasks from Emacs
;;pass ; password manager for nerds
@@ -105,6 +105,7 @@
;;upload ; map local to remote projects via ssh/ftp
:os
(:if IS-MAC macos) ; improve compatibility with macOS
;;tty ; improve the terminal Emacs experience
:lang

View File

@@ -21,7 +21,7 @@ This module provides no flags.
** Packages
+ [[https://github.com/kiwanami/emacs-calfw][calfw]]
+ [[https://github.com/kiwanami/emacs-calfw][calfw-org]]
+ [[https://github.com/myuhe/org-gcal.el][org-gcal]]
+ [[https://github.com/kidd/org-gcal.el][org-gcal]]
* Configuration
** Changing calendar sources

View File

@@ -5,4 +5,4 @@
(package! calfw-org :pin "03abce97620a4a7f7ec5f911e669da9031ab9088")
(package! calfw-cal :pin "03abce97620a4a7f7ec5f911e669da9031ab9088")
(package! calfw-ical :pin "03abce97620a4a7f7ec5f911e669da9031ab9088")
(package! org-gcal :pin "744505832b34e07b44a5d97d8720b2d7492d7fc9")
(package! org-gcal :pin "2cad2d8c175975dea42903cd4e3fd8bec423c01a")

View File

@@ -1,5 +1,5 @@
;; -*- no-byte-compile: t; -*-
;;; app/irc/packages.el
(package! circe :pin "e5bf5f89741a9c43aa406491e94dd8d58c302fb4")
(package! circe :pin "89aac22259e5d09ae1183e0df163338fe491e9e7")
(package! circe-notifications :pin "291149ac12877bbd062da993479d3533a26862b0")

View File

@@ -1,5 +1,5 @@
;; -*- no-byte-compile: t; -*-
;;; app/rss/packages.el
(package! elfeed :pin "d0405e63863e54a01200740a6717ac875eceabc1")
(package! elfeed :pin "8fb09ad75f2ff7d6f7d8b8d1ac65b9be873cc31d")
(package! elfeed-org :pin "77b6bbf222487809813de260447d31c4c59902c9")

View File

@@ -2,4 +2,4 @@
;;; app/twitter/packages.el
(package! twittering-mode :pin "114891e8fdb4f06b1326a6cf795e49c205cf9e29")
(package! avy :pin "509471bad0e8094b8639729ec39ca141fae7d4bd")
(package! avy :pin "bbf1e7339eba06784dfe86643bb0fbddf5bb0342")

View File

@@ -1,7 +1,7 @@
;; -*- no-byte-compile: t; -*-
;;; completion/company/packages.el
(package! company :pin "5eb7d868c2a13bbfb14060b79d69f0d59f6a5f60")
(package! company :pin "4462e7d399c3d2e1ea1f5d018f4537f1f3d5acfc")
(package! company-dict :pin "cd7b8394f6014c57897f65d335d6b2bd65dab1f4")
(when (featurep! +childframe)
(package! company-box :pin "889d723786df2de27d248c9965149d04af44273a"))
(package! company-box :pin "d8f71fde7a3301a62f9f6f627aa51610a294f4df"))

View File

@@ -1,7 +1,7 @@
;; -*- no-byte-compile: t; -*-
;;; completion/helm/packages.el
(package! helm :pin "5d224cb889aea8f090c82c5ae572b8db276bcf80")
(package! helm :pin "d2fbf66ea727f27cdf867b2bd6d6f7c706f99192")
(package! helm-rg :pin "ee0a3c09da0c843715344919400ab0a0190cc9dc")
(package! helm-c-yasnippet :pin "89cc8561e7e57e9d1070ee3641df019c7f49c5dd")
(package! helm-company :pin "6eb5c2d730a60e394e005b47c1db018697094dde")
@@ -13,7 +13,7 @@
(when (featurep! +fuzzy)
(package! helm-flx :pin "6640fac5cb16bee73c95b8ed1248a4e5e113690e"))
(when (featurep! +childframe)
(package! posframe :pin "922e4d239f7a083213d856de67a9686a091b1e27"))
(package! posframe :pin "7b92a54e588889a74d36d51167e067676db7be8a"))
(when (featurep! :lang org)
(package! helm-org :pin "b7a18dfc17e8b933956d61d68c435eee03a96c24"))
(package! helm-descbinds :pin "b72515982396b6e336ad7beb6767e95a80fca192")

View File

@@ -19,7 +19,7 @@
- [[#in-buffer-searching][In-buffer searching]]
- [[#ivy-integration-for-various-completing-commands][Ivy integration for various completing commands]]
- [[#general][General]]
- [[#jump-to-files-buffers-or-projects][Jump to files, buffers or projects)]]
- [[#jump-to-files-buffers-or-projects][Jump to files, buffers or projects]]
- [[#search][Search]]
- [[#configuration][Configuration]]
- [[#enable-fuzzynon-fuzzy-search-for-specific-commands][Enable fuzzy/non-fuzzy search for specific commands]]
@@ -164,7 +164,7 @@ A wgrep buffer can be opened from swiper with =C-c C-e=.
| =M-x=, =SPC := | Smarter, smex-powered M-x |
| =SPC '= | Resume last ivy session |
*** Jump to files, buffers or projects)
*** Jump to files, buffers or projects
| Keybind | Description |
|----------------------+---------------------------------------|
| =SPC RET= | Find bookmark |

View File

@@ -46,6 +46,11 @@ results buffer.")
[remap persp-switch-to-buffer] #'+ivy/switch-workspace-buffer
[remap evil-show-jumps] #'+ivy/jump-list)
:config
;; The default sorter is much to slow and the default for `ivy-sort-max-size'
;; is way too big (30,000). Turn it down so big repos affect project
;; navigation less.
(setq ivy-sort-max-size 7500)
;; Counsel changes a lot of ivy's state at startup; to control for that, we
;; need to load it as early as possible. Some packages (like `ivy-prescient')
;; require this.
@@ -220,7 +225,7 @@ evil-ex-specific constructs, so we disable it solely in evil-ex."
(listp counsel-rg-base-command)
(member "--path-separator" counsel-rg-base-command))
(setf (cadr (member "--path-separator" counsel-rg-base-command))
"//"))
"/"))
;; Integrate with `helpful'
(setq counsel-describe-function-function #'helpful-callable
@@ -376,9 +381,11 @@ evil-ex-specific constructs, so we disable it solely in evil-ex."
'(literal regexp initialism)))
:config
(setq ivy-prescient-sort-commands
'(:not swiper swiper-isearch ivy-switch-buffer counsel-grep
counsel-git-grep counsel-ag counsel-rg counsel-imenu
counsel-yank-pop counsel-recentf counsel-buffer-or-recentf)
'(:not swiper swiper-isearch ivy-switch-buffer
lsp-ivy-workspace-symbol ivy-resume ivy--restore-session
counsel-grep counsel-git-grep counsel-rg counsel-ag
counsel-ack counsel-fzf counsel-pt counsel-imenu
counsel-yank-pop counsel-recentf counsel-buffer-or-recentf)
ivy-prescient-retain-classic-highlighting t)
(defun +ivy-prescient-non-fuzzy (str)
(let ((prescient-filter-method '(literal regexp)))

View File

@@ -1,7 +1,7 @@
;; -*- no-byte-compile: t; -*-
;;; completion/ivy/packages.el
(package! swiper :pin "c6b60d34ac37bf4d91a25f16d22e528f85e06938")
(package! swiper :pin "9bb68419f1088ee4d8f2b76f84995fa02bceeed3")
(package! ivy)
(package! ivy-hydra)
(package! counsel)
@@ -12,7 +12,7 @@
(package! wgrep :pin "f0ef9bfa44db503cdb2f83fcfbd2fa4e2382ef1f")
(if (featurep! +prescient)
(package! ivy-prescient :pin "b11d79b10df12c58edc3487371c2c47dfb9b50e6")
(package! ivy-prescient :pin "cc289ba3b0d89f251267ca2b669d01b3afecc530")
(when (featurep! +fuzzy)
(package! flx :pin "17f5c9cb2af18aa6f52910ff4a5a63591261ced5")))

View File

@@ -47,8 +47,7 @@
:desc "LSP Code actions" "a" #'lsp-execute-code-action
:desc "LSP Organize imports" "o" #'lsp-organize-imports
:desc "LSP Rename" "r" #'lsp-rename
(:after lsp-mode
:desc "LSP" "l" lsp-command-map)
:desc "LSP" "l" #'+default/lsp-command-map
(:when (featurep! :completion ivy)
:desc "Jump to symbol in current workspace" "j" #'lsp-ivy-workspace-symbol
:desc "Jump to symbol in any workspace" "J" #'lsp-ivy-global-workspace-symbol)
@@ -119,6 +118,7 @@
:desc "Search project" "p" #'+default/search-project
:desc "Search other project" "P" #'+default/search-other-project
:desc "Search buffer" "s" #'+default/search-buffer
:desc "Search buffer for thing at point" "S" #'swiper-isearch-thing-at-point
:desc "Dictionary" "t" #'+lookup/dictionary-definition
:desc "Thesaurus" "T" #'+lookup/synonyms)
@@ -204,7 +204,7 @@
(:when (featurep! :term eshell)
:desc "Toggle eshell popup" "e" #'+eshell/toggle
:desc "Open eshell here" "E" #'+eshell/here)
(:when (featurep! :tools macos)
(:when (featurep! :os macos)
:desc "Reveal in Finder" "o" #'+macos/reveal-in-finder
:desc "Reveal project in Finder" "O" #'+macos/reveal-project-in-finder
:desc "Send to Transmit" "u" #'+macos/send-to-transmit
@@ -279,8 +279,10 @@
(:when (featurep! :lang org +present)
:desc "org-tree-slide mode" "p" #'org-tree-slide-mode)
:desc "Read-only mode" "r" #'read-only-mode
(:when (featurep! :checkers spell)
:desc "Flyspell" "s" #'flyspell-mode)
(:when (and (featurep! :checkers spell) (not (featurep! :checkers spell +flyspell)))
:desc "Spell checker" "s" #'spell-fu-mode)
(:when (featurep! :checkers spell +flyspell)
:desc "Spell checker" "s" #'flyspell-mode)
(:when (featurep! :lang org +pomodoro)
:desc "Pomodoro timer" "t" #'org-pomodoro)
(:when (featurep! :ui zen)

View File

@@ -132,11 +132,7 @@
"C-j" #'company-select-next-or-abort
"C-k" #'company-select-previous-or-abort
"C-s" (cmd! (company-search-abort) (company-filter-candidates))
[escape] #'company-search-abort))
;; TAB auto-completion in term buffers
(:after comint :map comint-mode-map
"TAB" #'company-complete
[tab] #'company-complete))
[escape] #'company-search-abort)))
(:when (featurep! :completion ivy)
(:after ivy
@@ -341,37 +337,36 @@
;;; <leader> c --- code
(:prefix-map ("c" . "code")
(:when (and (featurep! :tools lsp) (not (featurep! :tools lsp +eglot)))
:desc "LSP Execute code action" "a" #'lsp-execute-code-action
:desc "LSP Organize imports" "o" #'lsp-organize-imports
(:when (featurep! :completion ivy)
:desc "Jump to symbol in current workspace" "j" #'lsp-ivy-workspace-symbol
:desc "Jump to symbol in any workspace" "J" #'lsp-ivy-global-workspace-symbol)
(:when (featurep! :completion helm)
:desc "Jump to symbol in current workspace" "j" #'helm-lsp-workspace-symbol
:desc "Jump to symbol in any workspace" "J" #'helm-lsp-global-workspace-symbol)
:desc "LSP Rename" "r" #'lsp-rename
(:after lsp-mode
:desc "LSP" "l" lsp-command-map))
(:when (featurep! :tools lsp +eglot)
:desc "LSP Execute code action" "a" #'eglot-code-actions
:desc "LSP Rename" "r" #'eglot-rename
:desc "LSP Find declaration" "j" #'eglot-find-declaration)
:desc "Compile" "c" #'compile
:desc "Recompile" "C" #'recompile
:desc "Jump to definition" "d" #'+lookup/definition
:desc "Jump to references" "D" #'+lookup/references
:desc "Evaluate buffer/region" "e" #'+eval/buffer-or-region
:desc "Evaluate & replace region" "E" #'+eval:replace-region
:desc "Format buffer/region" "f" #'+format/region-or-buffer
:desc "Find implementations" "i" #'+lookup/implementations
:desc "Jump to documentation" "k" #'+lookup/documentation
:desc "Send to repl" "s" #'+eval/send-region-to-repl
:desc "Find type definition" "t" #'+lookup/type-definition
:desc "Delete trailing whitespace" "w" #'delete-trailing-whitespace
:desc "Delete trailing newlines" "W" #'doom/delete-trailing-newlines
:desc "List errors" "x" #'flymake-show-diagnostics-buffer
(:when (featurep! :checkers syntax)
:desc "List errors" "x" #'flycheck-list-errors))
:desc "LSP Execute code action" "a" #'lsp-execute-code-action
:desc "LSP Organize imports" "o" #'lsp-organize-imports
(:when (featurep! :completion ivy)
:desc "Jump to symbol in current workspace" "j" #'lsp-ivy-workspace-symbol
:desc "Jump to symbol in any workspace" "J" #'lsp-ivy-global-workspace-symbol)
(:when (featurep! :completion helm)
:desc "Jump to symbol in current workspace" "j" #'helm-lsp-workspace-symbol
:desc "Jump to symbol in any workspace" "J" #'helm-lsp-global-workspace-symbol)
:desc "LSP" "l" #'+default/lsp-command-map
:desc "LSP Rename" "r" #'lsp-rename)
(:when (featurep! :tools lsp +eglot)
:desc "LSP Execute code action" "a" #'eglot-code-actions
:desc "LSP Rename" "r" #'eglot-rename
:desc "LSP Find declaration" "j" #'eglot-find-declaration)
:desc "Compile" "c" #'compile
:desc "Recompile" "C" #'recompile
:desc "Jump to definition" "d" #'+lookup/definition
:desc "Jump to references" "D" #'+lookup/references
:desc "Evaluate buffer/region" "e" #'+eval/buffer-or-region
:desc "Evaluate & replace region" "E" #'+eval:replace-region
:desc "Format buffer/region" "f" #'+format/region-or-buffer
:desc "Find implementations" "i" #'+lookup/implementations
:desc "Jump to documentation" "k" #'+lookup/documentation
:desc "Send to repl" "s" #'+eval/send-region-to-repl
:desc "Find type definition" "t" #'+lookup/type-definition
:desc "Delete trailing whitespace" "w" #'delete-trailing-whitespace
:desc "Delete trailing newlines" "W" #'doom/delete-trailing-newlines
:desc "List errors" "x" #'flymake-show-diagnostics-buffer
(:when (featurep! :checkers syntax)
:desc "List errors" "x" #'flycheck-list-errors))
;;; <leader> f --- file
(:prefix-map ("f" . "file")
@@ -545,7 +540,7 @@
(:when (featurep! :term eshell)
:desc "Toggle eshell popup" "e" #'+eshell/toggle
:desc "Open eshell here" "E" #'+eshell/here)
(:when (featurep! :tools macos)
(:when (featurep! :os macos)
:desc "Reveal in Finder" "o" #'+macos/reveal-in-finder
:desc "Reveal project in Finder" "O" #'+macos/reveal-project-in-finder
:desc "Send to Transmit" "u" #'+macos/send-to-transmit
@@ -645,6 +640,7 @@
:desc "Search other project" "P" #'+default/search-other-project
:desc "Jump to mark" "r" #'evil-show-marks
:desc "Search buffer" "s" #'+default/search-buffer
:desc "Search buffer for thing at point" "S" #'swiper-isearch-thing-at-point
:desc "Dictionary" "t" #'+lookup/dictionary-definition
:desc "Thesaurus" "T" #'+lookup/synonyms)
@@ -665,8 +661,10 @@
(:when (featurep! :lang org +present)
:desc "org-tree-slide mode" "p" #'org-tree-slide-mode)
:desc "Read-only mode" "r" #'read-only-mode
(:when (featurep! :checkers spell)
:desc "Flyspell" "s" #'flyspell-mode)
(:when (and (featurep! :checkers spell) (not (featurep! :checkers spell +flyspell)))
:desc "Spell checker" "s" #'spell-fu-mode)
(:when (featurep! :checkers spell +flyspell)
:desc "Spell checker" "s" #'flyspell-mode)
(:when (featurep! :lang org +pomodoro)
:desc "Pomodoro timer" "t" #'org-pomodoro)
:desc "Soft line wrapping" "w" #'visual-line-mode

View File

@@ -15,7 +15,7 @@
ivy-switch-buffer-map))
((featurep! :completion helm)
'(helm-map
helm-ag-map
helm-rg-map
helm-read-file-map))))
"A list of all the keymaps used for the minibuffer.")

View File

@@ -12,64 +12,68 @@ byte-compiled from.")
(defvar org-mode-hook)
(defvar org-inhibit-startup)
;;;###autoload (add-hook 'org-mode-hook #'+literate-enable-recompile-h)
;;;###autoload
(defun +literate-tangle-h ()
"Tangles `+literate-config-file' if it has changed."
(print! (start "Compiling your literate config..."))
(print-group!
(let* ((default-directory doom-private-dir)
(org (expand-file-name +literate-config-file))
(dest (concat (file-name-sans-extension +literate-config-file) ".el")))
(and (require 'ox)
(require 'ob-tangle)
(letf! (;; Operate on a copy because `org-babel-tangle' has
;; side-effects we need to undo immediately as not to
;; overwrite the user's config; it's bad ettiquite.
(backup (make-temp-file (concat (file-name-nondirectory org) ".")))
;; A hack to prevent ob-tangle from operating relative to the
;; backup file and thus tangling to the wrong destinations.
(defun org-babel-tangle-single-block (&rest args)
(let* ((spec (apply org-babel-tangle-single-block args))
(file (nth 1 spec))
(file (if (file-equal-p file backup) org file))
(file (if org-babel-tangle-use-relative-file-links
(file-relative-name file)
file)))
(setf (nth 1 spec) file)
spec))
;; Ensure output conforms to the formatting of all doom CLIs
(defun message (msg &rest args)
(when msg
(print! (info "%s") (apply #'format msg args)))))
(unwind-protect
(with-temp-file backup
(insert-file-contents org)
(let ((buffer-file-name backup)
;; Prevent unwanted entries in recentf, or formatters, or
;; anything that could be on these hooks, really. Nothing
;; else should be touching these files (particularly in
;; interactive sessions).
(write-file-functions nil)
(before-save-hook nil)
(after-save-hook nil)
;; Prevent infinite recursion due to recompile-on-save
;; hooks later, and speed up `org-mode' init.
(org-mode-hook nil)
(org-inhibit-startup t))
(org-mode)
(with-silent-modifications
;; Tangling won't ordinarily expand #+INCLUDE directives,
;; so I do it myself.
(org-export-expand-include-keyword)
(org-babel-tangle nil dest))))
(ignore-errors (delete-file backup)))
;; Write an empty file to serve as our mtime cache
(with-temp-file +literate-config-cache-file)
t)))))
(and (not (getenv "__NOTANGLE"))
(require 'ox nil t)
(require 'ob-tangle nil t)
(letf! ((default-directory doom-private-dir)
(target +literate-config-file)
(cache +literate-config-cache-file)
(dest (expand-file-name (concat (file-name-base target) ".el")))
;; Operate on a copy because `org-babel-tangle' has
;; side-effects we need to undo immediately as not to
;; overwrite the user's config; it's bad ettiquite.
(backup (make-temp-file (concat (file-name-nondirectory target) ".")))
;;;###autoload
(add-hook 'org-mode-hook #'+literate-enable-recompile-h)
;; HACK A hack to prevent ob-tangle from operating relative to
;; the backup file and thus tangling to the wrong
;; destinations.
(defun org-babel-tangle-single-block (&rest args)
(let* ((spec (apply org-babel-tangle-single-block args))
(file (nth 1 spec))
(file (if (file-equal-p file backup) target file))
(file (if org-babel-tangle-use-relative-file-links
(file-relative-name file)
file)))
(setf (nth 1 spec) file)
spec))
;; Ensure output conforms to the formatting of all doom CLIs
(defun message (msg &rest args)
(when msg
(print! (info "%s") (apply #'format msg args)))))
(print! (start "Compiling your literate config..."))
(print-group!
(unwind-protect
(with-temp-file backup
(insert-file-contents target)
(let ((buffer-file-name backup)
;; Prevent unwanted entries in recentf, or formatters, or
;; anything that could be on these hooks, really. Nothing
;; else should be touching these files (particularly in
;; interactive sessions).
(write-file-functions nil)
(before-save-hook nil)
(after-save-hook nil)
;; Prevent infinite recursion due to recompile-on-save
;; hooks later, and speed up `org-mode' init.
(org-mode-hook nil)
(org-inhibit-startup t))
(org-mode)
(with-silent-modifications
;; Tangling won't ordinarily expand #+INCLUDE directives,
;; so I do it myself.
(org-export-expand-include-keyword)
(org-babel-tangle nil dest))))
(ignore-errors (delete-file backup)))
;; Write an empty file to serve as our mtime cache
(with-temp-file cache)
(if doom-interactive-p t
(message "Restarting..." )
(throw 'exit "__NOTANGLE=1 $@"))))))
;;;###autoload
(defalias '+literate/reload #'doom/reload)
@@ -85,5 +89,6 @@ byte-compiled from.")
We assume any org file in `doom-private-dir' is connected to your literate
config, and should trigger a recompile if changed."
(when (file-in-directory-p buffer-file-name doom-private-dir)
(+literate-tangle-h)))
(and (file-in-directory-p
buffer-file-name (file-name-directory +literate-config-file))
(+literate-tangle-h)))

View File

@@ -176,6 +176,29 @@ more information on modifiers."
(balance-windows (window-parent)))
(if file (evil-edit file)))
;;;###autoload (autoload '+evil-join-a "editor/evil/autoload/advice" nil nil)
(evil-define-operator +evil-join-a (beg end)
"Join the selected lines.
This advice improves on `evil-join' by removing comment delimiters when joining
commented lines, by using `fill-region-as-paragraph'.
From https://github.com/emacs-evil/evil/issues/606"
:motion evil-line
(let* ((count (count-lines beg end))
(count (if (> count 1) (1- count) count))
(fixup-mark (make-marker)))
(dotimes (var count)
(if (and (bolp) (eolp))
(join-line 1)
(let* ((end (line-beginning-position 3))
(fill-column (1+ (- end beg))))
(set-marker fixup-mark (line-end-position))
(fill-region-as-paragraph beg end nil t)
(goto-char fixup-mark)
(fixup-whitespace))))
(set-marker fixup-mark nil)))
;;;###autoload
(defun +evil--fix-dabbrev-in-minibuffer-h ()
"Make `try-expand-dabbrev' from `hippie-expand' work in minibuffer. See

View File

@@ -155,6 +155,17 @@ directives. By default, this only recognizes C directives.")
(run-at-time 0.1 nil #'helpful-key key-sequence)
(abort-recursive-edit)))
;; Make J (evil-join) remove comment delimiters when joining lines.
(advice-add #'evil-join :override #'+evil-join-a)
;; Prevent gw (`evil-fill') and gq (`evil-fill-and-move') from squeezing
;; spaces. It doesn't in vim, so it shouldn't in evil.
(defadvice! +evil--no-squeeze-on-fill-a (orig-fn &rest args)
:around '(evil-fill evil-fill-and-move)
(letf! (defun fill-region (from to &optional justify nosqueeze to-eop)
(funcall fill-region from to justify t to-eop))
(apply orig-fn args)))
;; Make ESC (from normal mode) the universal escaper. See `doom-escape-hook'.
(advice-add #'evil-force-normal-state :after #'+evil-escape-a)
@@ -373,16 +384,18 @@ directives. By default, this only recognizes C directives.")
;;; Keybinds
;; Keybinds that have no Emacs+evil analogues (i.e. don't exist):
;; zq - mark word at point as good word
;; zw - mark word at point as bad
;; zu{q,w} - undo last marking
;; Keybinds that evil define:
;; z= - correct flyspell word at point
;; ]s - jump to previous spelling error
;; [s - jump to next spelling error
(map! :v "@" #'+evil:apply-macro
;; implement dictionary keybinds
;; evil already defines 'z=' to `ispell-word' = correct word at point
(:when (featurep! :checkers spell)
:n "zq" #'+spell/add-word
:n "zw" #'+spell/remove-word
:m "[s" #'+spell/previous-error
:m "]s" #'+spell/next-error)
;; ported from vim-unimpaired
:n "] SPC" #'+evil/insert-newline-below
:n "[ SPC" #'+evil/insert-newline-above

View File

@@ -1,7 +1,7 @@
;; -*- no-byte-compile: t; -*-
;;; editor/evil/packages.el
(package! evil :pin "2bc6ca3587502fde67b93e411e329fc8224c916a")
(package! evil :pin "1e7aa5bfbd86feff0ed5982e487070352d326b90")
(package! evil-args :pin "758ad5ae54ad34202064fec192c88151c08cb387")
(package! evil-easymotion :pin "f96c2ed38ddc07908db7c3c11bcd6285a3e8c2e9")
(package! evil-embrace :pin "4379adea032b25e359d01a36301b4a5afdd0d1b7")
@@ -33,4 +33,4 @@
(package! neotree)
(autoload 'neotree-make-executor "neotree" nil nil 'macro))
(package! evil-collection :pin "3e62b6b1312f7907081be41a032aaacffa732fef"))
(package! evil-collection :pin "c136589d9584e5d01a4b3f2e4cf8ac5f5a23be63"))

View File

@@ -1,4 +1,4 @@
;; -*- no-byte-compile: t; -*-
;;; editor/file-templates/packages.el
(package! yasnippet :pin "5b1217ab085fab4abeb1118dccb260691b446703")
(package! yasnippet :pin "5cbdbf0d2015540c59ed8ee0fcf4788effdf75b6")

View File

@@ -3,6 +3,6 @@
(package! hideshow :built-in t)
(package! vimish-fold :pin "63685239655a151181b9152e45478dad587f86f2")
(package! vimish-fold :pin "9d12e39f01da517565666e09a2e32e01aed24a90")
(when (featurep! :editor evil)
(package! evil-vimish-fold :pin "b6e0e6b91b8cd047e80debef1a536d9d49eef31a"))

View File

@@ -1,4 +1,4 @@
;; -*- no-byte-compile: t; -*-
;;; editor/god/packages.el
(package! god-mode :pin "1eb6ef3a4f67a805c5d6deb1e3895b6c853707d7")
(package! god-mode :pin "ad2e6745294843462f78768b5a1cd3b0d3563951")

View File

@@ -22,7 +22,7 @@
'((operators normal)
c-w
(prettify insert)
(atom-movement normal visual)
(atom-movement t)
slurp/barf-lispy
additional
additional-insert))

View File

@@ -1,6 +1,6 @@
;; -*- no-byte-compile: t; -*-
;;; editor/lispyville/packages.el
(package! lispy :pin "cdaa9c70ca39a880163cbbce924bb46cc56b9fa4")
(package! lispy :pin "0a9dcfdfbc20cadbb9cb29b224dc64b8efdd7b70")
(when (featurep! :editor evil)
(package! lispyville :pin "25a70126ea807653e0a8c512d4128c90ed673d7a"))
(package! lispyville :pin "0f13f26cd6aa71f9fd852186ad4a00c4294661cd"))

View File

@@ -1,4 +1,4 @@
;; -*- no-byte-compile: t; -*-
;;; editor/objed/packages.el
(package! objed :pin "e89d8dae3b2d4331a4455d2a7b203500537d184d")
(package! objed :pin "dea5a64a4da32e8947fe5b45de569e293aaa8a96")

View File

@@ -33,6 +33,8 @@
#'yas-minor-mode-on)
:config
(add-to-list 'doom-debug-variables '(yas-verbosity . 3))
;; Allow private snippets in DOOMDIR/snippets
(add-to-list 'yas-snippet-dirs '+snippets-dir)

View File

@@ -7,4 +7,4 @@
:recipe (:host github
:repo "hlissner/doom-snippets"
:files ("*.el" "*"))
:pin "21b7c8d37224768091a34a6c3ede68d52d03fb18")
:pin "60c57d66d2afd1798bff5023a54ab155f311746a")

View File

@@ -1,4 +1,4 @@
;; -*- no-byte-compile: t; -*-
;;; editor/word-wrap/packages.el
(package! adaptive-wrap :pin "1810c0ee8d827dd502ddeaae5bd759d4811fcbce")
(package! adaptive-wrap :pin "319db649fb083db3ad07b4c71ee6c9429497043b")

View File

@@ -168,11 +168,18 @@ we have to clean it up ourselves."
(global-set-key [remap find-dired] #'fd-dired)
(set-popup-rule! "^\\*F\\(?:d\\|ind\\)\\*$" :ignore t))
(use-package! dired-aux
:defer t
:config
(setq dired-create-destination-dirs 'ask
dired-vc-rename-file t))
;;;###package dired-git-info
(map! :after dired
:map (dired-mode-map ranger-mode-map)
:ng ")" #'dired-git-info-mode)
(setq dgi-commit-message-format "%h %cs %s"
dgi-auto-hide-details-p nil)
(after! wdired
;; Temporarily disable `dired-git-info-mode' when entering wdired, due to
;; reported incompatibilities.

View File

@@ -1,12 +1,12 @@
;; -*- no-byte-compile: t; -*-
;;; emacs/dired/packages.el
(package! diredfl :pin "83567d00affce66a4e501563eddd0bd436ac48d0")
(package! diredfl :pin "cd052dfef602fe79d8dfbcf9f06e6da74412218b")
(package! dired-git-info :pin "b47f2b0c3a6cb9b7a62a4ee2605a492e512d40a9")
(package! diff-hl :pin "2281a89a3ddc6616073da6f190dda08d23b18ba6")
(package! dired-rsync :pin "bfd5c155be1cb6b71c83e5f41116c81b6532b6d5")
(when (featurep! +ranger)
(package! ranger :pin "d7c18370981c9e585bc0fb78f7e55033457ca643"))
(package! ranger :pin "caf75f0060e503af078c7e5bb50d9aaa508e6f3e"))
(when (featurep! +icons)
(package! all-the-icons-dired :pin "fc2dfa1e9eb8bf1c402a675e7089638d702a27a5"))
(package! fd-dired :pin "5622041068d5fa2f299dbc8aa91fece0ba260086")

View File

@@ -1,5 +1,5 @@
;; -*- no-byte-compile: t; -*-
;;; emacs/ibuffer/packages.el
(package! ibuffer-projectile :pin "504b0edaa0d937ce60ccc8fdf09f2dae0a90fbaf")
(package! ibuffer-vc :pin "1249c1e30cf11badfe032ac3b1058f24ba510ace")
(package! ibuffer-projectile :pin "ecbe482804a217b1471593f6c7a8b3d64f3cdc47")
(package! ibuffer-vc :pin "5fa6aea09bc67f71ea743302d609f459967b1e81")

View File

@@ -6,7 +6,7 @@
(package! smerge-mode :built-in t)
(package! browse-at-remote :pin "6aecae4b5d202e582425fc8aa2c9c2b6a4779f25")
(package! git-commit :pin "d459e528f46423f1976e5fa415e64f8f7162b473")
(package! git-timemachine :pin "391eb61050de321101e631fcf373fc70ec6e7700")
(package! git-commit :pin "321214c3a2dd10fdf672ba96bd00703a51094bbe")
(package! git-timemachine :pin "8d675750e921a047707fcdc36d84f8439b19a907")
(package! gitconfig-mode :pin "55468314a5f6b77d2c96be62c7005ac94545e217")
(package! gitignore-mode :pin "55468314a5f6b77d2c96be62c7005ac94545e217")

View File

@@ -100,7 +100,7 @@ sudo apt-get install isync # mbsync
# or
sudo apt-get install offlineimap
# then
sudo apt-get install maildir-utils # mu
sudo apt-get install maildir-utils mu4e # mu and mu4e respectivly
#+END_SRC
* TODO Features
@@ -173,6 +173,26 @@ Then configure Emacs to use your email address:
** =No such file or directory, mu4e=
You will get =No such file or directory, mu4e= errors if you don't run ~doom
sync~ after installing =mu= through your package manager.
Some times the the ~mu~ package does not include ~mu4e~ (*cough Ubuntu*).
if that's the case you will need to [[https://github.com/djcb/mu][install]] it and add it to your ~load-path~
you can do that by...
#+BEGIN_SRC emacs-lisp :tangle no
(add-to-list 'load-path "your/path/to/mu4e")
;; if you installed it using your package manager
(add-to-list 'load-path "/usr/share/emacs/site-lisp/mu4e")
;; if you built from source
(add-to-list 'load-path "/usr/local/share/emacs/site-lisp/mu4e")
#+END_SRC
If you have completely lost your install then you can use this handy command!
#+BEGIN_SRC shell
find / -type d -iname '*mu4e*'
# I reccomend rerouting all of the error to /dev/null
find / -type d -iname '*mu4e*' 2> /dev/null
#+END_SRC
** ~(void-function org-time-add)~ error on Gentoo
Gentoo users will see this error because [[https://gitweb.gentoo.org/repo/gentoo.git/tree/net-mail/mu/files/70mu-gentoo.el#n2][the =net-mail/mu= package eagerly loads
=mu4e= (which pulls in =org=) much too early]]; before Emacs reads =~/.emacs.d=.

View File

@@ -1,8 +1,8 @@
;; -*- no-byte-compile: t; -*-
;;; email/notmuch/packages.el
(package! notmuch :pin "ad9c2e91a012920bebfe70bc472d44678abc3259")
(package! org-mime :pin "9f8444603806e6baa94b2b67a23aab0ea52fef97")
(package! notmuch :pin "8776faf6d5118e8152ecfacf94accf35ccebf1d2")
(package! org-mime :pin "9bb6351b25c62835c7881fc64096028eb8ef83ef")
(when (featurep! :completion ivy)
(package! counsel-notmuch :pin "a4a1562935e4180c42524c51609d1283e9be0688"))
(when (featurep! :completion helm)

View File

@@ -6,6 +6,6 @@
;; branches which straight cannot detect without our help.
(package! apel :recipe (:branch "apel-wl") :pin "d146ddbf8818e81d3577d5eee7825d377bec0c73")
(package! flim :recipe (:branch "flim-1_14-wl") :pin "f303f2f6c124bc8635add96d3326a2209749437b")
(package! semi :recipe (:branch "semi-1_14-wl") :pin "57a948c5f07e57e78ab3c0e6fd76ffcd591bb4ac")
(package! semi :recipe (:branch "semi-1_14-wl") :pin "10897f024fd9282c73385d24514cc4b57fe193db")
(package! wanderlust :pin "7af0d582cd48a37469e0606ea35887740d78c8b5")

View File

@@ -3,5 +3,5 @@
(package! migemo :pin "f42832c8ac462ecbec9a16eb781194f876fba64a")
(package! avy-migemo :pin "922a6dd82c0bfa316b0fbb56a9d4dd4ffa5707e7")
(package! ddskk :pin "fe7f82ba568dc653431bf824a764993aa86a7aa3")
(package! ddskk :pin "275a831be77573470309a78967734d2b6d10f218")
(package! pangu-spacing :pin "f92898949ba3bf991fd229416f3bbb54e9c6c223")

View File

@@ -6,11 +6,11 @@
:recipe (:host github :repo "agda/agda"
:files ("src/data/emacs-mode/agda-input.el")
:nonrecursive t)
:pin "8eb0d01811a663cf2b27b482b3b18690adfa094b")
:pin "36738c13e2e85f1029083e974cdcff6927d48980")
(package! agda2-mode
:recipe (:host github :repo "agda/agda"
:files ("src/data/emacs-mode/*.el"
(:exclude "agda-input.el"))
:nonrecursive t)
:pin "8eb0d01811a663cf2b27b482b3b18690adfa094b"))
:pin "36738c13e2e85f1029083e974cdcff6927d48980"))

View File

@@ -8,8 +8,9 @@
- [[#module-flags][Module Flags]]
- [[#plugins][Plugins]]
- [[#prerequisites][Prerequisites]]
- [[#lsp-servers][LSP servers]]
- [[#irony-server][irony-server]]
- [[#macos][MacOS]]
- [[#macos][macOS]]
- [[#arch-linux][Arch Linux]]
- [[#opensuse][openSUSE]]
- [[#rtags][rtags]]
@@ -56,18 +57,36 @@ This module adds support for the C-family of languages: C, C++, and Objective-C.
+ [[https://github.com/Andersbakken/rtags][helm-rtags]]
* Prerequisites
This module requires
This module's requirements change depending on how you use it.
+ irony-server
+ rtags
+ If =+lsp= is enabled, you need one of *clangd v9+* or *ccls*.
+ If =+lsp= is *not* enabled, you need *irony-server* and *rtags*.
+ Other features in this module depend on:
+ (optional) glslangValidator, for GLSL completion in ~glsl-mode~
+ (optional) cmake, for code completion in ~cmake-mode~
+ You will need a C/C++ compiler, like =gcc= or =clang=.
** LSP servers
=lsp-mode= and =eglot= support a few LSP servers, but =clangd= and =ccls= are
recommended.
+ clangd (must be v9 or newer) :: Clangd is included with =llvm= which should be
available through your OS' package manager.
- Debian/Ubuntu: ~sudo apt-get install clangd-9~
- macOS: ~brew install llvm~
- Windows: install from [[https://releases.llvm.org/download.html][LLVM download page]]
- clangd is available on some Linux distros from a =clang-tools= package, if
you'd like to avoid the full =llvm=.
+ ccls :: Available in many OS' package managers as =ccls=. Otherwise, there are
alternative install methods listed [[https://github.com/MaskRay/ccls/wiki/Install][in the project's wiki]].
** irony-server
Irony powers the code completion, eldoc and syntax checking systems.
After installing its dependencies, run ~M-x irony-install-server~ in Emacs.
*** MacOS
Due to linking issues, MacOS users must compile irony-server manually:
*** macOS
Due to linking issues, macOS users must compile irony-server manually:
#+BEGIN_SRC sh
brew install cmake
@@ -118,12 +137,11 @@ rc -J $PROJECT_ROOT # loads PROJECT_ROOT's compile_commands.json
** Project compile settings
By default, a set of default compile settings are defined in
~+cc-default-compiler-options~ for C, C++ and Objective C. Irony, rtags and
flycheck will fall back to these.
flycheck will fall back to these. *This variable does nothing for LSP users.*
To make these tools aware of project specific build settings, you need a JSON
[[https://sarcasm.github.io/notes/dev/compilation-database.html#ninja][compilation database]] present (i.e. a ~compile_commands.json~ file).
There are [[https://sarcasm.github.io/notes/dev/compilation-database.html][many ways to generate one]]. I use [[http://www.cmake.org/][CMake]] or [[https://github.com/rizsotto/Bear][bear]]:
For a more universal solution: both LSP servers and irony will recognize a
[[https://sarcasm.github.io/notes/dev/compilation-database.html#ninja][compilation database]] (a ~compile_commands.json~ file). There are [[https://sarcasm.github.io/notes/dev/compilation-database.html][many ways to
generate one]]. Here is an example using [[http://www.cmake.org/][CMake]] and [[https://github.com/rizsotto/Bear][bear]]:
#+BEGIN_SRC sh
# For CMake projects

View File

@@ -108,7 +108,12 @@ simpler."
(rtags-call-rc :silent t "-J" (or (doom-project-root) default-directory))))
;; then irony
(when (and (featurep 'irony) irony-mode)
(+cc-init-irony-compile-options-h)))
(+cc-init-irony-compile-options-h))
;; Otherwise, LSP
(when (bound-and-true-p lsp-mode)
(lsp-workspace-restart))
(when (bound-and-true-p eglot-managed-mode)
(eglot-reconnect)))
;;;###autoload
(defun +cc/imenu ()

View File

@@ -51,7 +51,7 @@ This is ignored by ccls.")
(set-rotate-patterns! 'c++-mode
:symbols '(("public" "protected" "private")
("class" "struct")))
(set-pretty-symbols! '(c-mode c++-mode)
(set-ligatures! '(c-mode c++-mode)
;; Functional
;; :def "void "
;; Types
@@ -247,13 +247,13 @@ If rtags or rdm aren't available, fail silently instead of throwing a breaking e
`((:ccls . ((:clang . ,(list :extraArgs ["-isystem/Library/Developer/CommandLineTools/usr/include/c++/v1"
"-isystem/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include"
"-isystem/usr/local/include"]
:resourceDir (string-trim (shell-command-to-string "clang -print-resource-dir"))))))))))))
:resourceDir (cdr (doom-call-process "clang" "-print-resource-dir"))))))))))))
(use-package! ccls
:when (and (featurep! +lsp) (not (featurep! :tools lsp +eglot)))
:after lsp
:when (featurep! +lsp)
:unless (featurep! :tools lsp +eglot)
:after lsp-mode
:init
(after! projectile
(add-to-list 'projectile-globally-ignored-directories ".ccls-cache")
@@ -265,4 +265,4 @@ If rtags or rdm aren't available, fail silently instead of throwing a breaking e
`(:clang ,(list :extraArgs ["-isystem/Library/Developer/CommandLineTools/usr/include/c++/v1"
"-isystem/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include"
"-isystem/usr/local/include"]
:resourceDir (string-trim (shell-command-to-string "clang -print-resource-dir")))))))
:resourceDir (cdr (doom-call-process "clang" "-print-resource-dir")))))))

View File

@@ -3,7 +3,7 @@
(package! cmake-mode
:recipe (:host github :repo "emacsmirror/cmake-mode" :files (:defaults "*"))
:pin "bfe85bc009c4778b44e246d5c27d0f888f0bfc0c")
:pin "e58c41145a879f0314b2821eada7fd0dc898b6b6")
(package! cuda-mode :pin "9ae9eacfdba3559b5456342d0d03296290df8ff5")
(package! demangle-mode :pin "697c1dbde93f164eac7ea0dc530d7e8b799272d6")
(package! disaster :pin "10a785facc60d89d78e0d5177985ab1af1741bb4")
@@ -19,15 +19,15 @@
(if (featurep! +lsp)
(unless (featurep! :tools lsp +eglot)
;; ccls package is necessary only for lsp-mode.
(package! ccls :pin "b8e2f4d9b5bed5b5e8b387ac8e43eff723120b80"))
(when (package! irony :pin "5f75fc0c9274f4622470e2324e2f4457087aa643")
(package! ccls :pin "675a5704c14a27931e835a431beea3631d92e8e6"))
(when (package! irony :pin "1e1aabaa686a08767ab33e5cd43ce8f0ebf8d020")
(package! irony-eldoc :pin "73e79a89fad982a2ba072f2fcc1b4e41f0aa2978")
(when (featurep! :checkers syntax)
(package! flycheck-irony :pin "42dbecd4a865cabeb301193bb4d660e26ae3befe"))
(when (featurep! :completion company)
(package! company-irony :pin "b44711dfce445610c1ffaec4951c6ff3882b216a")
(package! company-irony-c-headers :pin "72c386aeb079fb261d9ec02e39211272f76bbd97")))
(when (package! rtags :pin "080cb0e6b025b5d3d40fe9f7aecc791c0ea53f36")
(when (package! rtags :pin "b57b36039f6411f23009c4ec0315ca5a7adb6824")
(when (featurep! :completion ivy)
(package! ivy-rtags))
(when (featurep! :completion helm)

View File

@@ -1,8 +1,8 @@
;; -*- no-byte-compile: t; -*-
;;; lang/clojure/packages.el
(package! clojure-mode :pin "da9f1ec717dac1194404b4a4562dba6bd9a4ee3a")
(package! cider :pin "9e117c2ff34b7a63eee87c8bfa93a800bb94add5")
(package! clojure-mode :pin "84ed16c5ddb6561620886485e20669d0c81f88a1")
(package! cider :pin "a89b694cc3cec0294d84bf9dbe1163ad2373e8db")
(package! clj-refactor :pin "97095682580bbc5bfebcbc5349f03f5bd7121c96")
(when (featurep! :checkers syntax)

View File

@@ -1,6 +1,6 @@
;; -*- no-byte-compile: t; -*-
;;; lang/common-lisp/packages.el
(package! sly :pin "becf7b72ec6ef1a8165ec796425e143282838a66")
(package! sly-macrostep :pin "5113e4e926cd752b1d0bcc1508b3ebad5def5fad")
(package! sly-repl-ansi-color :pin "b9cd52d1cf927bf7e08582d46ab0bcf1d4fb5048")
(when (package! sly :pin "34239bc5954ef41a4db49144925290dc794a6c4d")
(package! sly-macrostep :pin "5113e4e926cd752b1d0bcc1508b3ebad5def5fad")
(package! sly-repl-ansi-color :pin "b9cd52d1cf927bf7e08582d46ab0bcf1d4fb5048"))

View File

@@ -1,5 +1,5 @@
;; -*- no-byte-compile: t; -*-
;;; lang/coq/packages.el
(package! proof-general :pin "0f0bb2c00fb7b20fd187cb92d4d2c3f84c4c5987")
(package! company-coq :pin "7ec80586fa23e2d8caa3f26ad223c803df8abb0f")
(package! proof-general :pin "03e427a8f19485e12b2f95387ed3e0bff7cc944c")
(package! company-coq :pin "b096cb528de1e0bb31cc1059d0bd698b98a6cc6a")

View File

@@ -14,7 +14,7 @@
;; a subset of them (defined below).
(provide 'smartparens-elixir)
:config
(set-pretty-symbols! 'elixir-mode
(set-ligatures! 'elixir-mode
;; Functional
:def "def"
:lambda "fn"

View File

@@ -2,7 +2,7 @@
;;; lang/elixir/packages.el
;; +elixir.el
(package! elixir-mode :pin "02a3922711b7dc6a25895df6d2bf00360fda45cc")
(package! elixir-mode :pin "01b332495d3f44addeb236428041c4ffa0c2ca3b")
(package! alchemist :pin "6f99367511ae209f8fe2c990779764bbb4ccb6ed")
(when (featurep! :checkers syntax)
(package! flycheck-credo :pin "e88f11ead53805c361ec7706e44c3dfee1daa19f"))

View File

@@ -6,7 +6,7 @@
(set-company-backend! 'elm-mode 'company-elm))
(set-repl-handler! 'elm-mode #'run-elm-interactive)
(set-pretty-symbols! 'elm-mode
(set-ligatures! 'elm-mode
:null "null"
:true "true" :false "false"
:int "Int" :str "String"

View File

@@ -1,6 +1,6 @@
;; -*- no-byte-compile: t; -*-
;;; lang/elm/packages.el
(package! elm-mode :pin "7782be0814")
(package! elm-mode :pin "363da4b47c9de1ff091a8caf95fccc34188d59a3")
(when (featurep! :checkers syntax)
(package! flycheck-elm :pin "1b60050efd"))
(package! flycheck-elm :pin "1b60050efd4729bfba548f3e5adbcb58436667cb"))

View File

@@ -33,7 +33,7 @@ employed so that flycheck still does *some* helpful linting.")
:definition #'+emacs-lisp-lookup-definition
:documentation #'+emacs-lisp-lookup-documentation)
(set-docsets! '(emacs-lisp-mode lisp-interaction-mode) "Emacs Lisp")
(set-pretty-symbols! 'emacs-lisp-mode :lambda "lambda")
(set-ligatures! 'emacs-lisp-mode :lambda "lambda")
(set-rotate-patterns! 'emacs-lisp-mode
:symbols '(("t" "nil")
("let" "let*")

View File

@@ -10,9 +10,9 @@
(package! macrostep :pin "424e3734a1ee526a1bd7b5c3cd1d3ef19d184267")
(package! overseer :pin "02d49f582e80e36b4334c9187801c5ecfb027789")
(package! elisp-def :pin "da1f76391ac0d277e3c5758203e0150f6bae0beb")
(package! elisp-demos :pin "4cd55a30d5dbd8d36a0e6f87261c4fef17fc6db0")
(package! elisp-demos :pin "8c9748134f7c017ae1536dbd0b76434afb52e64d")
(when (featurep! :checkers syntax)
(package! flycheck-cask :pin "3457ae553c4feaf8168008f063d78fdde8fb5f94"))
;; Libraries
(package! buttercup :pin "e71a40f1ffef4847df28c9d4ad7edc1e360ee52a")
(package! buttercup :pin "0e5eae0766a33b5c8997e1477e3914d5c8ba3d29")

View File

@@ -1,9 +1,9 @@
;; -*- no-byte-compile: t; -*-
;;; private/erlang/packages.el
;;; lang/erlang/packages.el
(package! erlang :pin "3065fbf434")
(package! erlang :pin "d9bc7858e985143a433953ba286422511b466a0c")
(when (featurep! :checkers syntax)
(package! flycheck-rebar3 :pin "3cca1268c5"))
(package! flycheck-rebar3 :pin "3cca1268c54643204b5bae52e3f0bf5bc921018c"))
(unless (featurep! +lsp)
(when (featurep! :completion company)
(package! company-erlang :pin "bc0524a16f")))
(package! company-erlang :pin "bc0524a16f17b66c7397690e4ca0e004f09ea6c5")))

View File

@@ -32,6 +32,9 @@
(set-eval-handler! 'ess-help-mode #'ess-eval-region-and-go)
(set-eval-handler! 'ess-r-help-mode #'ess-eval-region-and-go)
(set-company-backend! 'ess-r-mode
'(company-R-args company-R-objects company-dabbrev-code :separate))
(setq-hook! 'ess-r-mode-hook
;; HACK Fix #2233: Doom continues comments on RET, but ess-r-mode doesn't
;; have a sane `comment-line-break-function', so...

View File

@@ -1,7 +1,7 @@
;; -*- no-byte-compile: t; -*-
;;; lang/ess/packages.el
(package! ess :pin "964bf64d8bb3c6dd710cd8f2259921099a50456a")
(package! ess :pin "1baf8bf1403fe5956a25475b03be0d8f02b3f3ca")
(package! ess-R-data-view :pin "d6e98d3ae1e2a2ea39a56eebcdb73e99d29562e9")
(package! polymode :pin "3284ff10017d280ba82f27dc20fe5223b0df709c")
(package! poly-R :pin "51ffeb6ec45dd44eafa4d22ad2d6150cc4b248fc")

View File

@@ -1,4 +1,4 @@
;; -*- no-byte-compile: t; -*-
;;; lang/factor/packages.el
(package! fuel :pin "497d6491e6")
(package! fuel :pin "3fdb0325ca2a6d80e4111af43b1b166808022020")

View File

@@ -1,4 +1,4 @@
;; -*- no-byte-compile: t; -*-
;;; lang/faust/packages.el
(package! faustine :pin "07a3896311")
(package! faustine :pin "07a38963111518f86123802f9d477be0d4689a3f")

View File

@@ -1,4 +1,4 @@
;; -*- no-byte-compile: t; -*-
;;; lang/fsharp/packages.el
(package! fsharp-mode :pin "8c86e38b93")
(package! fsharp-mode :pin "3e41fe1391b64eefa66a8a02fce27a12a04e1e01")

View File

@@ -1,7 +1,7 @@
;;; lang/haskell/+lsp.el -*- lexical-binding: t; -*-
(use-package! lsp-haskell
:after lsp-clients
:after lsp-mode
:preface (add-hook 'haskell-mode-local-vars-hook #'lsp!)
:config
(when IS-MAC

View File

@@ -4,7 +4,7 @@
(package! haskell-mode :pin "41683c0e634bb3f54eac8747919a82132e1714fe")
(when (featurep! +dante)
(package! dante :pin "7411904bfbde25cdb986e001ec682593dcb7c5e3")
(package! dante :pin "c516bc9e8f09e0f928de9a93e82acfb382636f5c")
(package! attrap :pin "4cf3e4a16255997e7c3c39682a72866a0a37dd4b"))
(when (or (and (featurep! +lsp)
(not (featurep! :tools lsp +eglot)))

View File

@@ -1,4 +1,4 @@
;; -*- no-byte-compile: t; -*-
;;; lang/hy/packages.el
(package! hy-mode :pin "e2d5fecdae")
(package! hy-mode :pin "55e84cadbdb63427a8d531992df3990414a26688")

View File

@@ -1,4 +1,4 @@
;; -*- no-byte-compile: t; -*-
;;; lang/idris/packages.el
(package! idris-mode :pin "acc8835449")
(package! idris-mode :pin "b77eadd8ac2048d5c882b4464bd9673e45dd6a59")

View File

@@ -2,20 +2,25 @@
;;;###if (featurep! +lsp)
(use-package! lsp-java
:after lsp-clients
:after lsp-mode
:preface
(setq lsp-java-workspace-dir (concat doom-etc-dir "java-workspace"))
(add-hook 'java-mode-local-vars-hook #'lsp!)
(map! :when (featurep! :tools debugger +lsp)
:after cc-mode ; where `java-mode' is defined
:config
(when (featurep! :tools debugger +lsp)
(setq lsp-jt-root (concat lsp-java-server-install-dir "java-test/server/")
dap-java-test-runner (concat lsp-java-server-install-dir "test-runner/junit-platform-console-standalone.jar"))))
(use-package! dap-java
:when (featurep! :tools debugger +lsp)
:commands dap-java-run-test-class dap-java-debug-test-class
:init
(map! :after cc-mode ; where `java-mode' is defined
:map java-mode-map
:localleader
(:prefix ("t" . "Test")
:desc "Run test class or method" "t" #'+java/run-test
:desc "Run all tests in class" "a" #'dap-java-run-test-class
:desc "Debug test class or method" "d" #'+java/debug-test
:desc "Debug all tests in class" "D" #'dap-java-debug-test-class))
:config
(when (featurep! :tools debugger +lsp)
(setq lsp-jt-root (concat lsp-java-server-install-dir "java-test/server/")
dap-java-test-runner (concat lsp-java-server-install-dir "test-runner/junit-platform-console-standalone.jar"))))
:desc "Debug all tests in class" "D" #'dap-java-debug-test-class)))

View File

@@ -2,10 +2,10 @@
;;; lang/java/packages.el
(package! android-mode :pin "d5332e339a1f5e30559a53feffb8442ca79265d6")
(package! groovy-mode :pin "cafdd98e06a3bbff213f3ccb163de2c42d412b66")
(package! groovy-mode :pin "26da902d1158c0312628d57578109be54eca2415")
(when (featurep! +meghanada)
(package! meghanada :pin "e119c7b3271281d60892b80a0cc6488503baf38f"))
(package! meghanada :pin "1e41f7f2c7a172e9699f3557c97c3f39a149bfc2"))
(when (featurep! +eclim)
(package! eclim :pin "222ddd48fcf0ee01592dec77c58e0cf3f2ea1100")
@@ -13,4 +13,4 @@
(package! company-emacs-eclim :pin "222ddd48fcf0ee01592dec77c58e0cf3f2ea1100")))
(when (featurep! +lsp)
(package! lsp-java :pin "811760ad89a29939c28f47d0925f58d9eeea9fa3"))
(package! lsp-java :pin "260016236fa0520b5b6ec7f51ca2086288524cba"))

View File

@@ -7,7 +7,7 @@
"MarionetteJS" "MomentJS" "NodeJS" "PrototypeJS" "React" "RequireJS"
"SailsJS" "UnderscoreJS" "VueJS" "ZeptoJS")
(set-pretty-symbols! '(js2-mode rjsx-mode web-mode)
(set-ligatures! '(js2-mode rjsx-mode web-mode)
;; Functional
:def "function"
:lambda "() =>"
@@ -95,7 +95,7 @@
:config
(set-electric! 'typescript-mode
:chars '(?\} ?\)) :words '("||" "&&"))
(set-pretty-symbols! 'typescript-mode
(set-ligatures! 'typescript-mode
;; Functional
:def "function"
:lambda "() =>"
@@ -190,8 +190,7 @@ to tide."
(set-company-backend! 'tide-mode 'company-tide)
;; navigation
(set-lookup-handlers! 'tide-mode :async t
:definition #'tide-jump-to-definition
:references #'tide-references
:xref-backend #'xref-tide-xref-backend
:documentation #'tide-documentation-at-point)
(set-popup-rule! "^\\*tide-documentation" :quit t)
;; resolve to `doom-project-root' if `tide-project-root' fails

Some files were not shown because too many files have changed in this diff Show More