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
+97 -24
View File
@@ -70,44 +70,117 @@ URxvt*depth: 32
! Palenight Xresources palette ! Palenight Xresources palette
!! COLORS !! COLORS
! special !!URxvt*foreground: #bbc5ff
URxvt*foreground: #bbc5ff !!URxvt*background: [95]#282a36
URxvt*background: [95]#282a36 !!URxvt*cursorColor: #bbc5ff
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 ! special
XTerm*cursorColor: #bbc5ff *.foreground: #bbc2cf
*.background: #282c34
*.cursorColor: #bbc2cf
! black ! black
*.color0: #101010 !! originally #292d3e *.color0: #1c1f24
*.color8: #434758 *.color8: #5b6268
! red ! red
*.color1: #f07178 *.color1: #ff6c6b
*.color9: #ff8b92 *.color9: #da8548
! green ! green
*.color2: #c3e88d *.color2: #98be65
*.color10: #ddffa7 *.color10: #4db5bd
! yellow ! yellow
*.color3: #ffcb6b *.color3: #da8548
*.color11: #ffe585 *.color11: #ecbe7b
! blue ! blue
*.color4: #82aaff *.color4: #51afef
*.color12: #9cc4ff *.color12: #3071db
! magenta ! magenta
*.color5: #c792ea *.color5: #c678dd
*.color13: #e1acff *.color13: #a9a1e1
! cyan ! cyan
*.color6: #89ddff *.color6: #5699af
*.color14: #a3f7ff *.color14: #46d9ff
! white ! white
*.color7: #d0d0d0 *.color7: #202328
*.color15: #ffffff *.color15: #dfdfdf
+26 -26
View File
@@ -117,7 +117,7 @@ font:
# family: UbuntuMono Nerd Font # family: UbuntuMono Nerd Font
# family: Monofur Nerd Font # family: Monofur Nerd Font
# family: TerminessTTF Nerd Font # family: TerminessTTF Nerd Font
family: Mononoki Nerd Font family: SauceCodePro Nerd Font
# The `style` can be specified to pick a specific face. # The `style` can be specified to pick a specific face.
style: Regular style: Regular
@@ -136,7 +136,7 @@ font:
# family: UbuntuMono Nerd Font # family: UbuntuMono Nerd Font
# family: Monofur Nerd Font # family: Monofur Nerd Font
# family: TerminessTTF Nerd Font # family: TerminessTTF Nerd Font
family: Mononoki Nerd Font family: SauceCodePro Nerd Font
# The `style` can be specified to pick a specific face. # The `style` can be specified to pick a specific face.
style: Bold style: Bold
@@ -155,7 +155,7 @@ font:
# family: UbuntuMono Nerd Font # family: UbuntuMono Nerd Font
# family: Monofuritalic Nerd Font Mono # family: Monofuritalic Nerd Font Mono
# family: TerminessTTF Nerd Font # family: TerminessTTF Nerd Font
family: Mononoki Nerd Font family: SauceCodePro Nerd Font
# The `style` can be specified to pick a specific face. # The `style` can be specified to pick a specific face.
style: Italic style: Italic
@@ -174,7 +174,7 @@ font:
# family: UbuntuMono Nerd Font # family: UbuntuMono Nerd Font
# family: Monofuritalic Nerd Font Mono # family: Monofuritalic Nerd Font Mono
# family: TerminessTTF Nerd Font # family: TerminessTTF Nerd Font
family: Mononoki Nerd Font family: SauceCodePro Nerd Font
# The `style` can be specified to pick a specific face. # The `style` can be specified to pick a specific face.
style: Bold Italic style: Bold Italic
@@ -185,7 +185,7 @@ font:
# Offset is the extra space around each character. `offset.y` can be thought of # 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. # as modifying the line spacing, and `offset.x` as modifying the letter spacing.
offset: offset:
x: 1 x: 0
y: 1 y: 1
# Glyph offset determines the locations of the glyphs within their cells with # Glyph offset determines the locations of the glyphs within their cells with
@@ -212,14 +212,14 @@ font:
#use_thin_strokes: true #use_thin_strokes: true
# If `true`, bold text is drawn using the bright color variants. # 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 (Tomorrow Night Bright)
colors: colors:
# Default colors # Default colors
primary: primary:
background: '0x292d3e' background: '0x282c34'
foreground: '0xbbc5ff' foreground: '0xbbc2cf'
# Bright and dim foreground colors # Bright and dim foreground colors
# #
@@ -243,30 +243,30 @@ colors:
# background is unset, selection color will be the inverse of the cell 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. # If only text is unset the cell text color will remain the same.
selection: selection:
text: '0x292d3e' text: '0xbbc2cf'
background: '0xbbc5ff' background: '0x282c34'
# Normal colors # Normal colors
normal: normal:
black: '0x292d3e' black: '0x1c1f24'
red: '0xf07178' red: '0xff6c6b'
green: '0xc3e88d' green: '0x98be65'
yellow: '0xffcb6b' yellow: '0xda8548'
blue: '0x82aaff' blue: '0x51afef'
magenta: '0xc792ea' magenta: '0xc678dd'
cyan: '0x89ddff' cyan: '0x5699af'
white: '0xd0d0d0' white: '0x202328'
# Bright colors # Bright colors
bright: bright:
black: '0x434758' black: '0x5b6268'
red: '0xff8b92' red: '0xda8548'
green: '0xddffa7' green: '0x4db5bd'
yellow: '0xffe585' yellow: '0xecbe7b'
blue: '0x9cc4ff' blue: '0x3071db' # This is 2257a0 in Doom Emacs but I lightened it.
magenta: '0xe1acff' magenta: '0xa9a1e1'
cyan: '0xa3f7ff' cyan: '0x46d9ff'
white: '0xffffff' white: '0xdfdfdf'
# Dim colors # Dim colors
# #
+1 -1
View File
@@ -42,7 +42,7 @@
'Active' - where the active window is --> 'Active' - where the active window is -->
</placement> </placement>
<theme> <theme>
<name>Adapta-Nokto</name> <name>dt-dark-theme</name>
<titleLayout>CSIML</titleLayout> <titleLayout>CSIML</titleLayout>
<!-- <!--
available characters are NDSLIMC, each can occur at most once. available characters are NDSLIMC, each can occur at most once.
+9 -10
View File
@@ -10,7 +10,6 @@
(in-package :stumpwm) (in-package :stumpwm)
;;; Startup Programs ;;; Startup Programs
;;; Set Background ;;; Set Background
(run-shell-command "nitrogen --restore") (run-shell-command "nitrogen --restore")
@@ -49,14 +48,14 @@
stumpwm:*normal-border-width* 1 stumpwm:*normal-border-width* 1
) )
(stumpwm:set-focus-color "#7799CC") (stumpwm:set-focus-color "#7799CC")
(stumpwm:grename "Alpha") (stumpwm:grename "One")
(stumpwm:gnewbg "Beta") (stumpwm:gnewbg "Two")
(stumpwm:gnewbg "Tau") (stumpwm:gnewbg "Three")
(stumpwm:gnewbg "Pi") (stumpwm:gnewbg "Four")
(stumpwm:gnewbg "Zeta") (stumpwm:gnewbg "Five")
(stumpwm:gnewbg "Teta") (stumpwm:gnewbg "Six")
(stumpwm:gnewbg "Phi") (stumpwm:gnewbg "Seven")
(stumpwm:gnewbg "Rho") (stumpwm:gnewbg "Eight")
(stumpwm:toggle-mode-line (stumpwm:current-screen) (stumpwm:current-head)) (stumpwm:toggle-mode-line (stumpwm:current-screen) (stumpwm:current-head))
;; change the prefix key to something else ;; change the prefix key to something else
@@ -106,7 +105,7 @@
(define-key *root-map* (kbd "i") "imdb") (define-key *root-map* (kbd "i") "imdb")
;; Message window font ;; 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... ;;; Define window placement policy...
+3 -3
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:Mononoki Nerd Font:pixelsize=16:antialias=true:hinting=true"
, "xft:FontAwesome:pixelsize=13" , "xft:FontAwesome:pixelsize=13"
] ]
, bgColor = "#292d3e" , bgColor = "#282c34"
, fgColor = "#f07178" , fgColor = "#ff6c6b"
, position = Static { xpos = 0 , ypos = 0, width = 1920, height = 24 } , position = Static { xpos = 0 , ypos = 0, width = 1920, height = 24 }
, lowerOnStart = True , lowerOnStart = True
, hideOnStart = False , hideOnStart = False
@@ -37,5 +37,5 @@ Config { font = "xft:Ubuntu:weight=bold:pixelsize=11:antialias=true:hinting=t
] ]
, sepChar = "%" , sepChar = "%"
, alignSep = "}{" , 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>"
} }
+3 -3
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:Mononoki Nerd Font:pixelsize=16:antialias=true:hinting=true"
, "xft:FontAwesome:pixelsize=13" , "xft:FontAwesome:pixelsize=13"
] ]
, bgColor = "#292d3e" , bgColor = "#282c34"
, fgColor = "#f07178" , fgColor = "#ff6c6b"
, position = Static { xpos = 3840 , ypos = 0, width = 1920, height = 24 } , position = Static { xpos = 3840 , ypos = 0, width = 1920, height = 24 }
, lowerOnStart = True , lowerOnStart = True
, hideOnStart = False , hideOnStart = False
@@ -37,5 +37,5 @@ Config { font = "xft:Ubuntu:weight=bold:pixelsize=11:antialias=true:hinting=t
] ]
, sepChar = "%" , sepChar = "%"
, alignSep = "}{" , 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>"
} }
+5 -5
View File
@@ -3,12 +3,12 @@
-- you can find weather location codes here: http://weather.noaa.gov/index.html -- 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" Config { font = "xft:Ubuntu:weight=bold:pixelsize=11:antialias=true:hinting=true"
, additionalFonts = [ "xft:Mononoki Nerd Font:pixelsize=11:antialias=true:hinting=true" , additionalFonts = [ "xft:SauceCodePro Nerd Font:pixelsize=11:antialias=true:hinting=true"
, "xft:Mononoki Nerd Font:pixelsize=16:antialias=true:hinting=true" , "xft:SauceCodePro Nerd Font:pixelsize=16:antialias=true:hinting=true"
, "xft:FontAwesome:pixelsize=13" , "xft:FontAwesome:pixelsize=13"
] ]
, bgColor = "#292d3e" , bgColor = "#282c34"
, fgColor = "#f07178" , fgColor = "#ff6c6b"
, position = Static { xpos = 1920 , ypos = 0, width = 1920, height = 24 } , position = Static { xpos = 1920 , ypos = 0, width = 1920, height = 24 }
, lowerOnStart = True , lowerOnStart = True
, hideOnStart = False , hideOnStart = False
@@ -39,5 +39,5 @@ Config { font = "xft:Ubuntu:weight=bold:pixelsize=11:antialias=true:hinting=t
] ]
, sepChar = "%" , sepChar = "%"
, alignSep = "}{" , 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%"
} }
+13 -5
View File
@@ -1,11 +1,19 @@
(setq doom-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 "Mononoki 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)
(after! org
(setq org-directory "~/Documents/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) (require 'org-bullets)
(add-hook 'org-mode-hook (lambda () (org-bullets-mode 1))) (add-hook 'org-mode-hook (lambda () (org-bullets-mode 1)))
)
(setq display-line-numbers-type t) (setq display-line-numbers-type t)
(global-set-key "\C-x\ t" 'toggle-truncate-lines) (global-set-key "\C-x\ t" 'toggle-truncate-lines)
@@ -68,9 +76,9 @@
smtpmail-smtp-server "smtp.1and1.com" smtpmail-smtp-server "smtp.1and1.com"
smtpmail-smtp-service 587) smtpmail-smtp-service 587)
(use-package mastodon (after! mastodon
:ensure t)
(setq mastodon-instance-url "https://mastodon.technology/") (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)) (setq md4rd-subs-active '(archlinux commandline DistroTube DoomEmacs emacs freesoftware lbry linux linux4noobs linuxmasterrace linnuxquestions orgmode qutebrowser suckless Ubuntu unixporn UsabilityPorn vim xmonad))
+15 -8
View File
@@ -11,24 +11,30 @@ are the three important ones:
+ `doom-big-font' -- used for `doom-big-font-mode'; use this for + `doom-big-font' -- used for `doom-big-font-mode'; use this for
presentations or streaming. 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 #+BEGIN_SRC emacs-lisp
(setq doom-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 "Mononoki 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 #+END_SRC
** DOOM THEME ** DOOM THEME
#+BEGIN_SRC emacs-lisp #+BEGIN_SRC emacs-lisp
(setq doom-theme 'doom-palenight) (setq doom-theme 'doom-one)
#+END_SRC #+END_SRC
** ORG MODE ** 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 #+BEGIN_SRC emacs-lisp
(after! org
(setq org-directory "~/Documents/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) (require 'org-bullets)
(add-hook 'org-mode-hook (lambda () (org-bullets-mode 1))) (add-hook 'org-mode-hook (lambda () (org-bullets-mode 1)))
)
#+END_SRC #+END_SRC
** LINE SETTINGS ** LINE SETTINGS
@@ -123,10 +129,11 @@ Image previews in dired
#+END_SRC #+END_SRC
** MASTODON CLIENT (mastodon) ** 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 #+BEGIN_SRC emacs-lisp
(use-package mastodon (after! mastodon
:ensure t)
(setq mastodon-instance-url "https://mastodon.technology/") (setq mastodon-instance-url "https://mastodon.technology/")
)
#+END_SRC #+END_SRC
#+BEGIN_SRC emacs-lisp #+BEGIN_SRC emacs-lisp
+1 -1
View File
@@ -48,7 +48,7 @@
;(unpin! pinned-package another-pinned-package) ;(unpin! pinned-package another-pinned-package)
;; ...Or *all* packages (NOT RECOMMENDED; will likely break things) ;; ...Or *all* packages (NOT RECOMMENDED; will likely break things)
;(unpin! t) ;(unpin! t)
(package! exwm) (package! evil-tutor)
(package! emms) (package! emms)
(package! emojify) (package! emojify)
(package! elfeed) (package! elfeed)
+121 -117
View File
@@ -1,127 +1,131 @@
#!/usr/bin/env sh #!/usr/bin/env sh
:; ( echo "$EMACS" | grep -q "term" ) && EMACS=emacs || EMACS=${EMACS:-emacs} # -*-emacs-lisp-*- :; set -e # -*- mode: emacs-lisp; lexical-binding: t -*-
:; command -v $EMACS >/dev/null || { >&2 echo "Can't find emacs in your PATH"; exit 1; } :; case "$EMACS" in *term*) EMACS=emacs ;; *) EMACS="${EMACS:-emacs}" ;; esac
:; _VERSION=$($EMACS --version | head -n1) :; $EMACS --version >/dev/null 2>&1 || { >&2 echo "Can't find emacs in your PATH"; exit 1; }
:; 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 :; $EMACS --no-site-file --script "$0" -- "$@" || __DOOMCODE=$?
:; _DOOMBASE="${EMACSDIR:-$(dirname "$0")/..}" :; [ "${__DOOMCODE:-0}" -eq 128 ] && { "`$EMACS -Q --batch --eval '(princ temporary-file-directory)'`/doom.sh" "$0" "$@" && true; __DOOMCODE=$?; }
:; _DOOMPOST="$_DOOMBASE/.local/.doom.sh" :; exit $__DOOMCODE
:; rm -f "$_DOOMPOST"
:; $EMACS --no-site-file --script "$0" -- "$@"
:; CODE=$?
:; [ -x "$_DOOMPOST" ] && PATH="$_DOOMBASE/bin:$PATH" "$_DOOMPOST" "$0" "$@"
:; exit $CODE
;; CLI ops tend to eat a lot of memory. To speed it up, stave off the GC, but ;; The garbage collector isn't important during CLI ops. A higher threshold
;; not to `most-positive-fixnum' like we do in init.el; that's too high -- we ;; makes it 15-30% faster, but set it too high and we risk spiralling memory
;; don't want to intentionally leak memory. ;; usage in longer sessions.
(setq gc-cons-threshold 134217728) ; 128mb (setq gc-cons-threshold 134217728) ; 128mb
(let* ((loaddir (file-name-directory (file-truename load-file-name))) ;; Prioritize non-byte-compiled source files in non-interactive sessions to
(emacsdir (getenv "EMACSDIR")) ;; prevent loading stale byte-code.
(user-emacs-directory (setq load-prefer-newer t)
(abbreviate-file-name
(if emacsdir
(file-name-as-directory emacsdir)
(expand-file-name "../" loaddir)))))
;; ;; 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)))))
;; 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)))
(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)))
(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...")))
;; Load the heart of the beast and its CLI processing library
(load (expand-file-name "core/core.el" user-emacs-directory) nil t) (load (expand-file-name "core/core.el" user-emacs-directory) nil t)
;; 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))
(doom-log "Initializing Doom CLI")
(require 'core-cli) (require 'core-cli)
(defcli! :main ;; Use our own home-grown debugger to display and log errors + backtraces.
((help-p ["-h" "--help"] "Same as help command") ;; Control over its formatting is important, because Emacs produces
(debug-p ["-d" "--debug"] "Turns on doom-debug-p (and debug-on-error)") ;; difficult-to-read debug information otherwise. By making its errors more
(yes-p ["-y" "--yes"] "Auto-accept all confirmation prompts") ;; presentable (and storing them somewhere users can access later) we go a long
&optional command &rest args) ;; way toward making it easier for users to write better bug reports.
"A command line interface for managing Doom Emacs. (setq debugger #'doom-cli--debugger
debug-on-error t
debug-ignored-errors nil)
Includes package management, diagnostics, unit tests, and byte-compilation. ;; 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))
This tool also makes it trivial to launch Emacs out of a different folder or (kill-emacs
with a different private module." (pcase
:bare t (catch 'exit
(when debug-p ;; Process the arguments passed to this script. `doom-cli-execute' should
(setenv "DEBUG" "1") ;; return a boolean, integer (error code) or throw an 'exit event, which
(setq doom-debug-p t) ;; we handle specially.
(print! (info "Debug mode on"))) (apply #'doom-cli-execute :doom (cdr (member "--" argv))))
(when yes-p ;; Any non-zero integer is treated as an error code.
(setenv "YES" "1") ((and (pred integerp) code) code)
(setq doom-auto-accept t) ;; If, instead, we were given a list or string, copy these as shell script
(print! (info "Auto-yes on"))) ;; commands to a temp script file which this script will execute after this
(when help-p ;; session finishes. Also accepts special keywords, like `:restart', to rerun
(when command ;; the current command.
(push command args)) ((and (or (pred consp)
(setq command "help")) (pred stringp)
(pred keywordp))
(when (equal (user-real-uid) 0) command)
(print! (let ((script (expand-file-name "doom.sh" temporary-file-directory))
(concat "WARNING: This script is running as root. This likely wasn't intentional, and\n" (coding-system-for-write 'utf-8-unix)
"is unnecessary to use this script. This will cause file permissions errors\n" (coding-system-for-read 'utf-8-unix))
"later if you use this Doom installation on a non-root account.\n")) (with-temp-file script
(unless (or doom-auto-accept (y-or-n-p "Continue anyway?")) (insert "#!/usr/bin/env sh\n"
(user-error "Aborted"))) "_postscript() {\n"
" rm -f " (shell-quote-argument script) "\n "
;; Load any the user's private init.el or any cli.el files in modules. This (cond ((eq command :restart)
;; gives the user (and modules) an opportunity to define their own CLI "$@")
;; commands, or to customize the CLI to better suit them. ((stringp command)
(load! doom-module-init-file doom-private-dir t) command)
(maphash (doom-module-loader doom-cli-file) doom-modules) ((string-join
(load! doom-cli-file doom-private-dir t) (if (listp (car-safe command))
(run-hooks 'doom-cli-pre-hook) (cl-loop for line in (doom-enlist command)
collect (mapconcat #'shell-quote-argument (remq nil line) " "))
(let (print-level print-gensym print-length) (list (mapconcat #'shell-quote-argument (remq nil command) " ")))
(condition-case e "\n ")))
(if (null command) "\n}\n"
(doom-cli-execute "help") (save-match-data
(let ((start-time (current-time))) (cl-loop for env
(and (doom-cli-execute command args) in (cl-set-difference process-environment
(progn (run-hooks 'doom-cli-post-hook) t) doom--initial-process-environment
(print! (success "Finished! (%.4fs)") :test #'equal)
(float-time if (string-match "^\\([a-zA-Z0-9_]+\\)=\\(.+\\)$" env)
(time-subtract (current-time) concat (format "%s=%s \\\n"
start-time)))))) (match-string 1 env)
(user-error (shell-quote-argument (match-string 2 env)))))
(print! (error "%s\n") (error-message-string e)) (format "PATH=\"%s%s$PATH\" \\\n" (concat doom-emacs-dir "bin/") path-separator)
(print! (yellow "See 'doom help %s' for documentation on this command.") (car args)) "_postscript $@\n"))
(error "")) ; Ensure non-zero exit code (set-file-modes script #o700))
((debug error) ;; Error code 128 is special: it means run the post-script after this
(print! (error "There was an unexpected error:")) ;; session ends.
(print-group! 128)
(print! "%s %s" (bold "Type:") (car e)) ;; Anything else (e.g. booleans) is treated as a successful run. Yes, a `nil'
(print! (bold "Message:")) ;; indicates a successful run too!
(print-group! (_ 0)))
(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))
+3
View File
@@ -30,6 +30,9 @@ shift $((OPTIND-1))
[ -t 0 ] && str="$*" || str=$(cat) [ -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 if [ $daemon ]; then
emacsclient -a "" \ emacsclient -a "" \
-c -F '((name . "doom-capture") (width . 70) (height . 25) (transient . t))' \ -c -F '((name . "doom-capture") (width . 70) (height . 25) (transient . t))' \
+4 -2
View File
@@ -179,9 +179,11 @@ If DERIVED-P, test with `derived-mode-p', otherwise use `eq'."
;;;###autoload ;;;###autoload
(defun doom-visible-buffers (&optional buffer-list) (defun doom-visible-buffers (&optional buffer-list)
"Return a list of visible buffers (i.e. not buried)." "Return a list of visible buffers (i.e. not buried)."
(let ((buffers (delete-dups (mapcar #'window-buffer (window-list)))))
(if buffer-list (if buffer-list
(cl-remove-if-not #'get-buffer-window buffer-list) (cl-delete-if (lambda (b) (memq b buffer-list))
(delete-dups (mapcar #'window-buffer (window-list))))) buffers)
(delete-dups buffers))))
;;;###autoload ;;;###autoload
(defun doom-buried-buffers (&optional buffer-list) (defun doom-buried-buffers (&optional buffer-list)
+1 -1
View File
@@ -98,7 +98,7 @@ Runs `doom-reload-hook' afterwards."
;;;###autoload ;;;###autoload
(defun doom/reload-autoloads () (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 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 reloads your package and module visibility, but does not install new packages or
+97 -50
View File
@@ -5,26 +5,62 @@
;;;###autoload ;;;###autoload
(defvar doom-debug-variables (defvar doom-debug-variables
'(doom-debug-p '(debug-on-error
init-file-debug doom-debug-p
debug-on-error
garbage-collection-messages garbage-collection-messages
use-package-verbose
jka-compr-verbose
lsp-log-io
gcmh-verbose gcmh-verbose
magit-refresh-verbose init-file-debug
url-debug) jka-compr-verbose
"A list of variable to toggle on `doom-debug-mode'.") 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 ;;;###autoload
(define-minor-mode doom-debug-mode (define-minor-mode doom-debug-mode
"Toggle `debug-on-error' and `doom-debug-p' for verbose logging." "Toggle `debug-on-error' and `doom-debug-p' for verbose logging."
:init-value nil :init-value nil
:global t :global t
(let ((value doom-debug-mode)) (let ((enabled doom-debug-mode))
(mapc (doom-rpartial #'set value) doom-debug-variables) (setq doom--debug-vars-undefined nil)
(message "Debug mode %s" (if value "on" "off")))) (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." ready to be pasted in a bug report on github."
(require 'vc-git) (require 'vc-git)
(require 'core-packages) (require 'core-packages)
(let ((default-directory doom-emacs-dir) (let ((default-directory doom-emacs-dir))
(doom-modules (doom-module-list))) (letf! ((defun sh (&rest args) (cdr (apply #'doom-call-process args)))
(letf! (defun sh (&rest args) (cdr (apply #'doom-call-process args))) (defun abbrev-path (path)
`((emacs (replace-regexp-in-string
(version . ,emacs-version) (regexp-quote (user-login-name)) "$USER"
(features ,@system-configuration-features) (abbreviate-file-name path))))
(build . ,(format-time-string "%b %d, %Y" emacs-build-time)) `((system
(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) (type . ,system-type)
(config . ,system-configuration) (config . ,system-configuration)
(shell . ,shell-file-name) (shell . ,(abbrev-path shell-file-name))
(uname . ,(if IS-WINDOWS (uname . ,(if IS-WINDOWS "n/a" (sh "uname" "-msrv")))
"n/a" (path . ,(mapcar #'abbrev-path exec-path)))
(sh "uname" "-msrv"))) (emacs
(path . ,(mapcar #'abbreviate-file-name exec-path))) (dir . ,(abbrev-path (file-truename doom-emacs-dir)))
(config (version . ,emacs-version)
(envfile (build . ,(format-time-string "%b %d, %Y" emacs-build-time))
. ,(cond ((file-exists-p doom-env-file) 'envvar-file) (buildopts . ,system-configuration-options)
((featurep 'exec-path-from-shell) 'exec-path-from-shell))) (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 (elc-files
. ,(length (doom-files-in `(,@doom-modules-dirs . ,(length (doom-files-in `(,@doom-modules-dirs
,doom-core-dir ,doom-core-dir
@@ -110,10 +155,18 @@ ready to be pasted in a bug report on github."
do (setq cat (car key)) do (setq cat (car key))
and collect cat and collect cat
collect collect
(let ((flags (doom-module-get cat (cdr key) :flags))) (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 (if flags
`(,(cdr key) ,@flags) `(,(cdr key) ,@flags)
(cdr key)))) (list (cdr key))))))
(if (= (length module) 1)
(car module)
module)))
'("n/a"))) '("n/a")))
(packages (packages
,@(or (condition-case e ,@(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 "Display the current version of Doom & Emacs, including the current Doom
branch and commit." branch and commit."
(interactive) (interactive)
(require 'vc-git)
(let ((default-directory doom-core-dir)) (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 doom-version
(or (vc-git-working-revision doom-core-dir) (or (cdr (doom-call-process "git" "log" "-1" "--format=%D %h %ci"))
"n/a")
emacs-version
(or (vc-git--symbolic-ref doom-core-dir)
"n/a")
(or (cdr (doom-call-process "git" "log" "-1" "--format=%ci"))
"n/a")))) "n/a"))))
;;;###autoload ;;;###autoload
@@ -190,7 +237,7 @@ markdown and copies it to your clipboard, ready to be pasted into bug reports!"
(insert "<details>\n\n```\n") (insert "<details>\n\n```\n")
(dolist (group info) (dolist (group info)
(insert! "%-8s%-10s %s\n" (insert! "%-8s%-10s %s\n"
((car group) ((upcase (symbol-name (car group)))
(caadr group) (caadr group)
(cdadr group))) (cdadr group)))
(dolist (spec (cddr group)) (dolist (spec (cddr group))
+3 -6
View File
@@ -11,12 +11,9 @@
(csharp-mode :lang csharp) (csharp-mode :lang csharp)
(clojure-mode :lang clojure) (clojure-mode :lang clojure)
(clojurescript-mode :lang clojure) (clojurescript-mode :lang clojure)
(graphql-mode :lang data) (json-mode :lang json)
(toml-mode :lang data) (yaml-mode :lang yaml)
(json-mode :lang data)
(yaml-mode :lang data)
(csv-mode :lang data) (csv-mode :lang data)
(dhall-mode :lang data)
(erlang-mode :lang erlang) (erlang-mode :lang erlang)
(elixir-mode :lang elixir) (elixir-mode :lang elixir)
(elm-mode :lang elm) (elm-mode :lang elm)
@@ -193,7 +190,7 @@ selection of all minor-modes, active or not."
"troubleshooting.org" "troubleshooting.org"
"tutorials.org" "tutorials.org"
"faq.org") "faq.org")
2 t initial-input 3 t initial-input
(mapcar (lambda (x) (mapcar (lambda (x)
(setcar x (concat "Doom Modules > " (car x))) (setcar x (concat "Doom Modules > " (car x)))
x) x)
+5 -4
View File
@@ -106,10 +106,11 @@ in some cases."
(thing (thing
(thing-at-point thing t)) (thing-at-point thing t))
((require 'xref nil t) ((require 'xref nil t)
;; Eglot defines a dummy for `xref-find-backend', so we need a special ;; Eglot, nox (a fork of eglot), and elpy implementations for
;; case to avoid xref when using eglot. See ;; `xref-backend-identifier-at-point' betray the documented purpose of
;; https://github.com/joaotavora/eglot/issues/503 ;; the interface. Eglot/nox return a hardcoded string and elpy prepends
(if (eq (xref-find-backend) 'eglot) ;; the line number to the symbol.
(if (memq (xref-find-backend) '(eglot elpy nox))
(thing-at-point 'symbol t) (thing-at-point 'symbol t)
;; A little smarter than using `symbol-at-point', though in most ;; A little smarter than using `symbol-at-point', though in most
;; cases, xref ends up using `symbol-at-point' anyway. ;; cases, xref ends up using `symbol-at-point' anyway.
+50 -21
View File
@@ -113,34 +113,62 @@ See `display-line-numbers' for what these values mean."
(delete-frame)) (delete-frame))
(save-buffers-kill-emacs))) (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'." (defun doom--enlargened-forget-last-wconf-h ()
(interactive) (set-frame-parameter nil 'doom--maximize-last-wconf nil)
(setq doom--maximize-last-wconf (set-frame-parameter nil 'doom--enlargen-last-wconf nil)
(if (and (null (cdr (cl-remove-if #'window-dedicated-p (window-list)))) (remove-hook 'doom-switch-window-hook #'doom--enlargened-forget-last-wconf-h))
doom--maximize-last-wconf)
(ignore (set-window-configuration doom--maximize-last-wconf)) ;;;###autoload
(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) (when (and (bound-and-true-p +popup-mode)
(+popup-window-p)) (+popup-window-p))
(user-error "Cannot maximize a popup, use `+popup/raise' first or use `doom/window-enlargen' instead")) (user-error "Cannot maximize a popup, use `+popup/raise' first or use `doom/window-enlargen' instead"))
(prog1 (current-window-configuration) (prog1 (cons (selected-window) (or wconf (current-window-configuration)))
(delete-other-windows))))) (delete-other-windows)
(add-hook 'doom-switch-window-hook #'doom--enlargened-forget-last-wconf-h)))))))
(defvar doom--enlargen-last-wconf nil)
;;;###autoload ;;;###autoload
(defun doom/window-enlargen () (defun doom/window-enlargen (&optional arg)
"Enlargen the current window to focus on this one. Does not close other "Enlargen the current window to focus on this one. Does not close other
windows (unlike `doom/window-maximize-buffer'). Activate again to undo." windows (unlike `doom/window-maximize-buffer'). Activate again to undo."
(interactive) (interactive "P")
(setq doom--enlargen-last-wconf (let ((param 'doom--enlargen-last-wconf))
(if doom--enlargen-last-wconf (cl-destructuring-bind (window . wconf)
(ignore (set-window-configuration doom--enlargen-last-wconf)) (or (frame-parameter nil param)
(prog1 (current-window-configuration) (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)) (let* ((window (selected-window))
(dedicated-p (window-dedicated-p window)) (dedicated-p (window-dedicated-p window))
(preserved-p (window-parameter window 'window-preserved-size)) (preserved-p (window-parameter window 'window-preserved-size))
@@ -154,7 +182,8 @@ windows (unlike `doom/window-maximize-buffer'). Activate again to undo."
(maximize-window window)) (maximize-window window))
(set-window-dedicated-p window dedicated-p) (set-window-dedicated-p window dedicated-p)
(when preserved-p (when preserved-p
(set-window-parameter window 'window-preserved-size preserved-p)))))))) (set-window-parameter window 'window-preserved-size preserved-p))
(add-hook 'doom-switch-window-hook #'doom--enlargened-forget-last-wconf-h)))))))))
;;;###autoload ;;;###autoload
(defun doom/window-maximize-horizontally () (defun doom/window-maximize-horizontally ()
+2 -2
View File
@@ -14,7 +14,7 @@ one wants that.")
auto-mode-alist auto-mode-alist
interpreter-mode-alist interpreter-mode-alist
Info-directory-list) 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 () (defvar doom-autoloads-files ()
"A list of additional files or file globs to scan for autoloads.") "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) (defun doom-autoloads-reload (&optional file)
"Regenerates Doom's autoloads and writes them to FILE." "Regenerates Doom's autoloads and writes them to FILE."
(unless file (unless file
(setq file doom-autoload-file)) (setq file doom-autoloads-file))
(print! (start "(Re)generating autoloads file...")) (print! (start "(Re)generating autoloads file..."))
(print-group! (print-group!
(cl-check-type file string) (cl-check-type file string)
+10
View File
@@ -59,6 +59,16 @@ in."
"typically installed. If you're seeing a vanilla Emacs splash screen, this " "typically installed. If you're seeing a vanilla Emacs splash screen, this "
"may explain why. If you use Chemacs, you may ignore this warning.")) "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...")) (print! (start "Checking for private config conflicts..."))
(let ((xdg-dir (concat (or (getenv "XDG_CONFIG_HOME") (let ((xdg-dir (concat (or (getenv "XDG_CONFIG_HOME")
"~/.config") "~/.config")
+8 -5
View File
@@ -61,11 +61,14 @@ Why this over exec-path-from-shell?
;; Helpers ;; Helpers
(defvar doom-env-blacklist (defvar doom-env-blacklist
'("^DBUS_SESSION_BUS_ADDRESS$" '(;; State that may be problematic if overwritten
"^GPG_AGENT_INFO$" "^\\(SSH\\|GPG\\)_TTY$" "^HOME$" "^\\(OLD\\)?PWD$" "^SHLVL$" "^PS1$" "^R?PROMPT$" "^TERM$" "^USER$"
"^SSH_\\(AUTH_SOCK\\|AGENT_PID\\)$" ;; X server or services' variables
"^HOME$" "^PWD$" "^PS1$" "^R?PROMPT$" "^TERM$" "^DISPLAY$" "^DBUS_SESSION_BUS_ADDRESS$"
;; Doom envvars ;; 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$" "^__") "^DEBUG$" "^INSECURE$" "^YES$" "^__")
"Environment variables to not save in `doom-env-file'. "Environment variables to not save in `doom-env-file'.
+1 -1
View File
@@ -74,7 +74,7 @@
:bare t :bare t
(if command (if command
(doom--cli-print (doom-cli-get (intern command))) (doom--cli-print (doom-cli-get (intern command)))
(doom--cli-print (doom-cli-get :main)) (doom--cli-print (doom-cli-get :doom))
(terpri) (terpri)
(print! (bold "Commands:")) (print! (bold "Commands:"))
(print-group! (print-group!
+10 -3
View File
@@ -126,8 +126,14 @@ list remains lean."
(doom-log "%s is newer than %s" file elc-file) (doom-log "%s is newer than %s" file elc-file)
t))) 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) (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"))) (error-file (concat eln-file ".error")))
(push eln-file doom--expected-eln-files) (push eln-file doom--expected-eln-files)
(cond ((file-exists-p eln-file) (cond ((file-exists-p eln-file)
@@ -144,7 +150,7 @@ list remains lean."
(defun doom--native-compile-done-h (file) (defun doom--native-compile-done-h (file)
(when-let* ((file) (when-let* ((file)
(eln-file (comp-output-filename file)) (eln-file (doom--comp-output-filename file))
(error-file (concat eln-file ".error"))) (error-file (concat eln-file ".error")))
(if (file-exists-p eln-file) (if (file-exists-p eln-file)
(doom-log "Compiled %s" 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) (and (or repos-p regraft-repos-p)
(straight--directory-files (straight--repos-dir) nil nil 'sort)))) (straight--directory-files (straight--repos-dir) nil nil 'sort))))
(list (when builds-p (list (when builds-p
(seq-filter #'file-directory-p
(seq-remove (doom-rpartial #'gethash straight--profile-cache) (seq-remove (doom-rpartial #'gethash straight--profile-cache)
(straight--directory-files (straight--build-dir) nil nil 'sort))) (straight--directory-files (straight--build-dir) nil nil 'sort))))
(when repos-p (when repos-p
(seq-remove (doom-rpartial #'straight--checkhash straight--repo-cache) (seq-remove (doom-rpartial #'straight--checkhash straight--repo-cache)
rdirs)) rdirs))
+5 -4
View File
@@ -17,16 +17,17 @@ following shell commands:
(let ((doom-auto-discard force-p)) (let ((doom-auto-discard force-p))
(cond (cond
(packages-only-p (packages-only-p
(doom-cli-execute "sync" '("-u")) (doom-cli-execute "sync" "-u")
(print! (success "Finished upgrading Doom Emacs"))) (print! (success "Finished upgrading Doom Emacs")))
((doom-cli-upgrade doom-auto-accept doom-auto-discard) ((doom-cli-upgrade doom-auto-accept doom-auto-discard)
;; Reload Doom's CLI & libraries, in case there were any upstream changes. ;; Reload Doom's CLI & libraries, in case there were any upstream changes.
;; Major changes will still break, however ;; Major changes will still break, however
(print! (info "Reloading Doom Emacs")) (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) ((equal this-rev new-rev)
(print! (success "Doom is already up-to-date!")) (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" ((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) (substring this-rev 0 10)
+183 -68
View File
@@ -1,13 +1,12 @@
;;; -*- lexical-binding: t; no-byte-compile: t; -*- ;;; core/core-cli.el --- -*- lexical-binding: t; no-byte-compile: t; -*-
(require 'seq)
(load! "autoload/process") (load! "autoload/process")
(load! "autoload/plist") (load! "autoload/plist")
(load! "autoload/files") (load! "autoload/files")
(load! "autoload/output") (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) (mapc (doom-rpartial #'make-directory 'parents)
(list doom-local-dir (list doom-local-dir
doom-etc-dir doom-etc-dir
@@ -21,6 +20,9 @@
;; Don't generate superfluous files when writing temp buffers ;; Don't generate superfluous files when writing temp buffers
(setq make-backup-files nil) (setq make-backup-files nil)
;; Stop user configuration from interfering with Doom
(setq enable-dir-local-variables nil)
;; ;;
;;; Variables ;;; 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 additional CLI commands, or reconfigure existing ones to better suit their
purpose.") 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-commands (make-hash-table :test 'equal))
(defvar doom--cli-groups (make-hash-table :test 'equal)) (defvar doom--cli-groups (make-hash-table :test 'equal))
(defvar doom--cli-group nil) (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 (cl-defstruct
(doom-cli (doom-cli
(:constructor nil) (:constructor nil)
@@ -159,7 +177,7 @@ purpose.")
"Return non-nil if CLI is an internal (non-public) command." "Return non-nil if CLI is an internal (non-public) command."
(string-prefix-p ":" (doom-cli-name cli))) (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). "Execute COMMAND (string) with ARGS (list of strings).
Executes a cli defined with `defcli!' with the name or alias specified by 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))) (doom--cli-process cli (remq nil args)))
(user-error "Couldn't find any %S command" command))) (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) (defmacro defcli! (name speclist &optional docstring &rest body)
"Defines a CLI command. "Defines a CLI command.
@@ -247,6 +247,65 @@ BODY will be run when this dispatcher is called."
,@body)) ,@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 ;;; straight.el hacks
@@ -366,52 +425,102 @@ everywhere we use it (and internally)."
interactive))) 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 ;;; CLI Commands
(load! "cli/help") (load! "cli/help")
(load! "cli/install") (load! "cli/install")
(load! "cli/sync")
(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/env") (load! "cli/env")
(load! "cli/upgrade") (load! "cli/upgrade")
(load! "cli/packages") (load! "cli/packages")
@@ -427,12 +536,10 @@ stale."
;; (load! "cli/test") ;; (load! "cli/test")
) )
(defcligroup! "Compilation" (defcligroup! "Compilation"
"For compiling Doom and your config" "For compiling Doom and your config"
(load! "cli/byte-compile")) (load! "cli/byte-compile"))
(defcligroup! "Utilities" (defcligroup! "Utilities"
"Conveniences for interacting with Doom externally" "Conveniences for interacting with Doom externally"
(defcli! run (&rest args) (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 WARNING: this command exists for convenience and testing. Doom will suffer
additional overhead by being started this way. For the best performance, it is additional overhead by being started this way. For the best performance, it is
best to run Doom out of ~/.emacs.d and ~/.doom.d." best to run Doom out of ~/.emacs.d and ~/.doom.d."
(apply #'doom-cli-execute-after invocation-name args) (throw 'exit (cons invocation-name args))))
nil))
;;
;;; 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) (provide 'core-cli)
;;; core-cli.el ends here ;;; core-cli.el ends here
+26 -11
View File
@@ -114,6 +114,10 @@ possible."
(setq-default indent-tabs-mode nil (setq-default indent-tabs-mode nil
tab-width 4) 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 ;; Make `tabify' and `untabify' only affect indentation. Not tabs/spaces in the
;; middle of a line. ;; middle of a line.
(setq tabify-regexp "^\t* [ \t]+") (setq tabify-regexp "^\t* [ \t]+")
@@ -189,17 +193,23 @@ possible."
;; Only prompts for confirmation when buffer is unsaved. ;; Only prompts for confirmation when buffer is unsaved.
revert-without-query (list ".")) revert-without-query (list "."))
;; Instead of `auto-revert-mode' or `global-auto-revert-mode', we lazily auto ;; `auto-revert-mode' and `global-auto-revert-mode' would, normally, abuse the
;; revert; when we save a file or switch buffers/windows (or focus on Emacs). ;; 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 ;; So Doom uses a different strategy: we lazily auto revert buffers when the
;; Emacs to a halt if you do expensive IO (outside of Emacs) on the files you ;; user a) saves a file, b) switches to a buffer (or its window), or c) you
;; have open (like compression). The only alternative is aggressive polling, ;; focus Emacs (after using another program). This way, Emacs only ever has to
;; which is unreliable and expensive with a lot of buffers open. ;; 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 () (defun doom-auto-revert-buffer-h ()
"Auto revert current buffer, if necessary." "Auto revert current buffer, if necessary."
(unless (or auto-revert-mode (active-minibuffer-window)) (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 () (defun doom-auto-revert-buffers-h ()
"Auto revert stale buffers in visible windows, if necessary." "Auto revert stale buffers in visible windows, if necessary."
@@ -220,9 +230,15 @@ possible."
(file-truename file) (file-truename file)
file)) file))
(setq recentf-filename-handlers (setq recentf-filename-handlers
'(substring-no-properties ; strip out lingering text properties '(;; Text properties inflate the size of recentf's files, and there is
doom--recent-file-truename ; resolve symlinks of local files ;; no purpose in persisting them, so we strip them out.
abbreviate-file-name) ; replace $HOME with ~ 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-save-file (concat doom-cache-dir "recentf")
recentf-auto-cleanup 'never recentf-auto-cleanup 'never
recentf-max-menu-items 0 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 (use-package! better-jumper
:hook (doom-first-input . better-jumper-mode) :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 :commands doom-set-jump-a doom-set-jump-maybe-a doom-set-jump-h
:preface :preface
;; REVIEW Suppress byte-compiler warning spawning a *Compile-Log* buffer at ;; REVIEW Suppress byte-compiler warning spawning a *Compile-Log* buffer at
+4 -1
View File
@@ -28,7 +28,10 @@ and Emacs states, and for non-evil users.")
(cond (IS-MAC (cond (IS-MAC
(setq mac-command-modifier 'super (setq mac-command-modifier 'super
mac-option-modifier 'meta)) mac-option-modifier 'meta
ns-command-modifier 'super
ns-option-modifier 'meta
ns-right-option-modifier 'none))
(IS-WINDOWS (IS-WINDOWS
(setq w32-lwindow-modifier 'super (setq w32-lwindow-modifier 'super
w32-rwindow-modifier 'super))) w32-rwindow-modifier 'super)))
+7 -7
View File
@@ -220,19 +220,19 @@ writes to `standard-output'."
(funcall write-region start end filename append visit lockname mustbenew))) (funcall write-region start end filename append visit lockname mustbenew)))
,@forms)))) ,@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. "Expands to THEN if COND is non-nil, to BODY otherwise.
COND is checked at compile/expansion time, allowing BODY to be omitted COND is checked at compile/expansion time, allowing BODY to be omitted entirely
entirely when the elisp is byte-compiled. Use this for forms that contain when the elisp is byte-compiled. Use this for forms that contain expensive
expensive macros that could safely be removed at compile time." macros that could safely be removed at compile time."
(declare (indent 2)) (declare (indent 2))
(if (eval cond) (if (eval cond)
then then
(macroexp-progn body))) (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. "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)) (declare (indent 1))
(when (eval cond) (when (eval cond)
(macroexp-progn body))) (macroexp-progn body)))
@@ -639,7 +639,7 @@ testing advice (when combined with `rotate-text').
;; ;;
;;; Backports ;;; Backports
(when! (version< emacs-version "27.0.90") (eval-when! (version< emacs-version "27.0.90")
;; DEPRECATED Backported from Emacs 27 ;; DEPRECATED Backported from Emacs 27
(defmacro setq-local (&rest pairs) (defmacro setq-local (&rest pairs)
"Make variables in PAIRS buffer-local and assign them the corresponding values. "Make variables in PAIRS buffer-local and assign them the corresponding values.
+5 -3
View File
@@ -39,7 +39,8 @@ run before `doom-init-modules-hook'. Relevant to `doom-module-init-file'.")
(vterm (:term vterm)) (vterm (:term vterm))
(password-store (:tools pass)) (password-store (:tools pass))
(flycheck (:checkers syntax)) (flycheck (:checkers syntax))
(flyspell (:checkers spell))) (flyspell (:checkers spell))
(macos (:os macos)))
(:emacs (electric-indent (:emacs electric)) (:emacs (electric-indent (:emacs electric))
(hideshow (:editor fold)) (hideshow (:editor fold))
(eshell (:term eshell)) (eshell (:term eshell))
@@ -47,7 +48,8 @@ run before `doom-init-modules-hook'. Relevant to `doom-module-init-file'.")
(:ui (doom-modeline (:ui modeline)) (:ui (doom-modeline (:ui modeline))
(fci (:ui fill-column)) (fci (:ui fill-column))
(evil-goggles (:ui ophints)) (evil-goggles (:ui ophints))
(tabbar (:ui tabs))) (tabbar (:ui tabs))
(pretty-code (:ui ligatures)))
(:app (email (:email mu4e)) (:app (email (:email mu4e))
(notmuch (:email notmuch))) (notmuch (:email notmuch)))
(:lang (perl (:lang raku)))) (: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). multiple, linear values).
The bootstrap process involves making sure the essential directories exist, core 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 cache exists (and is loaded) and, finally, loads your private init.el (which
should contain your `doom!' block). should contain your `doom!' block).
+36 -14
View File
@@ -97,9 +97,11 @@ uses a straight or package.el command directly).")
;; we don't have to deal with them at all. ;; we don't have to deal with them at all.
autoload-compute-prefixes nil autoload-compute-prefixes nil
;; We handle it ourselves ;; We handle it ourselves
straight-fix-org nil straight-fix-org nil)
;; HACK Disable native-compilation for some troublesome files
comp-deferred-compilation-black-list '("/evil-collection-vterm\\.el$")) (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) (defadvice! doom--read-pinned-packages-a (orig-fn &rest args)
"Read `:pin's in `doom-packages' on top of straight's lockfiles." "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) ((null pin)
(funcall call "git" "clone" "--origin" "origin" repo-url repo-dir (funcall call "git" "clone" "--origin" "origin" repo-url repo-dir
"--depth" (number-to-string straight-vc-git-default-clone-depth) "--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) ((integerp straight-vc-git-default-clone-depth)
(make-directory repo-dir t) (make-directory repo-dir t)
(let ((default-directory repo-dir)) (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" "checkout" "-b" straight-repository-branch)
(funcall call "git" "remote" "add" "origin" repo-url) (funcall call "git" "remote" "add" "origin" repo-url)
(funcall call "git" "fetch" "origin" pin (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))))) (funcall call "git" "checkout" "--detach" pin)))))
(require 'straight (concat repo-dir "/straight.el")) (require 'straight (concat repo-dir "/straight.el"))
(doom-log "Initializing recipes") (doom-log "Initializing recipes")
@@ -184,10 +188,20 @@ processed."
(error "Failed to read any packages")) (error "Failed to read any packages"))
(dolist (package doom-packages) (dolist (package doom-packages)
(cl-destructuring-bind (cl-destructuring-bind
(name &key recipe disable ignore &allow-other-keys) package (name &key recipe disable ignore shadow &allow-other-keys) package
(unless ignore (unless ignore
(if disable (if disable
(cl-pushnew name doom-disabled-packages) (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 (when recipe
(straight-override-recipe (cons name recipe))) (straight-override-recipe (cons name recipe)))
(straight-register-package name))))))) (straight-register-package name)))))))
@@ -327,6 +341,7 @@ installed."
If ALL-P, gather packages unconditionally across all modules, including disabled If ALL-P, gather packages unconditionally across all modules, including disabled
ones." ones."
(let ((packages-file (concat doom-packages-file ".el")) (let ((packages-file (concat doom-packages-file ".el"))
doom-disabled-packages
doom-packages) doom-packages)
(doom--read-packages (doom--read-packages
(doom-path doom-core-dir packages-file) all-p 'noerror) (doom-path doom-core-dir packages-file) all-p 'noerror)
@@ -338,10 +353,12 @@ ones."
(doom-files-in doom-modules-dir (doom-files-in doom-modules-dir
:depth 2 :depth 2
:match "/packages\\.el$")) :match "/packages\\.el$"))
;; We load the private packages file twice to ensure disabled packages ;; We load the private packages file twice to populate
;; are seen ASAP, and a second time to ensure privately overridden ;; `doom-disabled-packages' disabled packages are seen ASAP, and a
;; packages are properly overwritten. ;; second time to ensure privately overridden packages are properly
(doom--read-packages private-packages nil 'noerror) ;; overwritten.
(let (doom-packages)
(doom--read-packages private-packages nil 'noerror))
(cl-loop for key being the hash-keys of doom-modules (cl-loop for key being the hash-keys of doom-modules
for path = (doom-module-path (car key) (cdr key) packages-file) for path = (doom-module-path (car key) (cdr key) packages-file)
for doom--current-module = key for doom--current-module = key
@@ -382,7 +399,7 @@ ones."
;;; Module package macros ;;; Module package macros
(cl-defmacro package! (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). "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 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 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 package. If set to 'prefer, the package will not be installed if it is
already provided by Emacs. 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 Returns t if package is successfully registered, and nil if it was disabled
elsewhere." elsewhere."
@@ -453,7 +474,7 @@ elsewhere."
(when-let (recipe (plist-get plist :recipe)) (when-let (recipe (plist-get plist :recipe))
(cl-destructuring-bind (cl-destructuring-bind
(&key local-repo _files _flavor (&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) _type _repo _host _branch _remote _nonrecursive _fork _depth)
recipe recipe
;; Expand :local-repo from current directory ;; Expand :local-repo from current directory
@@ -469,9 +490,10 @@ elsewhere."
(signal 'doom-package-error (signal 'doom-package-error
(cons ,(symbol-name name) (cons ,(symbol-name name)
(error-message-string e))))) (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) (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 (with-no-warnings
(cons name plist))))) (cons name plist)))))
+1 -33
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 ;; Remove hscroll-margin in shells, otherwise it causes jumpiness
(setq-hook! '(eshell-mode-hook term-mode-hook) hscroll-margin 0) (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 ;;; Cursor
@@ -307,33 +302,6 @@ windows, switch to `doom-fallback-buffer'. Otherwise, delegate to original
tool-bar-mode nil tool-bar-mode nil
scroll-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, ;; The native border "consumes" a pixel of the fringe on righter-most splits,
;; `window-divider' does not. Available since Emacs 25.1. ;; `window-divider' does not. Available since Emacs 25.1.
(setq window-divider-default-places t (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)) (run-hooks 'doom-load-theme-hook))
result))) result)))
(when! (not EMACS27+) (eval-when! (not EMACS27+)
;; DEPRECATED `doom--load-theme-a' handles this for us after the theme is ;; DEPRECATED `doom--load-theme-a' handles this for us after the theme is
;; loaded, but this only works on Emacs 27+. Disabling old themes ;; loaded, but this only works on Emacs 27+. Disabling old themes
;; must be done *before* the theme is loaded in Emacs 26. ;; must be done *before* the theme is loaded in Emacs 26.
+37 -18
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; Defaults to ~/.config/doom, ~/.doom.d or the value of the DOOMDIR envvar;
whichever is found first. Must end in a slash.") 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. "Where `doom-reload-core-autoloads' stores its core autoloads.
This file is responsible for informing Emacs where to find all of Doom's 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))) (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 ;;; Optimizations
@@ -303,8 +323,9 @@ config.el instead."
(setq ffap-machine-p-known 'reject) (setq ffap-machine-p-known 'reject)
;; Font compacting can be terribly expensive, especially for rendering icon ;; 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 ;; fonts on Windows. Whether disabling it has a notable affect on Linux and Mac
;; been determined, but we inhibit it there anyway. ;; hasn't been determined, but we inhibit it there anyway. This increases memory
;; usage, however!
(setq inhibit-compacting-font-caches t) (setq inhibit-compacting-font-caches t)
;; Performance on Windows is considerably worse than elsewhere. We'll need ;; 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-MAC (setq command-line-ns-option-alist nil))
(unless IS-LINUX (setq command-line-x-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 ;; Adopt a sneaky garbage collection strategy of waiting until idle time to
;; collect; staving off the collector while the user is working. ;; collect; staving off the collector while the user is working.
(setq gcmh-idle-delay 5 (setq gcmh-idle-delay 5
@@ -330,8 +347,10 @@ config.el instead."
gcmh-verbose doom-debug-p) gcmh-verbose doom-debug-p)
;; HACK `tty-run-terminal-initialization' is *tremendously* slow for some ;; HACK `tty-run-terminal-initialization' is *tremendously* slow for some
;; reason. Disabling it completely could have many side-effects, so we ;; reason; inexplicably doubling startup time for terminal Emacs. Keeping
;; defer it until later, at which time it (somehow) runs very quickly. ;; 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) (unless (daemonp)
(advice-add #'tty-run-terminal-initialization :override #'ignore) (advice-add #'tty-run-terminal-initialization :override #'ignore)
(add-hook! 'window-setup-hook (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 ;; 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 ;; have run. If you want hook functions to be aware of these customizations, add
;; them to MODE-local-vars-hook instead. ;; 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 () (defun doom-run-local-var-hooks-h ()
"Run MODE-local-vars-hook after local variables are initialized." "Run MODE-local-vars-hook after local variables are initialized."
(unless doom--inhibit-local-var-hooks (unless doom-inhibit-local-var-hooks
(set (make-local-variable 'doom--inhibit-local-var-hooks) t) (set (make-local-variable 'doom-inhibit-local-var-hooks) t)
(run-hook-wrapped (intern-soft (format "%s-local-vars-hook" major-mode)) (run-hook-wrapped (intern-soft (format "%s-local-vars-hook" major-mode))
#'doom-try-run-hook))) #'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). "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; 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 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. that `core-packages' will load when `package' or `straight' is used.
@@ -505,7 +524,7 @@ to least)."
load-path doom--initial-load-path load-path doom--initial-load-path
process-environment doom--initial-process-environment) 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 ;; package autoloads, autodefs like `set-company-backend!', and variables
;; like `doom-modules', `doom-disabled-packages', `load-path', ;; like `doom-modules', `doom-disabled-packages', `load-path',
;; `auto-mode-alist', and `Info-directory-list'. etc. Compiling them into ;; `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. ;; Avoid `file-name-sans-extension' for premature optimization reasons.
;; `string-remove-suffix' is cheaper because it performs no file sanity ;; `string-remove-suffix' is cheaper because it performs no file sanity
;; checks; just plain ol' string manipulation. ;; checks; just plain ol' string manipulation.
(load (string-remove-suffix ".el" doom-autoload-file) (load (string-remove-suffix ".el" doom-autoloads-file)
nil 'nomessage) nil 'nomessage)
(file-missing (file-missing
;; If the autoloads file fails to load then the user forgot to sync, or ;; If the autoloads file fails to load then the user forgot to sync, or
;; aborted a doom command midway! ;; aborted a doom command midway!
(if (equal (nth 3 e) doom-autoload-file) (if (equal (nth 3 e) doom-autoloads-file)
(signal 'doom-error (signal 'doom-error
(list "Doom is in an incomplete state" (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 ;; Otherwise, something inside the autoloads file is triggering this
;; error; forward it! ;; error; forward it!
(apply #'doom-autoload-error e)))) (signal 'doom-autoload-error e))))
;; Load shell environment, optionally generated from 'doom env'. No need ;; Load shell environment, optionally generated from 'doom env'. No need
;; to do so if we're in terminal Emacs, where Emacs correctly inherits ;; to do so if we're in terminal Emacs, where Emacs correctly inherits
+9 -7
View File
@@ -4,6 +4,10 @@
;; core.el ;; core.el
(package! auto-minor-mode :pin "17cfa1b54800fdef2975c0c0531dad34846a5065") (package! auto-minor-mode :pin "17cfa1b54800fdef2975c0c0531dad34846a5065")
(package! gcmh :pin "b1bde5089169a74f62033d027e06e98cbeedd43f") (package! gcmh :pin "b1bde5089169a74f62033d027e06e98cbeedd43f")
(package! explain-pause-mode
:recipe (:host github
:repo "lastquestion/explain-pause-mode")
:pin "2356c8c3639cbeeb9751744dbe737267849b4b51")
;; core-packages.el ;; core-packages.el
(package! straight (package! straight
@@ -14,15 +18,15 @@
:local-repo "straight.el" :local-repo "straight.el"
:files ("straight*.el") :files ("straight*.el")
:no-build t) :no-build t)
:pin "fc077dda27dc603c6a287d9cffe0bf0ba5018d66") :pin "0c7c7571349b628d87acde474a754f05e86ca876")
;; core-modules.el ;; core-modules.el
(package! use-package (package! use-package
:type 'core :type 'core
:pin "7d925367ef0857d513d62eab4cb57b7436b9ffe9") :pin "4fb1f9a68f1e7e7d614652afc017a6652fd029f1")
;; core-ui.el ;; core-ui.el
(package! all-the-icons :pin "ed8e44de4fa601309d2bba902c3b37cb73e4daa0") (package! all-the-icons :pin "8c0228053dd6693d926970d89270094be52b0f75")
(package! hide-mode-line :pin "88888825b5b27b300683e662fa3be88d954b1cea") (package! hide-mode-line :pin "88888825b5b27b300683e662fa3be88d954b1cea")
(package! highlight-numbers :pin "8b4744c7f46c72b1d3d599d4fb75ef8183dee307") (package! highlight-numbers :pin "8b4744c7f46c72b1d3d599d4fb75ef8183dee307")
(package! rainbow-delimiters :pin "5125f4e47604ad36c3eb4706310fcafac729ca8c") (package! rainbow-delimiters :pin "5125f4e47604ad36c3eb4706310fcafac729ca8c")
@@ -32,8 +36,6 @@
(package! better-jumper :pin "6d240032ca213ccb3347e25f26c29b6822bf03a7") (package! better-jumper :pin "6d240032ca213ccb3347e25f26c29b6822bf03a7")
(package! dtrt-indent :pin "50c440c80e0d15303d8ab543bce4c56e9c2bf407") (package! dtrt-indent :pin "50c440c80e0d15303d8ab543bce4c56e9c2bf407")
(package! helpful :pin "c0662aa07266fe204f4e6d72ccaa6af089400556") (package! helpful :pin "c0662aa07266fe204f4e6d72ccaa6af089400556")
(when IS-MAC
(package! ns-auto-titlebar :pin "1efc30d38509647b417f05587fd7003457719256"))
(package! pcre2el :pin "0b5b2a2c173aab3fd14aac6cf5e90ad3bf58fa7d") (package! pcre2el :pin "0b5b2a2c173aab3fd14aac6cf5e90ad3bf58fa7d")
(package! smartparens :pin "555626a43f9bb1985aa9a0eb675f2b88b29702c8") (package! smartparens :pin "555626a43f9bb1985aa9a0eb675f2b88b29702c8")
(package! so-long (package! so-long
@@ -50,8 +52,8 @@
:pin "2bb49d3ee7d2cba133bc7e9cdac416cd1c5e4fe0") :pin "2bb49d3ee7d2cba133bc7e9cdac416cd1c5e4fe0")
;; core-projects.el ;; core-projects.el
(package! projectile :pin "bbcf781d3fddb8e00d0dc10eb68bc2528fb409b3") (package! projectile :pin "46d2010c6a6cccfc4be72317f10ea99fd041ab54")
;; core-keybinds.el ;; core-keybinds.el
(package! general :pin "a0b17d207badf462311b2eef7c065b884462cb7c") (package! general :pin "a0b17d207badf462311b2eef7c065b884462cb7c")
(package! which-key :pin "3642c11d5ef9be3c6fb9edb8fd5ec3c370abd889") (package! which-key :pin "e48e190a75a0c176e1deac218b891e77792d6921")
+15 -15
View File
@@ -28,7 +28,7 @@
(spy-on 'doom-initialize-packages :and-return-value t)) (spy-on 'doom-initialize-packages :and-return-value t))
(it "initializes packages if core autoload file doesn't exist" (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 nil 'noerror))
(expect 'doom-initialize-packages :to-have-been-called)) (expect 'doom-initialize-packages :to-have-been-called))
@@ -51,12 +51,12 @@
(it "loads autoloads files" (it "loads autoloads files"
(ignore-errors (doom-initialize nil 'noerror)) (ignore-errors (doom-initialize nil 'noerror))
(expect 'doom-load-autoloads-file (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 (expect 'doom-load-autoloads-file
:to-have-been-called-with doom-package-autoload-file)) :to-have-been-called-with doom-package-autoload-file))
(it "throws doom-autoload-error when autoload files don't exist" (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")) (doom-package-autoload-file "doesnotexist"))
(expect (doom-initialize) :to-throw 'doom-autoload-error))))) (expect (doom-initialize) :to-throw 'doom-autoload-error)))))
@@ -72,26 +72,26 @@
(expect 'require :to-have-been-called-with 'core-editor)))) (expect 'require :to-have-been-called-with 'core-editor))))
(describe "doom-load-autoloads-file" (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 (before-each
(setq doom-autoload-file (make-temp-file "doom-autoload" nil ".el")) (setq doom-autoloads-file (make-temp-file "doom-autoload" nil ".el"))
(with-temp-file doom-autoload-file) (with-temp-file doom-autoloads-file)
(byte-compile-file doom-autoload-file)) (byte-compile-file doom-autoloads-file))
(after-each (after-each
(delete-file doom-autoload-file) (delete-file doom-autoloads-file)
(delete-file (byte-compile-dest-file doom-autoload-file))) (delete-file (byte-compile-dest-file doom-autoloads-file)))
(it "loads the byte-compiled autoloads file if available" (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 (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)) (delete-file (byte-compile-dest-file doom-autoloads-file))
(doom-load-autoloads-file doom-autoload-file) (doom-load-autoloads-file doom-autoloads-file)
(expect (caar load-history) :to-equal-file doom-autoload-file)) (expect (caar load-history) :to-equal-file doom-autoloads-file))
(it "returns non-nil if successful" (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" (it "returns nil on failure or error, non-fatally"
(expect (doom-load-autoloads-file "/does/not/exist") :to-be nil))) (expect (doom-load-autoloads-file "/does/not/exist") :to-be nil)))
+1 -1
View File
@@ -152,7 +152,7 @@ It is integrated into Helpful, in Doom.
*** custom-theme-set-faces! *** custom-theme-set-faces!
#+BEGIN_SRC elisp :eval no #+BEGIN_SRC elisp :eval no
(custom-theme-set-faces! 'doom-one-theme (custom-theme-set-faces! 'doom-one
'(outline-1 :weight normal) '(outline-1 :weight normal)
'(outline-2 :weight normal) '(outline-2 :weight normal)
'(outline-3 :weight normal) '(outline-3 :weight normal)
+6 -6
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. that's before we factor in plugins and poorly optimized major modes.
There is an unfortunate but necessary adjustment of expectations new users must 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 undergo, when they adopt Emacs. Doom has inherited this curse. Its raison d'etre
d'etre is to improve the situation, but I can only go so far, especially if you is to improve the situation, but I can only go so far, especially if you choose
choose to enable all the most expensive features. You will unavoidable find to enable all the most expensive features. You will unavoidably find cases where
cases where Emacs *is just slow*. Emacs *is just slow*.
What can you do about it? 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 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]]. [[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: 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=. vc-gutter=.
4. Turn off line numbers ~(setq display-line-numbers-type nil)~. It's known to 4. Turn off line numbers ~(setq display-line-numbers-type nil)~. It's known to
slow down scrolling, in particular. 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]]). 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 + 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 ** 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. This means Emacs can't find the X-theme.el file for the theme you want to load.
+33 -36
View File
@@ -52,8 +52,6 @@ us know!
- [[#disabling-packages][Disabling packages]] - [[#disabling-packages][Disabling packages]]
- [[#changing-a-recipe-for-a-included-package][Changing a recipe for a included package]] - [[#changing-a-recipe-for-a-included-package][Changing a recipe for a included package]]
- [[#usingloading-local-packages][Using/loading local packages]] - [[#usingloading-local-packages][Using/loading local packages]]
- [[#adjust-your-load-path][Adjust your ~load-path~]]
- [[#local-repo][:local-repo]]
- [[#configuring-doom][Configuring Doom]] - [[#configuring-doom][Configuring Doom]]
- [[#configuring-packages][Configuring packages]] - [[#configuring-packages][Configuring packages]]
- [[#reloading-your-config][Reloading your config]] - [[#reloading-your-config][Reloading your config]]
@@ -155,8 +153,7 @@ pacman -S git emacs ripgrep
pacman -S fd pacman -S fd
#+END_SRC #+END_SRC
The above installs Emacs 26.3 (at the time of writing). To acquire Emacs 27 The above installs Emacs 27 (at the time of writing).
[[https://aur.archlinux.org/packages/emacs27-git/][emacs27-git]] is available on the AUR.
**** NixOS **** NixOS
On NixOS Emacs 26.3 can be installed via ~nix-env -Ai nixos.emacs~, or 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 ln -s /usr/local/opt/emacs-plus/Emacs.app /Applications/Emacs.app
#+END_SRC #+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 - [[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 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): 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 #+end_quote
*** Using/loading local packages *** Using/loading local packages
Say you have a local elisp package that you are developing, and want to Say you are developing an Emacs package locally and want to "install" it for
"install" it for live testing. You have two options: live testing. To do this specify a ~:local-repo~ in that package's recipe:
**** 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.
#+BEGIN_SRC elisp #+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 ;; or
(use-package my-package (add-load-path! "lisp/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))
#+END_SRC #+END_SRC
#+begin_quote #+begin_quote
+4
View File
@@ -26,3 +26,7 @@
;; in this file and can conflict with later config (particularly where the ;; in this file and can conflict with later config (particularly where the
;; cursor color is concerned). ;; cursor color is concerned).
(advice-add #'x-apply-session-resources :override #'ignore) (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)
+3 -2
View File
@@ -17,6 +17,7 @@
(doom! :input (doom! :input
;;chinese ;;chinese
;;japanese ;;japanese
;;layout ; auie,ctsrnm is the superior home row
:completion :completion
company ; the ultimate code completion backend company ; the ultimate code completion backend
@@ -33,13 +34,13 @@
hl-todo ; highlight TODO/FIXME/NOTE/DEPRECATED/HACK/REVIEW hl-todo ; highlight TODO/FIXME/NOTE/DEPRECATED/HACK/REVIEW
;;hydra ;;hydra
;;indent-guides ; highlighted indent columns ;;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 ;;minimap ; show a map of the code on the side
modeline ; snazzy, Atom-inspired modeline, plus API modeline ; snazzy, Atom-inspired modeline, plus API
;;nav-flash ; blink cursor line after big motions ;;nav-flash ; blink cursor line after big motions
;;neotree ; a project drawer, like NERDTree for vim ;;neotree ; a project drawer, like NERDTree for vim
ophints ; highlight the region an operation acts on ophints ; highlight the region an operation acts on
(popup +defaults) ; tame sudden yet inevitable temporary windows (popup +defaults) ; tame sudden yet inevitable temporary windows
;;pretty-code ; ligatures or substitute text with pretty symbols
;;tabs ; a tab bar for Emacs ;;tabs ; a tab bar for Emacs
;;treemacs ; a project drawer, like neotree but cooler ;;treemacs ; a project drawer, like neotree but cooler
;;unicode ; extended unicode support for various languages ;;unicode ; extended unicode support for various languages
@@ -92,7 +93,6 @@
;;gist ; interacting with github gists ;;gist ; interacting with github gists
lookup ; navigate your code and its documentation lookup ; navigate your code and its documentation
;;lsp ;;lsp
;;macos ; MacOS-specific commands
magit ; a git porcelain for Emacs magit ; a git porcelain for Emacs
;;make ; run make tasks from Emacs ;;make ; run make tasks from Emacs
;;pass ; password manager for nerds ;;pass ; password manager for nerds
@@ -105,6 +105,7 @@
;;upload ; map local to remote projects via ssh/ftp ;;upload ; map local to remote projects via ssh/ftp
:os :os
(:if IS-MAC macos) ; improve compatibility with macOS
;;tty ; improve the terminal Emacs experience ;;tty ; improve the terminal Emacs experience
:lang :lang
+1 -1
View File
@@ -21,7 +21,7 @@ This module provides no flags.
** Packages ** Packages
+ [[https://github.com/kiwanami/emacs-calfw][calfw]] + [[https://github.com/kiwanami/emacs-calfw][calfw]]
+ [[https://github.com/kiwanami/emacs-calfw][calfw-org]] + [[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 * Configuration
** Changing calendar sources ** Changing calendar sources
+1 -1
View File
@@ -5,4 +5,4 @@
(package! calfw-org :pin "03abce97620a4a7f7ec5f911e669da9031ab9088") (package! calfw-org :pin "03abce97620a4a7f7ec5f911e669da9031ab9088")
(package! calfw-cal :pin "03abce97620a4a7f7ec5f911e669da9031ab9088") (package! calfw-cal :pin "03abce97620a4a7f7ec5f911e669da9031ab9088")
(package! calfw-ical :pin "03abce97620a4a7f7ec5f911e669da9031ab9088") (package! calfw-ical :pin "03abce97620a4a7f7ec5f911e669da9031ab9088")
(package! org-gcal :pin "744505832b34e07b44a5d97d8720b2d7492d7fc9") (package! org-gcal :pin "2cad2d8c175975dea42903cd4e3fd8bec423c01a")
+1 -1
View File
@@ -1,5 +1,5 @@
;; -*- no-byte-compile: t; -*- ;; -*- no-byte-compile: t; -*-
;;; app/irc/packages.el ;;; app/irc/packages.el
(package! circe :pin "e5bf5f89741a9c43aa406491e94dd8d58c302fb4") (package! circe :pin "89aac22259e5d09ae1183e0df163338fe491e9e7")
(package! circe-notifications :pin "291149ac12877bbd062da993479d3533a26862b0") (package! circe-notifications :pin "291149ac12877bbd062da993479d3533a26862b0")
+1 -1
View File
@@ -1,5 +1,5 @@
;; -*- no-byte-compile: t; -*- ;; -*- no-byte-compile: t; -*-
;;; app/rss/packages.el ;;; app/rss/packages.el
(package! elfeed :pin "d0405e63863e54a01200740a6717ac875eceabc1") (package! elfeed :pin "8fb09ad75f2ff7d6f7d8b8d1ac65b9be873cc31d")
(package! elfeed-org :pin "77b6bbf222487809813de260447d31c4c59902c9") (package! elfeed-org :pin "77b6bbf222487809813de260447d31c4c59902c9")
+1 -1
View File
@@ -2,4 +2,4 @@
;;; app/twitter/packages.el ;;; app/twitter/packages.el
(package! twittering-mode :pin "114891e8fdb4f06b1326a6cf795e49c205cf9e29") (package! twittering-mode :pin "114891e8fdb4f06b1326a6cf795e49c205cf9e29")
(package! avy :pin "509471bad0e8094b8639729ec39ca141fae7d4bd") (package! avy :pin "bbf1e7339eba06784dfe86643bb0fbddf5bb0342")
@@ -1,7 +1,7 @@
;; -*- no-byte-compile: t; -*- ;; -*- no-byte-compile: t; -*-
;;; completion/company/packages.el ;;; completion/company/packages.el
(package! company :pin "5eb7d868c2a13bbfb14060b79d69f0d59f6a5f60") (package! company :pin "4462e7d399c3d2e1ea1f5d018f4537f1f3d5acfc")
(package! company-dict :pin "cd7b8394f6014c57897f65d335d6b2bd65dab1f4") (package! company-dict :pin "cd7b8394f6014c57897f65d335d6b2bd65dab1f4")
(when (featurep! +childframe) (when (featurep! +childframe)
(package! company-box :pin "889d723786df2de27d248c9965149d04af44273a")) (package! company-box :pin "d8f71fde7a3301a62f9f6f627aa51610a294f4df"))
+2 -2
View File
@@ -1,7 +1,7 @@
;; -*- no-byte-compile: t; -*- ;; -*- no-byte-compile: t; -*-
;;; completion/helm/packages.el ;;; completion/helm/packages.el
(package! helm :pin "5d224cb889aea8f090c82c5ae572b8db276bcf80") (package! helm :pin "d2fbf66ea727f27cdf867b2bd6d6f7c706f99192")
(package! helm-rg :pin "ee0a3c09da0c843715344919400ab0a0190cc9dc") (package! helm-rg :pin "ee0a3c09da0c843715344919400ab0a0190cc9dc")
(package! helm-c-yasnippet :pin "89cc8561e7e57e9d1070ee3641df019c7f49c5dd") (package! helm-c-yasnippet :pin "89cc8561e7e57e9d1070ee3641df019c7f49c5dd")
(package! helm-company :pin "6eb5c2d730a60e394e005b47c1db018697094dde") (package! helm-company :pin "6eb5c2d730a60e394e005b47c1db018697094dde")
@@ -13,7 +13,7 @@
(when (featurep! +fuzzy) (when (featurep! +fuzzy)
(package! helm-flx :pin "6640fac5cb16bee73c95b8ed1248a4e5e113690e")) (package! helm-flx :pin "6640fac5cb16bee73c95b8ed1248a4e5e113690e"))
(when (featurep! +childframe) (when (featurep! +childframe)
(package! posframe :pin "922e4d239f7a083213d856de67a9686a091b1e27")) (package! posframe :pin "7b92a54e588889a74d36d51167e067676db7be8a"))
(when (featurep! :lang org) (when (featurep! :lang org)
(package! helm-org :pin "b7a18dfc17e8b933956d61d68c435eee03a96c24")) (package! helm-org :pin "b7a18dfc17e8b933956d61d68c435eee03a96c24"))
(package! helm-descbinds :pin "b72515982396b6e336ad7beb6767e95a80fca192") (package! helm-descbinds :pin "b72515982396b6e336ad7beb6767e95a80fca192")
+2 -2
View File
@@ -19,7 +19,7 @@
- [[#in-buffer-searching][In-buffer searching]] - [[#in-buffer-searching][In-buffer searching]]
- [[#ivy-integration-for-various-completing-commands][Ivy integration for various completing commands]] - [[#ivy-integration-for-various-completing-commands][Ivy integration for various completing commands]]
- [[#general][General]] - [[#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]] - [[#search][Search]]
- [[#configuration][Configuration]] - [[#configuration][Configuration]]
- [[#enable-fuzzynon-fuzzy-search-for-specific-commands][Enable fuzzy/non-fuzzy search for specific commands]] - [[#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 | | =M-x=, =SPC := | Smarter, smex-powered M-x |
| =SPC '= | Resume last ivy session | | =SPC '= | Resume last ivy session |
*** Jump to files, buffers or projects) *** Jump to files, buffers or projects
| Keybind | Description | | Keybind | Description |
|----------------------+---------------------------------------| |----------------------+---------------------------------------|
| =SPC RET= | Find bookmark | | =SPC RET= | Find bookmark |
+10 -3
View File
@@ -46,6 +46,11 @@ results buffer.")
[remap persp-switch-to-buffer] #'+ivy/switch-workspace-buffer [remap persp-switch-to-buffer] #'+ivy/switch-workspace-buffer
[remap evil-show-jumps] #'+ivy/jump-list) [remap evil-show-jumps] #'+ivy/jump-list)
:config :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 ;; 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') ;; need to load it as early as possible. Some packages (like `ivy-prescient')
;; require this. ;; require this.
@@ -220,7 +225,7 @@ evil-ex-specific constructs, so we disable it solely in evil-ex."
(listp counsel-rg-base-command) (listp counsel-rg-base-command)
(member "--path-separator" counsel-rg-base-command)) (member "--path-separator" counsel-rg-base-command))
(setf (cadr (member "--path-separator" counsel-rg-base-command)) (setf (cadr (member "--path-separator" counsel-rg-base-command))
"//")) "/"))
;; Integrate with `helpful' ;; Integrate with `helpful'
(setq counsel-describe-function-function #'helpful-callable (setq counsel-describe-function-function #'helpful-callable
@@ -376,8 +381,10 @@ evil-ex-specific constructs, so we disable it solely in evil-ex."
'(literal regexp initialism))) '(literal regexp initialism)))
:config :config
(setq ivy-prescient-sort-commands (setq ivy-prescient-sort-commands
'(:not swiper swiper-isearch ivy-switch-buffer counsel-grep '(:not swiper swiper-isearch ivy-switch-buffer
counsel-git-grep counsel-ag counsel-rg counsel-imenu 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) counsel-yank-pop counsel-recentf counsel-buffer-or-recentf)
ivy-prescient-retain-classic-highlighting t) ivy-prescient-retain-classic-highlighting t)
(defun +ivy-prescient-non-fuzzy (str) (defun +ivy-prescient-non-fuzzy (str)
+2 -2
View File
@@ -1,7 +1,7 @@
;; -*- no-byte-compile: t; -*- ;; -*- no-byte-compile: t; -*-
;;; completion/ivy/packages.el ;;; completion/ivy/packages.el
(package! swiper :pin "c6b60d34ac37bf4d91a25f16d22e528f85e06938") (package! swiper :pin "9bb68419f1088ee4d8f2b76f84995fa02bceeed3")
(package! ivy) (package! ivy)
(package! ivy-hydra) (package! ivy-hydra)
(package! counsel) (package! counsel)
@@ -12,7 +12,7 @@
(package! wgrep :pin "f0ef9bfa44db503cdb2f83fcfbd2fa4e2382ef1f") (package! wgrep :pin "f0ef9bfa44db503cdb2f83fcfbd2fa4e2382ef1f")
(if (featurep! +prescient) (if (featurep! +prescient)
(package! ivy-prescient :pin "b11d79b10df12c58edc3487371c2c47dfb9b50e6") (package! ivy-prescient :pin "cc289ba3b0d89f251267ca2b669d01b3afecc530")
(when (featurep! +fuzzy) (when (featurep! +fuzzy)
(package! flx :pin "17f5c9cb2af18aa6f52910ff4a5a63591261ced5"))) (package! flx :pin "17f5c9cb2af18aa6f52910ff4a5a63591261ced5")))
@@ -47,8 +47,7 @@
:desc "LSP Code actions" "a" #'lsp-execute-code-action :desc "LSP Code actions" "a" #'lsp-execute-code-action
:desc "LSP Organize imports" "o" #'lsp-organize-imports :desc "LSP Organize imports" "o" #'lsp-organize-imports
:desc "LSP Rename" "r" #'lsp-rename :desc "LSP Rename" "r" #'lsp-rename
(:after lsp-mode :desc "LSP" "l" #'+default/lsp-command-map
:desc "LSP" "l" lsp-command-map)
(:when (featurep! :completion ivy) (:when (featurep! :completion ivy)
:desc "Jump to symbol in current workspace" "j" #'lsp-ivy-workspace-symbol :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) :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 project" "p" #'+default/search-project
:desc "Search other project" "P" #'+default/search-other-project :desc "Search other project" "P" #'+default/search-other-project
:desc "Search buffer" "s" #'+default/search-buffer :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 "Dictionary" "t" #'+lookup/dictionary-definition
:desc "Thesaurus" "T" #'+lookup/synonyms) :desc "Thesaurus" "T" #'+lookup/synonyms)
@@ -204,7 +204,7 @@
(:when (featurep! :term eshell) (:when (featurep! :term eshell)
:desc "Toggle eshell popup" "e" #'+eshell/toggle :desc "Toggle eshell popup" "e" #'+eshell/toggle
:desc "Open eshell here" "E" #'+eshell/here) :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 in Finder" "o" #'+macos/reveal-in-finder
:desc "Reveal project in Finder" "O" #'+macos/reveal-project-in-finder :desc "Reveal project in Finder" "O" #'+macos/reveal-project-in-finder
:desc "Send to Transmit" "u" #'+macos/send-to-transmit :desc "Send to Transmit" "u" #'+macos/send-to-transmit
@@ -279,8 +279,10 @@
(:when (featurep! :lang org +present) (:when (featurep! :lang org +present)
:desc "org-tree-slide mode" "p" #'org-tree-slide-mode) :desc "org-tree-slide mode" "p" #'org-tree-slide-mode)
:desc "Read-only mode" "r" #'read-only-mode :desc "Read-only mode" "r" #'read-only-mode
(:when (featurep! :checkers spell) (:when (and (featurep! :checkers spell) (not (featurep! :checkers spell +flyspell)))
:desc "Flyspell" "s" #'flyspell-mode) :desc "Spell checker" "s" #'spell-fu-mode)
(:when (featurep! :checkers spell +flyspell)
:desc "Spell checker" "s" #'flyspell-mode)
(:when (featurep! :lang org +pomodoro) (:when (featurep! :lang org +pomodoro)
:desc "Pomodoro timer" "t" #'org-pomodoro) :desc "Pomodoro timer" "t" #'org-pomodoro)
(:when (featurep! :ui zen) (:when (featurep! :ui zen)
@@ -132,11 +132,7 @@
"C-j" #'company-select-next-or-abort "C-j" #'company-select-next-or-abort
"C-k" #'company-select-previous-or-abort "C-k" #'company-select-previous-or-abort
"C-s" (cmd! (company-search-abort) (company-filter-candidates)) "C-s" (cmd! (company-search-abort) (company-filter-candidates))
[escape] #'company-search-abort)) [escape] #'company-search-abort)))
;; TAB auto-completion in term buffers
(:after comint :map comint-mode-map
"TAB" #'company-complete
[tab] #'company-complete))
(:when (featurep! :completion ivy) (:when (featurep! :completion ivy)
(:after ivy (:after ivy
@@ -349,9 +345,8 @@
(:when (featurep! :completion helm) (:when (featurep! :completion helm)
:desc "Jump to symbol in current workspace" "j" #'helm-lsp-workspace-symbol :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 "Jump to symbol in any workspace" "J" #'helm-lsp-global-workspace-symbol)
:desc "LSP Rename" "r" #'lsp-rename :desc "LSP" "l" #'+default/lsp-command-map
(:after lsp-mode :desc "LSP Rename" "r" #'lsp-rename)
:desc "LSP" "l" lsp-command-map))
(:when (featurep! :tools lsp +eglot) (:when (featurep! :tools lsp +eglot)
:desc "LSP Execute code action" "a" #'eglot-code-actions :desc "LSP Execute code action" "a" #'eglot-code-actions
:desc "LSP Rename" "r" #'eglot-rename :desc "LSP Rename" "r" #'eglot-rename
@@ -545,7 +540,7 @@
(:when (featurep! :term eshell) (:when (featurep! :term eshell)
:desc "Toggle eshell popup" "e" #'+eshell/toggle :desc "Toggle eshell popup" "e" #'+eshell/toggle
:desc "Open eshell here" "E" #'+eshell/here) :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 in Finder" "o" #'+macos/reveal-in-finder
:desc "Reveal project in Finder" "O" #'+macos/reveal-project-in-finder :desc "Reveal project in Finder" "O" #'+macos/reveal-project-in-finder
:desc "Send to Transmit" "u" #'+macos/send-to-transmit :desc "Send to Transmit" "u" #'+macos/send-to-transmit
@@ -645,6 +640,7 @@
:desc "Search other project" "P" #'+default/search-other-project :desc "Search other project" "P" #'+default/search-other-project
:desc "Jump to mark" "r" #'evil-show-marks :desc "Jump to mark" "r" #'evil-show-marks
:desc "Search buffer" "s" #'+default/search-buffer :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 "Dictionary" "t" #'+lookup/dictionary-definition
:desc "Thesaurus" "T" #'+lookup/synonyms) :desc "Thesaurus" "T" #'+lookup/synonyms)
@@ -665,8 +661,10 @@
(:when (featurep! :lang org +present) (:when (featurep! :lang org +present)
:desc "org-tree-slide mode" "p" #'org-tree-slide-mode) :desc "org-tree-slide mode" "p" #'org-tree-slide-mode)
:desc "Read-only mode" "r" #'read-only-mode :desc "Read-only mode" "r" #'read-only-mode
(:when (featurep! :checkers spell) (:when (and (featurep! :checkers spell) (not (featurep! :checkers spell +flyspell)))
:desc "Flyspell" "s" #'flyspell-mode) :desc "Spell checker" "s" #'spell-fu-mode)
(:when (featurep! :checkers spell +flyspell)
:desc "Spell checker" "s" #'flyspell-mode)
(:when (featurep! :lang org +pomodoro) (:when (featurep! :lang org +pomodoro)
:desc "Pomodoro timer" "t" #'org-pomodoro) :desc "Pomodoro timer" "t" #'org-pomodoro)
:desc "Soft line wrapping" "w" #'visual-line-mode :desc "Soft line wrapping" "w" #'visual-line-mode
+1 -1
View File
@@ -15,7 +15,7 @@
ivy-switch-buffer-map)) ivy-switch-buffer-map))
((featurep! :completion helm) ((featurep! :completion helm)
'(helm-map '(helm-map
helm-ag-map helm-rg-map
helm-read-file-map)))) helm-read-file-map))))
"A list of all the keymaps used for the minibuffer.") "A list of all the keymaps used for the minibuffer.")
+24 -19
View File
@@ -12,27 +12,30 @@ byte-compiled from.")
(defvar org-mode-hook) (defvar org-mode-hook)
(defvar org-inhibit-startup) (defvar org-inhibit-startup)
;;;###autoload (add-hook 'org-mode-hook #'+literate-enable-recompile-h)
;;;###autoload ;;;###autoload
(defun +literate-tangle-h () (defun +literate-tangle-h ()
"Tangles `+literate-config-file' if it has changed." "Tangles `+literate-config-file' if it has changed."
(print! (start "Compiling your literate config...")) (and (not (getenv "__NOTANGLE"))
(print-group! (require 'ox nil t)
(let* ((default-directory doom-private-dir) (require 'ob-tangle nil t)
(org (expand-file-name +literate-config-file)) (letf! ((default-directory doom-private-dir)
(dest (concat (file-name-sans-extension +literate-config-file) ".el"))) (target +literate-config-file)
(and (require 'ox) (cache +literate-config-cache-file)
(require 'ob-tangle) (dest (expand-file-name (concat (file-name-base target) ".el")))
(letf! (;; Operate on a copy because `org-babel-tangle' has ;; Operate on a copy because `org-babel-tangle' has
;; side-effects we need to undo immediately as not to ;; side-effects we need to undo immediately as not to
;; overwrite the user's config; it's bad ettiquite. ;; overwrite the user's config; it's bad ettiquite.
(backup (make-temp-file (concat (file-name-nondirectory org) "."))) (backup (make-temp-file (concat (file-name-nondirectory target) ".")))
;; A hack to prevent ob-tangle from operating relative to the
;; backup file and thus tangling to the wrong destinations. ;; 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) (defun org-babel-tangle-single-block (&rest args)
(let* ((spec (apply org-babel-tangle-single-block args)) (let* ((spec (apply org-babel-tangle-single-block args))
(file (nth 1 spec)) (file (nth 1 spec))
(file (if (file-equal-p file backup) org file)) (file (if (file-equal-p file backup) target file))
(file (if org-babel-tangle-use-relative-file-links (file (if org-babel-tangle-use-relative-file-links
(file-relative-name file) (file-relative-name file)
file))) file)))
@@ -42,9 +45,11 @@ byte-compiled from.")
(defun message (msg &rest args) (defun message (msg &rest args)
(when msg (when msg
(print! (info "%s") (apply #'format msg args))))) (print! (info "%s") (apply #'format msg args)))))
(print! (start "Compiling your literate config..."))
(print-group!
(unwind-protect (unwind-protect
(with-temp-file backup (with-temp-file backup
(insert-file-contents org) (insert-file-contents target)
(let ((buffer-file-name backup) (let ((buffer-file-name backup)
;; Prevent unwanted entries in recentf, or formatters, or ;; Prevent unwanted entries in recentf, or formatters, or
;; anything that could be on these hooks, really. Nothing ;; anything that could be on these hooks, really. Nothing
@@ -65,11 +70,10 @@ byte-compiled from.")
(org-babel-tangle nil dest)))) (org-babel-tangle nil dest))))
(ignore-errors (delete-file backup))) (ignore-errors (delete-file backup)))
;; Write an empty file to serve as our mtime cache ;; Write an empty file to serve as our mtime cache
(with-temp-file +literate-config-cache-file) (with-temp-file cache)
t))))) (if doom-interactive-p t
(message "Restarting..." )
;;;###autoload (throw 'exit "__NOTANGLE=1 $@"))))))
(add-hook 'org-mode-hook #'+literate-enable-recompile-h)
;;;###autoload ;;;###autoload
(defalias '+literate/reload #'doom/reload) (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 We assume any org file in `doom-private-dir' is connected to your literate
config, and should trigger a recompile if changed." config, and should trigger a recompile if changed."
(when (file-in-directory-p buffer-file-name doom-private-dir) (and (file-in-directory-p
buffer-file-name (file-name-directory +literate-config-file))
(+literate-tangle-h))) (+literate-tangle-h)))
@@ -176,6 +176,29 @@ more information on modifiers."
(balance-windows (window-parent))) (balance-windows (window-parent)))
(if file (evil-edit file))) (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 ;;;###autoload
(defun +evil--fix-dabbrev-in-minibuffer-h () (defun +evil--fix-dabbrev-in-minibuffer-h ()
"Make `try-expand-dabbrev' from `hippie-expand' work in minibuffer. See "Make `try-expand-dabbrev' from `hippie-expand' work in minibuffer. See
+19 -6
View File
@@ -155,6 +155,17 @@ directives. By default, this only recognizes C directives.")
(run-at-time 0.1 nil #'helpful-key key-sequence) (run-at-time 0.1 nil #'helpful-key key-sequence)
(abort-recursive-edit))) (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'. ;; Make ESC (from normal mode) the universal escaper. See `doom-escape-hook'.
(advice-add #'evil-force-normal-state :after #'+evil-escape-a) (advice-add #'evil-force-normal-state :after #'+evil-escape-a)
@@ -373,16 +384,18 @@ directives. By default, this only recognizes C directives.")
;;; Keybinds ;;; Keybinds
;; Keybinds that have no Emacs+evil analogues (i.e. don't exist): ;; 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 ;; 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 (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 ;; ported from vim-unimpaired
:n "] SPC" #'+evil/insert-newline-below :n "] SPC" #'+evil/insert-newline-below
:n "[ SPC" #'+evil/insert-newline-above :n "[ SPC" #'+evil/insert-newline-above
+2 -2
View File
@@ -1,7 +1,7 @@
;; -*- no-byte-compile: t; -*- ;; -*- no-byte-compile: t; -*-
;;; editor/evil/packages.el ;;; editor/evil/packages.el
(package! evil :pin "2bc6ca3587502fde67b93e411e329fc8224c916a") (package! evil :pin "1e7aa5bfbd86feff0ed5982e487070352d326b90")
(package! evil-args :pin "758ad5ae54ad34202064fec192c88151c08cb387") (package! evil-args :pin "758ad5ae54ad34202064fec192c88151c08cb387")
(package! evil-easymotion :pin "f96c2ed38ddc07908db7c3c11bcd6285a3e8c2e9") (package! evil-easymotion :pin "f96c2ed38ddc07908db7c3c11bcd6285a3e8c2e9")
(package! evil-embrace :pin "4379adea032b25e359d01a36301b4a5afdd0d1b7") (package! evil-embrace :pin "4379adea032b25e359d01a36301b4a5afdd0d1b7")
@@ -33,4 +33,4 @@
(package! neotree) (package! neotree)
(autoload 'neotree-make-executor "neotree" nil nil 'macro)) (autoload 'neotree-make-executor "neotree" nil nil 'macro))
(package! evil-collection :pin "3e62b6b1312f7907081be41a032aaacffa732fef")) (package! evil-collection :pin "c136589d9584e5d01a4b3f2e4cf8ac5f5a23be63"))
@@ -1,4 +1,4 @@
;; -*- no-byte-compile: t; -*- ;; -*- no-byte-compile: t; -*-
;;; editor/file-templates/packages.el ;;; editor/file-templates/packages.el
(package! yasnippet :pin "5b1217ab085fab4abeb1118dccb260691b446703") (package! yasnippet :pin "5cbdbf0d2015540c59ed8ee0fcf4788effdf75b6")
+1 -1
View File
@@ -3,6 +3,6 @@
(package! hideshow :built-in t) (package! hideshow :built-in t)
(package! vimish-fold :pin "63685239655a151181b9152e45478dad587f86f2") (package! vimish-fold :pin "9d12e39f01da517565666e09a2e32e01aed24a90")
(when (featurep! :editor evil) (when (featurep! :editor evil)
(package! evil-vimish-fold :pin "b6e0e6b91b8cd047e80debef1a536d9d49eef31a")) (package! evil-vimish-fold :pin "b6e0e6b91b8cd047e80debef1a536d9d49eef31a"))
+1 -1
View File
@@ -1,4 +1,4 @@
;; -*- no-byte-compile: t; -*- ;; -*- no-byte-compile: t; -*-
;;; editor/god/packages.el ;;; editor/god/packages.el
(package! god-mode :pin "1eb6ef3a4f67a805c5d6deb1e3895b6c853707d7") (package! god-mode :pin "ad2e6745294843462f78768b5a1cd3b0d3563951")
+1 -1
View File
@@ -22,7 +22,7 @@
'((operators normal) '((operators normal)
c-w c-w
(prettify insert) (prettify insert)
(atom-movement normal visual) (atom-movement t)
slurp/barf-lispy slurp/barf-lispy
additional additional
additional-insert)) additional-insert))
+2 -2
View File
@@ -1,6 +1,6 @@
;; -*- no-byte-compile: t; -*- ;; -*- no-byte-compile: t; -*-
;;; editor/lispyville/packages.el ;;; editor/lispyville/packages.el
(package! lispy :pin "cdaa9c70ca39a880163cbbce924bb46cc56b9fa4") (package! lispy :pin "0a9dcfdfbc20cadbb9cb29b224dc64b8efdd7b70")
(when (featurep! :editor evil) (when (featurep! :editor evil)
(package! lispyville :pin "25a70126ea807653e0a8c512d4128c90ed673d7a")) (package! lispyville :pin "0f13f26cd6aa71f9fd852186ad4a00c4294661cd"))
+1 -1
View File
@@ -1,4 +1,4 @@
;; -*- no-byte-compile: t; -*- ;; -*- no-byte-compile: t; -*-
;;; editor/objed/packages.el ;;; editor/objed/packages.el
(package! objed :pin "e89d8dae3b2d4331a4455d2a7b203500537d184d") (package! objed :pin "dea5a64a4da32e8947fe5b45de569e293aaa8a96")
@@ -33,6 +33,8 @@
#'yas-minor-mode-on) #'yas-minor-mode-on)
:config :config
(add-to-list 'doom-debug-variables '(yas-verbosity . 3))
;; Allow private snippets in DOOMDIR/snippets ;; Allow private snippets in DOOMDIR/snippets
(add-to-list 'yas-snippet-dirs '+snippets-dir) (add-to-list 'yas-snippet-dirs '+snippets-dir)
+1 -1
View File
@@ -7,4 +7,4 @@
:recipe (:host github :recipe (:host github
:repo "hlissner/doom-snippets" :repo "hlissner/doom-snippets"
:files ("*.el" "*")) :files ("*.el" "*"))
:pin "21b7c8d37224768091a34a6c3ede68d52d03fb18") :pin "60c57d66d2afd1798bff5023a54ab155f311746a")
@@ -1,4 +1,4 @@
;; -*- no-byte-compile: t; -*- ;; -*- no-byte-compile: t; -*-
;;; editor/word-wrap/packages.el ;;; editor/word-wrap/packages.el
(package! adaptive-wrap :pin "1810c0ee8d827dd502ddeaae5bd759d4811fcbce") (package! adaptive-wrap :pin "319db649fb083db3ad07b4c71ee6c9429497043b")
+7
View File
@@ -168,11 +168,18 @@ we have to clean it up ourselves."
(global-set-key [remap find-dired] #'fd-dired) (global-set-key [remap find-dired] #'fd-dired)
(set-popup-rule! "^\\*F\\(?:d\\|ind\\)\\*$" :ignore t)) (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 ;;;###package dired-git-info
(map! :after dired (map! :after dired
:map (dired-mode-map ranger-mode-map) :map (dired-mode-map ranger-mode-map)
:ng ")" #'dired-git-info-mode) :ng ")" #'dired-git-info-mode)
(setq dgi-commit-message-format "%h %cs %s"
dgi-auto-hide-details-p nil)
(after! wdired (after! wdired
;; Temporarily disable `dired-git-info-mode' when entering wdired, due to ;; Temporarily disable `dired-git-info-mode' when entering wdired, due to
;; reported incompatibilities. ;; reported incompatibilities.
+2 -2
View File
@@ -1,12 +1,12 @@
;; -*- no-byte-compile: t; -*- ;; -*- no-byte-compile: t; -*-
;;; emacs/dired/packages.el ;;; emacs/dired/packages.el
(package! diredfl :pin "83567d00affce66a4e501563eddd0bd436ac48d0") (package! diredfl :pin "cd052dfef602fe79d8dfbcf9f06e6da74412218b")
(package! dired-git-info :pin "b47f2b0c3a6cb9b7a62a4ee2605a492e512d40a9") (package! dired-git-info :pin "b47f2b0c3a6cb9b7a62a4ee2605a492e512d40a9")
(package! diff-hl :pin "2281a89a3ddc6616073da6f190dda08d23b18ba6") (package! diff-hl :pin "2281a89a3ddc6616073da6f190dda08d23b18ba6")
(package! dired-rsync :pin "bfd5c155be1cb6b71c83e5f41116c81b6532b6d5") (package! dired-rsync :pin "bfd5c155be1cb6b71c83e5f41116c81b6532b6d5")
(when (featurep! +ranger) (when (featurep! +ranger)
(package! ranger :pin "d7c18370981c9e585bc0fb78f7e55033457ca643")) (package! ranger :pin "caf75f0060e503af078c7e5bb50d9aaa508e6f3e"))
(when (featurep! +icons) (when (featurep! +icons)
(package! all-the-icons-dired :pin "fc2dfa1e9eb8bf1c402a675e7089638d702a27a5")) (package! all-the-icons-dired :pin "fc2dfa1e9eb8bf1c402a675e7089638d702a27a5"))
(package! fd-dired :pin "5622041068d5fa2f299dbc8aa91fece0ba260086") (package! fd-dired :pin "5622041068d5fa2f299dbc8aa91fece0ba260086")
+2 -2
View File
@@ -1,5 +1,5 @@
;; -*- no-byte-compile: t; -*- ;; -*- no-byte-compile: t; -*-
;;; emacs/ibuffer/packages.el ;;; emacs/ibuffer/packages.el
(package! ibuffer-projectile :pin "504b0edaa0d937ce60ccc8fdf09f2dae0a90fbaf") (package! ibuffer-projectile :pin "ecbe482804a217b1471593f6c7a8b3d64f3cdc47")
(package! ibuffer-vc :pin "1249c1e30cf11badfe032ac3b1058f24ba510ace") (package! ibuffer-vc :pin "5fa6aea09bc67f71ea743302d609f459967b1e81")
+2 -2
View File
@@ -6,7 +6,7 @@
(package! smerge-mode :built-in t) (package! smerge-mode :built-in t)
(package! browse-at-remote :pin "6aecae4b5d202e582425fc8aa2c9c2b6a4779f25") (package! browse-at-remote :pin "6aecae4b5d202e582425fc8aa2c9c2b6a4779f25")
(package! git-commit :pin "d459e528f46423f1976e5fa415e64f8f7162b473") (package! git-commit :pin "321214c3a2dd10fdf672ba96bd00703a51094bbe")
(package! git-timemachine :pin "391eb61050de321101e631fcf373fc70ec6e7700") (package! git-timemachine :pin "8d675750e921a047707fcdc36d84f8439b19a907")
(package! gitconfig-mode :pin "55468314a5f6b77d2c96be62c7005ac94545e217") (package! gitconfig-mode :pin "55468314a5f6b77d2c96be62c7005ac94545e217")
(package! gitignore-mode :pin "55468314a5f6b77d2c96be62c7005ac94545e217") (package! gitignore-mode :pin "55468314a5f6b77d2c96be62c7005ac94545e217")
+21 -1
View File
@@ -100,7 +100,7 @@ sudo apt-get install isync # mbsync
# or # or
sudo apt-get install offlineimap sudo apt-get install offlineimap
# then # then
sudo apt-get install maildir-utils # mu sudo apt-get install maildir-utils mu4e # mu and mu4e respectivly
#+END_SRC #+END_SRC
* TODO Features * TODO Features
@@ -173,6 +173,26 @@ Then configure Emacs to use your email address:
** =No such file or directory, mu4e= ** =No such file or directory, mu4e=
You will get =No such file or directory, mu4e= errors if you don't run ~doom You will get =No such file or directory, mu4e= errors if you don't run ~doom
sync~ after installing =mu= through your package manager. 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 ** ~(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 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=. =mu4e= (which pulls in =org=) much too early]]; before Emacs reads =~/.emacs.d=.
+2 -2
View File
@@ -1,8 +1,8 @@
;; -*- no-byte-compile: t; -*- ;; -*- no-byte-compile: t; -*-
;;; email/notmuch/packages.el ;;; email/notmuch/packages.el
(package! notmuch :pin "ad9c2e91a012920bebfe70bc472d44678abc3259") (package! notmuch :pin "8776faf6d5118e8152ecfacf94accf35ccebf1d2")
(package! org-mime :pin "9f8444603806e6baa94b2b67a23aab0ea52fef97") (package! org-mime :pin "9bb6351b25c62835c7881fc64096028eb8ef83ef")
(when (featurep! :completion ivy) (when (featurep! :completion ivy)
(package! counsel-notmuch :pin "a4a1562935e4180c42524c51609d1283e9be0688")) (package! counsel-notmuch :pin "a4a1562935e4180c42524c51609d1283e9be0688"))
(when (featurep! :completion helm) (when (featurep! :completion helm)
@@ -6,6 +6,6 @@
;; branches which straight cannot detect without our help. ;; branches which straight cannot detect without our help.
(package! apel :recipe (:branch "apel-wl") :pin "d146ddbf8818e81d3577d5eee7825d377bec0c73") (package! apel :recipe (:branch "apel-wl") :pin "d146ddbf8818e81d3577d5eee7825d377bec0c73")
(package! flim :recipe (:branch "flim-1_14-wl") :pin "f303f2f6c124bc8635add96d3326a2209749437b") (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") (package! wanderlust :pin "7af0d582cd48a37469e0606ea35887740d78c8b5")
+1 -1
View File
@@ -3,5 +3,5 @@
(package! migemo :pin "f42832c8ac462ecbec9a16eb781194f876fba64a") (package! migemo :pin "f42832c8ac462ecbec9a16eb781194f876fba64a")
(package! avy-migemo :pin "922a6dd82c0bfa316b0fbb56a9d4dd4ffa5707e7") (package! avy-migemo :pin "922a6dd82c0bfa316b0fbb56a9d4dd4ffa5707e7")
(package! ddskk :pin "fe7f82ba568dc653431bf824a764993aa86a7aa3") (package! ddskk :pin "275a831be77573470309a78967734d2b6d10f218")
(package! pangu-spacing :pin "f92898949ba3bf991fd229416f3bbb54e9c6c223") (package! pangu-spacing :pin "f92898949ba3bf991fd229416f3bbb54e9c6c223")
+2 -2
View File
@@ -6,11 +6,11 @@
:recipe (:host github :repo "agda/agda" :recipe (:host github :repo "agda/agda"
:files ("src/data/emacs-mode/agda-input.el") :files ("src/data/emacs-mode/agda-input.el")
:nonrecursive t) :nonrecursive t)
:pin "8eb0d01811a663cf2b27b482b3b18690adfa094b") :pin "36738c13e2e85f1029083e974cdcff6927d48980")
(package! agda2-mode (package! agda2-mode
:recipe (:host github :repo "agda/agda" :recipe (:host github :repo "agda/agda"
:files ("src/data/emacs-mode/*.el" :files ("src/data/emacs-mode/*.el"
(:exclude "agda-input.el")) (:exclude "agda-input.el"))
:nonrecursive t) :nonrecursive t)
:pin "8eb0d01811a663cf2b27b482b3b18690adfa094b")) :pin "36738c13e2e85f1029083e974cdcff6927d48980"))
+29 -11
View File
@@ -8,8 +8,9 @@
- [[#module-flags][Module Flags]] - [[#module-flags][Module Flags]]
- [[#plugins][Plugins]] - [[#plugins][Plugins]]
- [[#prerequisites][Prerequisites]] - [[#prerequisites][Prerequisites]]
- [[#lsp-servers][LSP servers]]
- [[#irony-server][irony-server]] - [[#irony-server][irony-server]]
- [[#macos][MacOS]] - [[#macos][macOS]]
- [[#arch-linux][Arch Linux]] - [[#arch-linux][Arch Linux]]
- [[#opensuse][openSUSE]] - [[#opensuse][openSUSE]]
- [[#rtags][rtags]] - [[#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]] + [[https://github.com/Andersbakken/rtags][helm-rtags]]
* Prerequisites * Prerequisites
This module requires This module's requirements change depending on how you use it.
+ irony-server + If =+lsp= is enabled, you need one of *clangd v9+* or *ccls*.
+ rtags + 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-server
Irony powers the code completion, eldoc and syntax checking systems. Irony powers the code completion, eldoc and syntax checking systems.
After installing its dependencies, run ~M-x irony-install-server~ in Emacs. After installing its dependencies, run ~M-x irony-install-server~ in Emacs.
*** MacOS *** macOS
Due to linking issues, MacOS users must compile irony-server manually: Due to linking issues, macOS users must compile irony-server manually:
#+BEGIN_SRC sh #+BEGIN_SRC sh
brew install cmake brew install cmake
@@ -118,12 +137,11 @@ rc -J $PROJECT_ROOT # loads PROJECT_ROOT's compile_commands.json
** Project compile settings ** Project compile settings
By default, a set of default compile settings are defined in By default, a set of default compile settings are defined in
~+cc-default-compiler-options~ for C, C++ and Objective C. Irony, rtags and ~+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 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]] present (i.e. a ~compile_commands.json~ file). [[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]]:
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]]:
#+BEGIN_SRC sh #+BEGIN_SRC sh
# For CMake projects # For CMake projects
+6 -1
View File
@@ -108,7 +108,12 @@ simpler."
(rtags-call-rc :silent t "-J" (or (doom-project-root) default-directory)))) (rtags-call-rc :silent t "-J" (or (doom-project-root) default-directory))))
;; then irony ;; then irony
(when (and (featurep 'irony) irony-mode) (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 ;;;###autoload
(defun +cc/imenu () (defun +cc/imenu ()
+6 -6
View File
@@ -51,7 +51,7 @@ This is ignored by ccls.")
(set-rotate-patterns! 'c++-mode (set-rotate-patterns! 'c++-mode
:symbols '(("public" "protected" "private") :symbols '(("public" "protected" "private")
("class" "struct"))) ("class" "struct")))
(set-pretty-symbols! '(c-mode c++-mode) (set-ligatures! '(c-mode c++-mode)
;; Functional ;; Functional
;; :def "void " ;; :def "void "
;; Types ;; 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" `((:ccls . ((:clang . ,(list :extraArgs ["-isystem/Library/Developer/CommandLineTools/usr/include/c++/v1"
"-isystem/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include" "-isystem/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include"
"-isystem/usr/local/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 (use-package! ccls
:when (and (featurep! +lsp) (not (featurep! :tools lsp +eglot))) :when (featurep! +lsp)
:after lsp :unless (featurep! :tools lsp +eglot)
:after lsp-mode
:init :init
(after! projectile (after! projectile
(add-to-list 'projectile-globally-ignored-directories ".ccls-cache") (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" `(:clang ,(list :extraArgs ["-isystem/Library/Developer/CommandLineTools/usr/include/c++/v1"
"-isystem/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include" "-isystem/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include"
"-isystem/usr/local/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")))))))
+4 -4
View File
@@ -3,7 +3,7 @@
(package! cmake-mode (package! cmake-mode
:recipe (:host github :repo "emacsmirror/cmake-mode" :files (:defaults "*")) :recipe (:host github :repo "emacsmirror/cmake-mode" :files (:defaults "*"))
:pin "bfe85bc009c4778b44e246d5c27d0f888f0bfc0c") :pin "e58c41145a879f0314b2821eada7fd0dc898b6b6")
(package! cuda-mode :pin "9ae9eacfdba3559b5456342d0d03296290df8ff5") (package! cuda-mode :pin "9ae9eacfdba3559b5456342d0d03296290df8ff5")
(package! demangle-mode :pin "697c1dbde93f164eac7ea0dc530d7e8b799272d6") (package! demangle-mode :pin "697c1dbde93f164eac7ea0dc530d7e8b799272d6")
(package! disaster :pin "10a785facc60d89d78e0d5177985ab1af1741bb4") (package! disaster :pin "10a785facc60d89d78e0d5177985ab1af1741bb4")
@@ -19,15 +19,15 @@
(if (featurep! +lsp) (if (featurep! +lsp)
(unless (featurep! :tools lsp +eglot) (unless (featurep! :tools lsp +eglot)
;; ccls package is necessary only for lsp-mode. ;; ccls package is necessary only for lsp-mode.
(package! ccls :pin "b8e2f4d9b5bed5b5e8b387ac8e43eff723120b80")) (package! ccls :pin "675a5704c14a27931e835a431beea3631d92e8e6"))
(when (package! irony :pin "5f75fc0c9274f4622470e2324e2f4457087aa643") (when (package! irony :pin "1e1aabaa686a08767ab33e5cd43ce8f0ebf8d020")
(package! irony-eldoc :pin "73e79a89fad982a2ba072f2fcc1b4e41f0aa2978") (package! irony-eldoc :pin "73e79a89fad982a2ba072f2fcc1b4e41f0aa2978")
(when (featurep! :checkers syntax) (when (featurep! :checkers syntax)
(package! flycheck-irony :pin "42dbecd4a865cabeb301193bb4d660e26ae3befe")) (package! flycheck-irony :pin "42dbecd4a865cabeb301193bb4d660e26ae3befe"))
(when (featurep! :completion company) (when (featurep! :completion company)
(package! company-irony :pin "b44711dfce445610c1ffaec4951c6ff3882b216a") (package! company-irony :pin "b44711dfce445610c1ffaec4951c6ff3882b216a")
(package! company-irony-c-headers :pin "72c386aeb079fb261d9ec02e39211272f76bbd97"))) (package! company-irony-c-headers :pin "72c386aeb079fb261d9ec02e39211272f76bbd97")))
(when (package! rtags :pin "080cb0e6b025b5d3d40fe9f7aecc791c0ea53f36") (when (package! rtags :pin "b57b36039f6411f23009c4ec0315ca5a7adb6824")
(when (featurep! :completion ivy) (when (featurep! :completion ivy)
(package! ivy-rtags)) (package! ivy-rtags))
(when (featurep! :completion helm) (when (featurep! :completion helm)
+2 -2
View File
@@ -1,8 +1,8 @@
;; -*- no-byte-compile: t; -*- ;; -*- no-byte-compile: t; -*-
;;; lang/clojure/packages.el ;;; lang/clojure/packages.el
(package! clojure-mode :pin "da9f1ec717dac1194404b4a4562dba6bd9a4ee3a") (package! clojure-mode :pin "84ed16c5ddb6561620886485e20669d0c81f88a1")
(package! cider :pin "9e117c2ff34b7a63eee87c8bfa93a800bb94add5") (package! cider :pin "a89b694cc3cec0294d84bf9dbe1163ad2373e8db")
(package! clj-refactor :pin "97095682580bbc5bfebcbc5349f03f5bd7121c96") (package! clj-refactor :pin "97095682580bbc5bfebcbc5349f03f5bd7121c96")
(when (featurep! :checkers syntax) (when (featurep! :checkers syntax)
@@ -1,6 +1,6 @@
;; -*- no-byte-compile: t; -*- ;; -*- no-byte-compile: t; -*-
;;; lang/common-lisp/packages.el ;;; lang/common-lisp/packages.el
(package! sly :pin "becf7b72ec6ef1a8165ec796425e143282838a66") (when (package! sly :pin "34239bc5954ef41a4db49144925290dc794a6c4d")
(package! sly-macrostep :pin "5113e4e926cd752b1d0bcc1508b3ebad5def5fad") (package! sly-macrostep :pin "5113e4e926cd752b1d0bcc1508b3ebad5def5fad")
(package! sly-repl-ansi-color :pin "b9cd52d1cf927bf7e08582d46ab0bcf1d4fb5048") (package! sly-repl-ansi-color :pin "b9cd52d1cf927bf7e08582d46ab0bcf1d4fb5048"))
+2 -2
View File
@@ -1,5 +1,5 @@
;; -*- no-byte-compile: t; -*- ;; -*- no-byte-compile: t; -*-
;;; lang/coq/packages.el ;;; lang/coq/packages.el
(package! proof-general :pin "0f0bb2c00fb7b20fd187cb92d4d2c3f84c4c5987") (package! proof-general :pin "03e427a8f19485e12b2f95387ed3e0bff7cc944c")
(package! company-coq :pin "7ec80586fa23e2d8caa3f26ad223c803df8abb0f") (package! company-coq :pin "b096cb528de1e0bb31cc1059d0bd698b98a6cc6a")
+1 -1
View File
@@ -14,7 +14,7 @@
;; a subset of them (defined below). ;; a subset of them (defined below).
(provide 'smartparens-elixir) (provide 'smartparens-elixir)
:config :config
(set-pretty-symbols! 'elixir-mode (set-ligatures! 'elixir-mode
;; Functional ;; Functional
:def "def" :def "def"
:lambda "fn" :lambda "fn"
+1 -1
View File
@@ -2,7 +2,7 @@
;;; lang/elixir/packages.el ;;; lang/elixir/packages.el
;; +elixir.el ;; +elixir.el
(package! elixir-mode :pin "02a3922711b7dc6a25895df6d2bf00360fda45cc") (package! elixir-mode :pin "01b332495d3f44addeb236428041c4ffa0c2ca3b")
(package! alchemist :pin "6f99367511ae209f8fe2c990779764bbb4ccb6ed") (package! alchemist :pin "6f99367511ae209f8fe2c990779764bbb4ccb6ed")
(when (featurep! :checkers syntax) (when (featurep! :checkers syntax)
(package! flycheck-credo :pin "e88f11ead53805c361ec7706e44c3dfee1daa19f")) (package! flycheck-credo :pin "e88f11ead53805c361ec7706e44c3dfee1daa19f"))
+1 -1
View File
@@ -6,7 +6,7 @@
(set-company-backend! 'elm-mode 'company-elm)) (set-company-backend! 'elm-mode 'company-elm))
(set-repl-handler! 'elm-mode #'run-elm-interactive) (set-repl-handler! 'elm-mode #'run-elm-interactive)
(set-pretty-symbols! 'elm-mode (set-ligatures! 'elm-mode
:null "null" :null "null"
:true "true" :false "false" :true "true" :false "false"
:int "Int" :str "String" :int "Int" :str "String"
+2 -2
View File
@@ -1,6 +1,6 @@
;; -*- no-byte-compile: t; -*- ;; -*- no-byte-compile: t; -*-
;;; lang/elm/packages.el ;;; lang/elm/packages.el
(package! elm-mode :pin "7782be0814") (package! elm-mode :pin "363da4b47c9de1ff091a8caf95fccc34188d59a3")
(when (featurep! :checkers syntax) (when (featurep! :checkers syntax)
(package! flycheck-elm :pin "1b60050efd")) (package! flycheck-elm :pin "1b60050efd4729bfba548f3e5adbcb58436667cb"))
+1 -1
View File
@@ -33,7 +33,7 @@ employed so that flycheck still does *some* helpful linting.")
:definition #'+emacs-lisp-lookup-definition :definition #'+emacs-lisp-lookup-definition
:documentation #'+emacs-lisp-lookup-documentation) :documentation #'+emacs-lisp-lookup-documentation)
(set-docsets! '(emacs-lisp-mode lisp-interaction-mode) "Emacs Lisp") (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 (set-rotate-patterns! 'emacs-lisp-mode
:symbols '(("t" "nil") :symbols '(("t" "nil")
("let" "let*") ("let" "let*")
+2 -2
View File
@@ -10,9 +10,9 @@
(package! macrostep :pin "424e3734a1ee526a1bd7b5c3cd1d3ef19d184267") (package! macrostep :pin "424e3734a1ee526a1bd7b5c3cd1d3ef19d184267")
(package! overseer :pin "02d49f582e80e36b4334c9187801c5ecfb027789") (package! overseer :pin "02d49f582e80e36b4334c9187801c5ecfb027789")
(package! elisp-def :pin "da1f76391ac0d277e3c5758203e0150f6bae0beb") (package! elisp-def :pin "da1f76391ac0d277e3c5758203e0150f6bae0beb")
(package! elisp-demos :pin "4cd55a30d5dbd8d36a0e6f87261c4fef17fc6db0") (package! elisp-demos :pin "8c9748134f7c017ae1536dbd0b76434afb52e64d")
(when (featurep! :checkers syntax) (when (featurep! :checkers syntax)
(package! flycheck-cask :pin "3457ae553c4feaf8168008f063d78fdde8fb5f94")) (package! flycheck-cask :pin "3457ae553c4feaf8168008f063d78fdde8fb5f94"))
;; Libraries ;; Libraries
(package! buttercup :pin "e71a40f1ffef4847df28c9d4ad7edc1e360ee52a") (package! buttercup :pin "0e5eae0766a33b5c8997e1477e3914d5c8ba3d29")
+4 -4
View File
@@ -1,9 +1,9 @@
;; -*- no-byte-compile: t; -*- ;; -*- no-byte-compile: t; -*-
;;; private/erlang/packages.el ;;; lang/erlang/packages.el
(package! erlang :pin "3065fbf434") (package! erlang :pin "d9bc7858e985143a433953ba286422511b466a0c")
(when (featurep! :checkers syntax) (when (featurep! :checkers syntax)
(package! flycheck-rebar3 :pin "3cca1268c5")) (package! flycheck-rebar3 :pin "3cca1268c54643204b5bae52e3f0bf5bc921018c"))
(unless (featurep! +lsp) (unless (featurep! +lsp)
(when (featurep! :completion company) (when (featurep! :completion company)
(package! company-erlang :pin "bc0524a16f"))) (package! company-erlang :pin "bc0524a16f17b66c7397690e4ca0e004f09ea6c5")))
+3
View File
@@ -32,6 +32,9 @@
(set-eval-handler! 'ess-help-mode #'ess-eval-region-and-go) (set-eval-handler! 'ess-help-mode #'ess-eval-region-and-go)
(set-eval-handler! 'ess-r-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 (setq-hook! 'ess-r-mode-hook
;; HACK Fix #2233: Doom continues comments on RET, but ess-r-mode doesn't ;; HACK Fix #2233: Doom continues comments on RET, but ess-r-mode doesn't
;; have a sane `comment-line-break-function', so... ;; have a sane `comment-line-break-function', so...
+1 -1
View File
@@ -1,7 +1,7 @@
;; -*- no-byte-compile: t; -*- ;; -*- no-byte-compile: t; -*-
;;; lang/ess/packages.el ;;; lang/ess/packages.el
(package! ess :pin "964bf64d8bb3c6dd710cd8f2259921099a50456a") (package! ess :pin "1baf8bf1403fe5956a25475b03be0d8f02b3f3ca")
(package! ess-R-data-view :pin "d6e98d3ae1e2a2ea39a56eebcdb73e99d29562e9") (package! ess-R-data-view :pin "d6e98d3ae1e2a2ea39a56eebcdb73e99d29562e9")
(package! polymode :pin "3284ff10017d280ba82f27dc20fe5223b0df709c") (package! polymode :pin "3284ff10017d280ba82f27dc20fe5223b0df709c")
(package! poly-R :pin "51ffeb6ec45dd44eafa4d22ad2d6150cc4b248fc") (package! poly-R :pin "51ffeb6ec45dd44eafa4d22ad2d6150cc4b248fc")
+1 -1
View File
@@ -1,4 +1,4 @@
;; -*- no-byte-compile: t; -*- ;; -*- no-byte-compile: t; -*-
;;; lang/factor/packages.el ;;; lang/factor/packages.el
(package! fuel :pin "497d6491e6") (package! fuel :pin "3fdb0325ca2a6d80e4111af43b1b166808022020")
+1 -1
View File
@@ -1,4 +1,4 @@
;; -*- no-byte-compile: t; -*- ;; -*- no-byte-compile: t; -*-
;;; lang/faust/packages.el ;;; lang/faust/packages.el
(package! faustine :pin "07a3896311") (package! faustine :pin "07a38963111518f86123802f9d477be0d4689a3f")
+1 -1
View File
@@ -1,4 +1,4 @@
;; -*- no-byte-compile: t; -*- ;; -*- no-byte-compile: t; -*-
;;; lang/fsharp/packages.el ;;; lang/fsharp/packages.el
(package! fsharp-mode :pin "8c86e38b93") (package! fsharp-mode :pin "3e41fe1391b64eefa66a8a02fce27a12a04e1e01")
+1 -1
View File
@@ -1,7 +1,7 @@
;;; lang/haskell/+lsp.el -*- lexical-binding: t; -*- ;;; lang/haskell/+lsp.el -*- lexical-binding: t; -*-
(use-package! lsp-haskell (use-package! lsp-haskell
:after lsp-clients :after lsp-mode
:preface (add-hook 'haskell-mode-local-vars-hook #'lsp!) :preface (add-hook 'haskell-mode-local-vars-hook #'lsp!)
:config :config
(when IS-MAC (when IS-MAC
+1 -1
View File
@@ -4,7 +4,7 @@
(package! haskell-mode :pin "41683c0e634bb3f54eac8747919a82132e1714fe") (package! haskell-mode :pin "41683c0e634bb3f54eac8747919a82132e1714fe")
(when (featurep! +dante) (when (featurep! +dante)
(package! dante :pin "7411904bfbde25cdb986e001ec682593dcb7c5e3") (package! dante :pin "c516bc9e8f09e0f928de9a93e82acfb382636f5c")
(package! attrap :pin "4cf3e4a16255997e7c3c39682a72866a0a37dd4b")) (package! attrap :pin "4cf3e4a16255997e7c3c39682a72866a0a37dd4b"))
(when (or (and (featurep! +lsp) (when (or (and (featurep! +lsp)
(not (featurep! :tools lsp +eglot))) (not (featurep! :tools lsp +eglot)))
+1 -1
View File
@@ -1,4 +1,4 @@
;; -*- no-byte-compile: t; -*- ;; -*- no-byte-compile: t; -*-
;;; lang/hy/packages.el ;;; lang/hy/packages.el
(package! hy-mode :pin "e2d5fecdae") (package! hy-mode :pin "55e84cadbdb63427a8d531992df3990414a26688")
+1 -1
View File
@@ -1,4 +1,4 @@
;; -*- no-byte-compile: t; -*- ;; -*- no-byte-compile: t; -*-
;;; lang/idris/packages.el ;;; lang/idris/packages.el
(package! idris-mode :pin "acc8835449") (package! idris-mode :pin "b77eadd8ac2048d5c882b4464bd9673e45dd6a59")
+13 -8
View File
@@ -2,20 +2,25 @@
;;;###if (featurep! +lsp) ;;;###if (featurep! +lsp)
(use-package! lsp-java (use-package! lsp-java
:after lsp-clients :after lsp-mode
:preface :preface
(setq lsp-java-workspace-dir (concat doom-etc-dir "java-workspace")) (setq lsp-java-workspace-dir (concat doom-etc-dir "java-workspace"))
(add-hook 'java-mode-local-vars-hook #'lsp!) (add-hook 'java-mode-local-vars-hook #'lsp!)
(map! :when (featurep! :tools debugger +lsp) :config
:after cc-mode ; where `java-mode' is defined (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 :map java-mode-map
:localleader :localleader
(:prefix ("t" . "Test") (:prefix ("t" . "Test")
:desc "Run test class or method" "t" #'+java/run-test :desc "Run test class or method" "t" #'+java/run-test
:desc "Run all tests in class" "a" #'dap-java-run-test-class :desc "Run all tests in class" "a" #'dap-java-run-test-class
:desc "Debug test class or method" "d" #'+java/debug-test :desc "Debug test class or method" "d" #'+java/debug-test
:desc "Debug all tests in class" "D" #'dap-java-debug-test-class)) :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"))))
+3 -3
View File
@@ -2,10 +2,10 @@
;;; lang/java/packages.el ;;; lang/java/packages.el
(package! android-mode :pin "d5332e339a1f5e30559a53feffb8442ca79265d6") (package! android-mode :pin "d5332e339a1f5e30559a53feffb8442ca79265d6")
(package! groovy-mode :pin "cafdd98e06a3bbff213f3ccb163de2c42d412b66") (package! groovy-mode :pin "26da902d1158c0312628d57578109be54eca2415")
(when (featurep! +meghanada) (when (featurep! +meghanada)
(package! meghanada :pin "e119c7b3271281d60892b80a0cc6488503baf38f")) (package! meghanada :pin "1e41f7f2c7a172e9699f3557c97c3f39a149bfc2"))
(when (featurep! +eclim) (when (featurep! +eclim)
(package! eclim :pin "222ddd48fcf0ee01592dec77c58e0cf3f2ea1100") (package! eclim :pin "222ddd48fcf0ee01592dec77c58e0cf3f2ea1100")
@@ -13,4 +13,4 @@
(package! company-emacs-eclim :pin "222ddd48fcf0ee01592dec77c58e0cf3f2ea1100"))) (package! company-emacs-eclim :pin "222ddd48fcf0ee01592dec77c58e0cf3f2ea1100")))
(when (featurep! +lsp) (when (featurep! +lsp)
(package! lsp-java :pin "811760ad89a29939c28f47d0925f58d9eeea9fa3")) (package! lsp-java :pin "260016236fa0520b5b6ec7f51ca2086288524cba"))
+3 -4
View File
@@ -7,7 +7,7 @@
"MarionetteJS" "MomentJS" "NodeJS" "PrototypeJS" "React" "RequireJS" "MarionetteJS" "MomentJS" "NodeJS" "PrototypeJS" "React" "RequireJS"
"SailsJS" "UnderscoreJS" "VueJS" "ZeptoJS") "SailsJS" "UnderscoreJS" "VueJS" "ZeptoJS")
(set-pretty-symbols! '(js2-mode rjsx-mode web-mode) (set-ligatures! '(js2-mode rjsx-mode web-mode)
;; Functional ;; Functional
:def "function" :def "function"
:lambda "() =>" :lambda "() =>"
@@ -95,7 +95,7 @@
:config :config
(set-electric! 'typescript-mode (set-electric! 'typescript-mode
:chars '(?\} ?\)) :words '("||" "&&")) :chars '(?\} ?\)) :words '("||" "&&"))
(set-pretty-symbols! 'typescript-mode (set-ligatures! 'typescript-mode
;; Functional ;; Functional
:def "function" :def "function"
:lambda "() =>" :lambda "() =>"
@@ -190,8 +190,7 @@ to tide."
(set-company-backend! 'tide-mode 'company-tide) (set-company-backend! 'tide-mode 'company-tide)
;; navigation ;; navigation
(set-lookup-handlers! 'tide-mode :async t (set-lookup-handlers! 'tide-mode :async t
:definition #'tide-jump-to-definition :xref-backend #'xref-tide-xref-backend
:references #'tide-references
:documentation #'tide-documentation-at-point) :documentation #'tide-documentation-at-point)
(set-popup-rule! "^\\*tide-documentation" :quit t) (set-popup-rule! "^\\*tide-documentation" :quit t)
;; resolve to `doom-project-root' if `tide-project-root' fails ;; 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