mirror of
http://github.com/JaeUs3792/dotfiles
synced 2025-12-14 08:01:35 +09:00
remove backup file
This commit is contained in:
@ -2,9 +2,13 @@
|
|||||||
(require 'crafted-updates) ; Tools to upgrade Crafted Emacs
|
(require 'crafted-updates) ; Tools to upgrade Crafted Emacs
|
||||||
(require 'crafted-completion) ; selection framework based on 'vertico'
|
(require 'crafted-completion) ; selection framework based on 'vertico'
|
||||||
(require 'crafted-ui) ; Better UI experience (modeline etc..)
|
(require 'crafted-ui) ; Better UI experience (modeline etc..)
|
||||||
;;(require 'crafted-windows) ; Window management configuration
|
|
||||||
(require 'crafted-evil) ; An 'evil-mode' configuration
|
(require 'crafted-evil) ; An 'evil-mode' configuration
|
||||||
;;(require 'custom-evil) ; An 'evil-mode' configuration
|
;;(require 'custom-evil) ; An 'evil-mode' configuration
|
||||||
|
(require 'crafted-editing) ; Whitespace trimming, auto parens etc.
|
||||||
|
;;(require 'crafted-org) ; org-appear, clickable hyperlinks etc.
|
||||||
|
(require 'custom-org) ; org-appear, clickable hyperlinks etc.
|
||||||
|
(require 'crafted-project)
|
||||||
|
(require 'crafted-latex)
|
||||||
|
|
||||||
(setq-default tab-width 4)
|
(setq-default tab-width 4)
|
||||||
(defvaralias 'c-basic-offset 'tab-width)
|
(defvaralias 'c-basic-offset 'tab-width)
|
||||||
@ -29,12 +33,11 @@
|
|||||||
(add-hook 'emacs-startup-hook
|
(add-hook 'emacs-startup-hook
|
||||||
(lambda ()
|
(lambda ()
|
||||||
(custom-set-faces
|
(custom-set-faces
|
||||||
`(default ((t (:font "Fira Code 10"))))
|
`(default ((t (:font "Fira Code 12"))))
|
||||||
`(fixed-pitch ((t (:inherit (default)))))
|
`(fixed-pitch ((t (:inherit (default)))))
|
||||||
`(fixed-pitch-serif ((t (:inherit (default)))))
|
`(fixed-pitch-serif ((t (:inherit (default)))))
|
||||||
`(variable-pitch ((t (:font "Ubuntu 10")))))))
|
`(variable-pitch ((t (:font "Ubuntu Mono 12")))))))
|
||||||
(set-fontset-font t `hangul (font-spec :name "NanumGothic"))
|
(set-fontset-font t `hangul (font-spec :name "NanumGothic"))
|
||||||
|
|
||||||
;; loading themes
|
;; loading themes
|
||||||
(crafted-package-install-package 'doom-themes)
|
(crafted-package-install-package 'doom-themes)
|
||||||
(progn
|
(progn
|
||||||
|
|||||||
@ -57,10 +57,13 @@ package.el or Guix depending on the value of
|
|||||||
;; If you edit it by hand, you could mess it up, so be careful.
|
;; If you edit it by hand, you could mess it up, so be careful.
|
||||||
;; Your init file should contain only one such instance.
|
;; Your init file should contain only one such instance.
|
||||||
;; If there is more than one, they won't work right.
|
;; If there is more than one, they won't work right.
|
||||||
'(package-selected-packages '(doom-themes)))
|
'(package-selected-packages '(auctex doom-themes)))
|
||||||
(custom-set-faces
|
(custom-set-faces
|
||||||
;; custom-set-faces was added by Custom.
|
;; custom-set-faces was added by Custom.
|
||||||
;; If you edit it by hand, you could mess it up, so be careful.
|
;; If you edit it by hand, you could mess it up, so be careful.
|
||||||
;; Your init file should contain only one such instance.
|
;; Your init file should contain only one such instance.
|
||||||
;; If there is more than one, they won't work right.
|
;; If there is more than one, they won't work right.
|
||||||
)
|
'(default ((t (:font "Fira Code 12"))))
|
||||||
|
'(fixed-pitch ((t (:inherit (default)))))
|
||||||
|
'(fixed-pitch-serif ((t (:inherit (default)))))
|
||||||
|
'(variable-pitch ((t (:font "Ubuntu Mono 12")))))
|
||||||
|
|||||||
BIN
.config/emacs/logo.png
Executable file
BIN
.config/emacs/logo.png
Executable file
Binary file not shown.
|
After Width: | Height: | Size: 12 KiB |
405
.config/emacs/logo.svg
Executable file
405
.config/emacs/logo.svg
Executable file
@ -0,0 +1,405 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||||
|
<!-- Created with Inkscape (http://www.inkscape.org/) -->
|
||||||
|
|
||||||
|
<svg
|
||||||
|
xmlns:dc="http://purl.org/dc/elements/1.1/"
|
||||||
|
xmlns:cc="http://creativecommons.org/ns#"
|
||||||
|
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
|
||||||
|
xmlns:svg="http://www.w3.org/2000/svg"
|
||||||
|
xmlns="http://www.w3.org/2000/svg"
|
||||||
|
xmlns:xlink="http://www.w3.org/1999/xlink"
|
||||||
|
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
|
||||||
|
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
|
||||||
|
width="666"
|
||||||
|
height="666"
|
||||||
|
viewBox="0 0 666.00001 666.00001"
|
||||||
|
id="svg4774"
|
||||||
|
version="1.1"
|
||||||
|
inkscape:version="0.91 r13725"
|
||||||
|
sodipodi:docname="spacemacs-logo.svg">
|
||||||
|
<defs
|
||||||
|
id="defs4776">
|
||||||
|
<radialGradient
|
||||||
|
inkscape:collect="always"
|
||||||
|
xlink:href="#linearGradient4221"
|
||||||
|
id="radialGradient4194"
|
||||||
|
cx="-177.23108"
|
||||||
|
cy="928.25415"
|
||||||
|
fx="-177.23108"
|
||||||
|
fy="928.25415"
|
||||||
|
r="28.529215"
|
||||||
|
gradientUnits="userSpaceOnUse"
|
||||||
|
gradientTransform="matrix(0.78891466,0.78891466,-0.76542395,0.76542395,536.60019,408.54464)" />
|
||||||
|
<linearGradient
|
||||||
|
id="linearGradient4221">
|
||||||
|
<stop
|
||||||
|
style="stop-color:#c0c0dc;stop-opacity:1"
|
||||||
|
offset="0"
|
||||||
|
id="stop4223" />
|
||||||
|
<stop
|
||||||
|
id="stop4225"
|
||||||
|
offset="0.11419532"
|
||||||
|
style="stop-color:#c0c0dd;stop-opacity:1" />
|
||||||
|
<stop
|
||||||
|
style="stop-color:#a191bf;stop-opacity:1"
|
||||||
|
offset="0.47871608"
|
||||||
|
id="stop4227" />
|
||||||
|
<stop
|
||||||
|
style="stop-color:#625681;stop-opacity:1"
|
||||||
|
offset="1"
|
||||||
|
id="stop4229" />
|
||||||
|
</linearGradient>
|
||||||
|
<linearGradient
|
||||||
|
gradientUnits="userSpaceOnUse"
|
||||||
|
y2="951.89844"
|
||||||
|
x2="46.893108"
|
||||||
|
y1="934.5658"
|
||||||
|
x1="-0.65353984"
|
||||||
|
id="linearGradient7595"
|
||||||
|
xlink:href="#linearGradient4274"
|
||||||
|
gradientTransform="matrix(0.4887125,0,0,0.4887125,7.5674041,560.78197)" />
|
||||||
|
<linearGradient
|
||||||
|
id="linearGradient4274">
|
||||||
|
<stop
|
||||||
|
style="stop-color:#eeeeec;stop-opacity:1"
|
||||||
|
offset="0"
|
||||||
|
id="stop4276" />
|
||||||
|
<stop
|
||||||
|
id="stop4181"
|
||||||
|
offset="0.0837483"
|
||||||
|
style="stop-color:#eeeeec;stop-opacity:1" />
|
||||||
|
<stop
|
||||||
|
style="stop-color:#eeeeec;stop-opacity:1"
|
||||||
|
offset="0.3513594"
|
||||||
|
id="stop4280" />
|
||||||
|
<stop
|
||||||
|
style="stop-color:#e0d5d5;stop-opacity:1"
|
||||||
|
offset="1"
|
||||||
|
id="stop4282" />
|
||||||
|
</linearGradient>
|
||||||
|
<linearGradient
|
||||||
|
gradientTransform="matrix(0.19229712,0.06206447,-0.10031905,0.17023858,27.947597,914.55215)"
|
||||||
|
gradientUnits="userSpaceOnUse"
|
||||||
|
y2="672.25775"
|
||||||
|
x2="396.9097"
|
||||||
|
y1="608.87836"
|
||||||
|
x1="303.64438"
|
||||||
|
id="linearGradient4317"
|
||||||
|
xlink:href="#linearGradient7589" />
|
||||||
|
<linearGradient
|
||||||
|
id="linearGradient7589">
|
||||||
|
<stop
|
||||||
|
style="stop-color:#351347;stop-opacity:1"
|
||||||
|
offset="0"
|
||||||
|
id="stop7591" />
|
||||||
|
<stop
|
||||||
|
style="stop-color:#5c3566;stop-opacity:0;"
|
||||||
|
offset="1"
|
||||||
|
id="stop7593" />
|
||||||
|
</linearGradient>
|
||||||
|
<linearGradient
|
||||||
|
gradientTransform="matrix(0.07485012,0.08932098,-0.08626544,0.06221301,53.22269,961.64413)"
|
||||||
|
gradientUnits="userSpaceOnUse"
|
||||||
|
y2="364.66345"
|
||||||
|
x2="377.03168"
|
||||||
|
y1="425.15848"
|
||||||
|
x1="306.88434"
|
||||||
|
id="linearGradient4301"
|
||||||
|
xlink:href="#linearGradient4311" />
|
||||||
|
<linearGradient
|
||||||
|
id="linearGradient4311">
|
||||||
|
<stop
|
||||||
|
id="stop4313"
|
||||||
|
offset="0"
|
||||||
|
style="stop-color:#351e47;stop-opacity:1" />
|
||||||
|
<stop
|
||||||
|
id="stop4315"
|
||||||
|
offset="1"
|
||||||
|
style="stop-color:#5c3566;stop-opacity:0;" />
|
||||||
|
</linearGradient>
|
||||||
|
<linearGradient
|
||||||
|
gradientTransform="matrix(0.15153279,0.0143268,-0.0143268,0.15153279,-12.641966,950.28506)"
|
||||||
|
gradientUnits="userSpaceOnUse"
|
||||||
|
y2="429.49622"
|
||||||
|
x2="329.16669"
|
||||||
|
y1="527.33502"
|
||||||
|
x1="267.65439"
|
||||||
|
id="linearGradient4230"
|
||||||
|
xlink:href="#linearGradient4274" />
|
||||||
|
<linearGradient
|
||||||
|
gradientTransform="matrix(-0.13467,0.03941451,0.04093431,0.13986281,58.64004,937.70038)"
|
||||||
|
gradientUnits="userSpaceOnUse"
|
||||||
|
y2="465.96136"
|
||||||
|
x2="190.84904"
|
||||||
|
y1="511.44083"
|
||||||
|
x1="308.41003"
|
||||||
|
id="linearGradient5577"
|
||||||
|
xlink:href="#linearGradient4196" />
|
||||||
|
<linearGradient
|
||||||
|
id="linearGradient4196">
|
||||||
|
<stop
|
||||||
|
id="stop4198"
|
||||||
|
offset="0"
|
||||||
|
style="stop-color:#ffffff;stop-opacity:1" />
|
||||||
|
<stop
|
||||||
|
style="stop-color:#fffff2;stop-opacity:1"
|
||||||
|
offset="0.11419532"
|
||||||
|
id="stop4200" />
|
||||||
|
<stop
|
||||||
|
id="stop4202"
|
||||||
|
offset="0.47871608"
|
||||||
|
style="stop-color:#d2acd2;stop-opacity:1" />
|
||||||
|
<stop
|
||||||
|
id="stop4204"
|
||||||
|
offset="1"
|
||||||
|
style="stop-color:#123069;stop-opacity:1" />
|
||||||
|
</linearGradient>
|
||||||
|
<radialGradient
|
||||||
|
gradientTransform="matrix(0.3389967,0.21474015,-0.19688621,0.26982602,-1209.2255,-630.6322)"
|
||||||
|
gradientUnits="userSpaceOnUse"
|
||||||
|
r="169"
|
||||||
|
fy="472.51749"
|
||||||
|
fx="322.17105"
|
||||||
|
cy="472.51749"
|
||||||
|
cx="322.17105"
|
||||||
|
id="radialGradient5136-0-6-65"
|
||||||
|
xlink:href="#linearGradient6003" />
|
||||||
|
<linearGradient
|
||||||
|
id="linearGradient6003">
|
||||||
|
<stop
|
||||||
|
style="stop-color:#c2c6db;stop-opacity:1"
|
||||||
|
offset="0"
|
||||||
|
id="stop6005" />
|
||||||
|
<stop
|
||||||
|
id="stop6007"
|
||||||
|
offset="0.33969504"
|
||||||
|
style="stop-color:#bab1e0;stop-opacity:1" />
|
||||||
|
<stop
|
||||||
|
id="stop6009"
|
||||||
|
offset="0.44414869"
|
||||||
|
style="stop-color:#8d77a3;stop-opacity:1" />
|
||||||
|
<stop
|
||||||
|
style="stop-color:#675a84;stop-opacity:1"
|
||||||
|
offset="0.55217898"
|
||||||
|
id="stop6011" />
|
||||||
|
<stop
|
||||||
|
style="stop-color:#050846;stop-opacity:1"
|
||||||
|
offset="1"
|
||||||
|
id="stop6013" />
|
||||||
|
</linearGradient>
|
||||||
|
<radialGradient
|
||||||
|
gradientTransform="matrix(0.19025707,0.10471339,-0.11049955,0.13157478,-966.76195,-798.66855)"
|
||||||
|
gradientUnits="userSpaceOnUse"
|
||||||
|
r="169"
|
||||||
|
fy="472.51749"
|
||||||
|
fx="322.17105"
|
||||||
|
cy="472.51749"
|
||||||
|
cx="322.17105"
|
||||||
|
id="radialGradient5136-0-6-6-8-3-1"
|
||||||
|
xlink:href="#linearGradient6003" />
|
||||||
|
<radialGradient
|
||||||
|
gradientTransform="matrix(0.1361054,0.07855904,-0.0790488,0.09871133,-780.58233,-1164.6467)"
|
||||||
|
gradientUnits="userSpaceOnUse"
|
||||||
|
r="169"
|
||||||
|
fy="472.51749"
|
||||||
|
fx="322.17105"
|
||||||
|
cy="472.51749"
|
||||||
|
cx="322.17105"
|
||||||
|
id="radialGradient5136-0-6-6-8-8-8"
|
||||||
|
xlink:href="#linearGradient6003" />
|
||||||
|
<radialGradient
|
||||||
|
gradientTransform="matrix(0.18445402,0.09675949,-0.10712923,0.12158052,-859.37376,-1098.3051)"
|
||||||
|
gradientUnits="userSpaceOnUse"
|
||||||
|
r="169"
|
||||||
|
fy="472.51749"
|
||||||
|
fx="322.17105"
|
||||||
|
cy="472.51749"
|
||||||
|
cx="322.17105"
|
||||||
|
id="radialGradient5136-0-6-6-8-6"
|
||||||
|
xlink:href="#linearGradient6003" />
|
||||||
|
<radialGradient
|
||||||
|
gradientTransform="matrix(0.33582312,0.20512484,-0.19504306,0.25774431,-945.14244,-758.65362)"
|
||||||
|
gradientUnits="userSpaceOnUse"
|
||||||
|
r="169"
|
||||||
|
fy="472.51749"
|
||||||
|
fx="322.17105"
|
||||||
|
cy="472.51749"
|
||||||
|
cx="322.17105"
|
||||||
|
id="radialGradient5136-0-6-6-2"
|
||||||
|
xlink:href="#linearGradient6003" />
|
||||||
|
<radialGradient
|
||||||
|
gradientTransform="matrix(0.35330232,0.22380216,-0.20519478,0.28121264,-702.27629,-398.30317)"
|
||||||
|
gradientUnits="userSpaceOnUse"
|
||||||
|
r="169"
|
||||||
|
fy="472.51749"
|
||||||
|
fx="322.17105"
|
||||||
|
cy="472.51749"
|
||||||
|
cx="322.17105"
|
||||||
|
id="radialGradient5136-0-6-65-3"
|
||||||
|
xlink:href="#linearGradient6003" />
|
||||||
|
<radialGradient
|
||||||
|
gradientTransform="matrix(0.19828589,0.10913228,-0.11516262,0.13712722,-658.03031,-481.71303)"
|
||||||
|
gradientUnits="userSpaceOnUse"
|
||||||
|
r="169"
|
||||||
|
fy="472.51749"
|
||||||
|
fx="322.17105"
|
||||||
|
cy="472.51749"
|
||||||
|
cx="322.17105"
|
||||||
|
id="radialGradient5136-0-6-6-8-3-1-9"
|
||||||
|
xlink:href="#linearGradient6003" />
|
||||||
|
<radialGradient
|
||||||
|
gradientTransform="matrix(0.14184903,0.08187422,-0.08238465,0.10287694,-643.98232,-766.01725)"
|
||||||
|
gradientUnits="userSpaceOnUse"
|
||||||
|
r="169"
|
||||||
|
fy="472.51749"
|
||||||
|
fx="322.17105"
|
||||||
|
cy="472.51749"
|
||||||
|
cx="322.17105"
|
||||||
|
id="radialGradient5136-0-6-6-8-8-8-5"
|
||||||
|
xlink:href="#linearGradient6003" />
|
||||||
|
<radialGradient
|
||||||
|
gradientTransform="matrix(0.34999481,0.21378108,-0.20327385,0.26862109,-680.60673,-453.66251)"
|
||||||
|
gradientUnits="userSpaceOnUse"
|
||||||
|
r="169"
|
||||||
|
fy="472.51749"
|
||||||
|
fx="322.17105"
|
||||||
|
cy="472.51749"
|
||||||
|
cx="322.17105"
|
||||||
|
id="radialGradient5136-0-6-6-2-1"
|
||||||
|
xlink:href="#linearGradient6003" />
|
||||||
|
<radialGradient
|
||||||
|
gradientTransform="matrix(0.19223796,0.10084273,-0.11165007,0.1267112,-724.74062,-701.33347)"
|
||||||
|
gradientUnits="userSpaceOnUse"
|
||||||
|
r="169"
|
||||||
|
fy="472.51749"
|
||||||
|
fx="322.17105"
|
||||||
|
cy="472.51749"
|
||||||
|
cx="322.17105"
|
||||||
|
id="radialGradient5136-0-6-6-8-6-9"
|
||||||
|
xlink:href="#linearGradient6003" />
|
||||||
|
</defs>
|
||||||
|
<sodipodi:namedview
|
||||||
|
id="base"
|
||||||
|
pagecolor="#ffffff"
|
||||||
|
bordercolor="#666666"
|
||||||
|
borderopacity="1.0"
|
||||||
|
inkscape:pageopacity="0.0"
|
||||||
|
inkscape:pageshadow="2"
|
||||||
|
inkscape:zoom="0.7"
|
||||||
|
inkscape:cx="395.86046"
|
||||||
|
inkscape:cy="245.84063"
|
||||||
|
inkscape:document-units="px"
|
||||||
|
inkscape:current-layer="layer1"
|
||||||
|
showgrid="false"
|
||||||
|
units="px"
|
||||||
|
inkscape:window-width="1920"
|
||||||
|
inkscape:window-height="1055"
|
||||||
|
inkscape:window-x="1366"
|
||||||
|
inkscape:window-y="25"
|
||||||
|
inkscape:window-maximized="1" />
|
||||||
|
<metadata
|
||||||
|
id="metadata4779">
|
||||||
|
<rdf:RDF>
|
||||||
|
<cc:Work
|
||||||
|
rdf:about="">
|
||||||
|
<dc:format>image/svg+xml</dc:format>
|
||||||
|
<dc:type
|
||||||
|
rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
|
||||||
|
<dc:title />
|
||||||
|
</cc:Work>
|
||||||
|
</rdf:RDF>
|
||||||
|
</metadata>
|
||||||
|
<g
|
||||||
|
inkscape:label="spacemacs"
|
||||||
|
inkscape:groupmode="layer"
|
||||||
|
id="layer1"
|
||||||
|
transform="translate(0,-386.36216)"
|
||||||
|
style="display:inline">
|
||||||
|
<g
|
||||||
|
style="display:inline"
|
||||||
|
transform="matrix(12.9592,4.5120702,-4.5120702,12.9592,4535.5464,-12837.419)"
|
||||||
|
id="g5039">
|
||||||
|
<circle
|
||||||
|
style="color:#000000;clip-rule:nonzero;display:inline;overflow:visible;visibility:visible;opacity:1;isolation:auto;mix-blend-mode:normal;color-interpolation:sRGB;color-interpolation-filters:linearRGB;solid-color:#000000;solid-opacity:1;fill:url(#radialGradient4194);fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:1;stroke-linecap:square;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;marker:none;color-rendering:auto;image-rendering:auto;shape-rendering:auto;text-rendering:auto;enable-background:accumulate"
|
||||||
|
id="path4186"
|
||||||
|
cx="-306.25821"
|
||||||
|
cy="988.6507"
|
||||||
|
r="23.139797"
|
||||||
|
transform="matrix(0.9443945,-0.32881459,0.32881459,0.9443945,0,0)" />
|
||||||
|
<path
|
||||||
|
id="path5256-9"
|
||||||
|
d="m 41.74716,1025.8039 c 14.519162,9.8452 9.408594,4.9185 10.261109,11.0962 -0.08117,0.1465 -0.169388,0.2875 -0.264301,0.4231 -0.01249,-0.014 -0.02419,-0.026 -0.03724,-0.04 -0.01001,-0.012 -0.02174,-0.019 -0.03214,-0.029 0.0196,-0.032 0.04012,-0.064 0.05853,-0.097 -1.225557,-5.0729 2.687143,-1.119 -11.156663,-10.2157 -9.051772,-5.9479 -16.352144,-7.226 -22.551938,-7.4019 -3.488421,-0.099 -5.913923,0.8728 -6.987909,2.7989 -1.3411642,2.4179 -0.912655,3.8155 1.994536,8.2521 -0.0911,0.3259 -0.03315,0.4943 -0.142124,0.8727 -3.8516196,-5.3869 -5.0172816,-9.7976 -3.4468002,-12.6716 0.9933212,-1.8068 2.7093882,-2.6025 5.6926712,-2.7563 9.218032,-0.2063 20.202074,5.5056 26.612289,9.7685 z"
|
||||||
|
style="color:#000000;clip-rule:nonzero;display:inline;overflow:visible;visibility:visible;opacity:1;isolation:auto;mix-blend-mode:normal;color-interpolation:sRGB;color-interpolation-filters:linearRGB;solid-color:#000000;solid-opacity:1;fill:url(#linearGradient7595);fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:0.37715784;stroke-linecap:square;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;marker:none;color-rendering:auto;image-rendering:auto;shape-rendering:auto;text-rendering:auto;enable-background:accumulate"
|
||||||
|
inkscape:connector-curvature="0"
|
||||||
|
sodipodi:nodetypes="ccccccsccccccc" />
|
||||||
|
<path
|
||||||
|
style="color:#000000;clip-rule:nonzero;display:inline;overflow:visible;visibility:visible;opacity:0.8;isolation:auto;mix-blend-mode:normal;color-interpolation:sRGB;color-interpolation-filters:linearRGB;solid-color:#000000;solid-opacity:1;fill:url(#linearGradient4317);fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:1.21200001;stroke-linecap:square;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;marker:none;color-rendering:auto;image-rendering:auto;shape-rendering:auto;text-rendering:auto;enable-background:accumulate"
|
||||||
|
d="m 14.9959,1029.2143 c -0.236814,-0.2856 -0.559796,-0.7803 -0.485872,-0.7807 0.200566,-9e-4 9.60872,5.7454 9.929692,5.9329 4.225002,4.0646 7.676291,7.8951 11.373035,12.2304 2.765649,3.2702 7.591378,9.0843 9.008973,9.9815 0.05917,0.037 0.112444,0.068 0.159687,0.093 -2.111114,0.1893 -14.247147,-3.1483 -14.247147,-3.1483 -3.97823,-8.2435 -8.504661,-15.1572 -15.738368,-24.3079 z"
|
||||||
|
id="path4234"
|
||||||
|
inkscape:connector-curvature="0"
|
||||||
|
sodipodi:nodetypes="cccccccc" />
|
||||||
|
<path
|
||||||
|
id="path6025-8"
|
||||||
|
d="m 39.507014,1015.4943 c 0.260338,0.1601 1.278904,1.4959 1.492115,1.6461 0.54521,0.3837 0.645075,0.4736 1.558512,0.91 2.376613,1.136 6.504302,2.7191 6.504302,2.7191 0,0 2.630753,0.9003 3.272047,1.1112 -1.710157,-0.9453 -3.398419,-2.6104 -5.93676,-4.0182 -2.624957,-0.3799 -5.293181,-1.7482 -6.889784,-2.3741 -5.36e-4,0 0.0042,0.023 -5.36e-4,0 z"
|
||||||
|
style="color:#000000;clip-rule:nonzero;display:inline;overflow:visible;visibility:visible;opacity:0.8;isolation:auto;mix-blend-mode:normal;color-interpolation:sRGB;color-interpolation-filters:linearRGB;solid-color:#000000;solid-opacity:1;fill:url(#linearGradient4301);fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:1.21200001;stroke-linecap:square;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;marker:none;color-rendering:auto;image-rendering:auto;shape-rendering:auto;text-rendering:auto;enable-background:accumulate"
|
||||||
|
inkscape:connector-curvature="0" />
|
||||||
|
<path
|
||||||
|
id="path6023"
|
||||||
|
d="m 36.623604,1014.7016 c 0.193864,-0.019 2.509837,1.1588 3.410083,1.7391 1.57816,1.0174 2.284312,1.6826 3.530043,3.325 3.241178,4.2734 5.638326,7.8421 8.059968,11.9988 1.214933,2.0854 3.422302,5.8712 3.79561,6.6117 0.04828,0.1012 0.06496,0.2398 0.07289,0.2669 -0.04815,-0.025 -0.17197,-0.083 -0.695631,-0.2973 -1.535379,-0.6247 -4.40422,-1.3616 -7.138474,-1.8334 -3.411804,-0.5887 -6.703011,-0.9628 -13.982957,-1.5894 -6.645099,-0.572 -9.719985,-0.8756 -12.163077,-1.2004 l -2.240265,-0.286 -2.354121,-2.612 c -1.46418,-1.4526 -2.668967,-2.6643 -2.677396,-2.6931 -0.0084,-0.028 0.332869,0.131 0.758726,0.3553 4.75579,2.5049 13.315388,3.3027 21.66368,2.0192 2.970312,-0.4566 6.368994,-1.6365 7.501263,-2.2622 0.21761,-0.12 0.380508,-0.2142 0.464537,-0.2839 0.0016,-2e-4 0.005,9e-4 0.0069,9e-4 0.0013,-0.093 -0.01124,-0.1899 -0.01912,-0.267 -0.351615,-3.4272 -3.893164,-9.3454 -7.415017,-12.3909 -0.341761,-0.2955 -0.607302,-0.5635 -0.589853,-0.5953 0.0016,0 0.0061,0 0.01225,0 z"
|
||||||
|
style="color:#000000;clip-rule:nonzero;display:inline;overflow:visible;visibility:visible;opacity:1;isolation:auto;mix-blend-mode:normal;color-interpolation:sRGB;color-interpolation-filters:linearRGB;solid-color:#000000;solid-opacity:1;fill:url(#linearGradient4230);fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:1.21200001;stroke-linecap:square;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;marker:none;color-rendering:auto;image-rendering:auto;shape-rendering:auto;text-rendering:auto;enable-background:accumulate"
|
||||||
|
inkscape:connector-curvature="0" />
|
||||||
|
<path
|
||||||
|
id="path6025"
|
||||||
|
d="m 36.461108,1014.6646 c 0.191656,-0.016 3.77684,0.9616 4.167363,1.319 0.998651,0.9137 1.69043,1.7046 2.940028,3.3953 4.362718,5.9461 8.135752,12.2745 11.646698,18.748 -2.436785,-3.3659 -6.107216,-6.7129 -10.58113,-10.1675 -7.7e-5,-0.021 10e-4,-0.075 -0.0016,-0.1149 -0.383095,-3.505 -3.995976,-9.3221 -7.512388,-12.4697 -0.341235,-0.3054 -0.687815,-0.6718 -0.670879,-0.7042 0.0015,0 0.0059,0 0.012,0 z"
|
||||||
|
style="color:#000000;clip-rule:nonzero;display:inline;overflow:visible;visibility:visible;opacity:1;isolation:auto;mix-blend-mode:normal;color-interpolation:sRGB;color-interpolation-filters:linearRGB;solid-color:#000000;solid-opacity:1;fill:url(#linearGradient5577);fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:1.21200001;stroke-linecap:square;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;marker:none;color-rendering:auto;image-rendering:auto;shape-rendering:auto;text-rendering:auto;enable-background:accumulate"
|
||||||
|
inkscape:connector-curvature="0" />
|
||||||
|
</g>
|
||||||
|
</g>
|
||||||
|
<g
|
||||||
|
inkscape:groupmode="layer"
|
||||||
|
id="layer9"
|
||||||
|
inkscape:label="craters"
|
||||||
|
style="display:inline;opacity:0.48800001"
|
||||||
|
sodipodi:insensitive="true">
|
||||||
|
<ellipse
|
||||||
|
style="color:#000000;clip-rule:nonzero;display:inline;overflow:visible;visibility:visible;opacity:0.24500002;isolation:auto;mix-blend-mode:normal;color-interpolation:sRGB;color-interpolation-filters:linearRGB;solid-color:#000000;solid-opacity:1;fill:url(#radialGradient5136-0-6-65-3);fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:1.21200001;stroke-linecap:square;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;marker:none;color-rendering:auto;image-rendering:auto;shape-rendering:auto;text-rendering:auto;enable-background:accumulate"
|
||||||
|
id="path5113-4-3"
|
||||||
|
cx="-674.75861"
|
||||||
|
cy="-183.95151"
|
||||||
|
rx="33.302528"
|
||||||
|
ry="31.029184"
|
||||||
|
transform="matrix(-0.46577522,-0.88490307,0.94940297,0.3140605,0,0)" />
|
||||||
|
<ellipse
|
||||||
|
style="color:#000000;clip-rule:nonzero;display:inline;overflow:visible;visibility:visible;opacity:0.24500002;isolation:auto;mix-blend-mode:normal;color-interpolation:sRGB;color-interpolation-filters:linearRGB;solid-color:#000000;solid-opacity:1;fill:url(#radialGradient5136-0-6-6-2-1);fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:1.21200001;stroke-linecap:square;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;marker:none;color-rendering:auto;image-rendering:auto;shape-rendering:auto;text-rendering:auto;enable-background:accumulate"
|
||||||
|
id="path5113-4-3-7"
|
||||||
|
cx="-653.35913"
|
||||||
|
cy="-248.91931"
|
||||||
|
rx="32.990776"
|
||||||
|
ry="29.639826"
|
||||||
|
transform="matrix(-0.79746875,-0.60336025,0.73432765,-0.67879518,0,0)" />
|
||||||
|
<ellipse
|
||||||
|
style="color:#000000;clip-rule:nonzero;display:inline;overflow:visible;visibility:visible;opacity:0.24500002;isolation:auto;mix-blend-mode:normal;color-interpolation:sRGB;color-interpolation-filters:linearRGB;solid-color:#000000;solid-opacity:1;fill:url(#radialGradient5136-0-6-6-8-6-9);fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:1.21200001;stroke-linecap:square;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;marker:none;color-rendering:auto;image-rendering:auto;shape-rendering:auto;text-rendering:auto;enable-background:accumulate"
|
||||||
|
id="path5113-4-3-7-3"
|
||||||
|
cx="-709.77368"
|
||||||
|
cy="-604.74725"
|
||||||
|
rx="18.120491"
|
||||||
|
ry="13.981397"
|
||||||
|
transform="matrix(-0.99991572,0.01298277,0.35376623,-0.93533387,0,0)" />
|
||||||
|
<ellipse
|
||||||
|
style="color:#000000;clip-rule:nonzero;display:inline;overflow:visible;visibility:visible;opacity:0.24500002;isolation:auto;mix-blend-mode:normal;color-interpolation:sRGB;color-interpolation-filters:linearRGB;solid-color:#000000;solid-opacity:1;fill:url(#radialGradient5136-0-6-6-8-3-1-9);fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:1.21200001;stroke-linecap:square;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;marker:none;color-rendering:auto;image-rendering:auto;shape-rendering:auto;text-rendering:auto;enable-background:accumulate"
|
||||||
|
id="path5113-4-3-7-3-1"
|
||||||
|
cx="-642.59436"
|
||||||
|
cy="-377.19153"
|
||||||
|
rx="18.690575"
|
||||||
|
ry="15.130705"
|
||||||
|
transform="matrix(-0.82870289,-0.55968877,0.78595684,-0.61828136,0,0)" />
|
||||||
|
<ellipse
|
||||||
|
style="color:#000000;clip-rule:nonzero;display:inline;overflow:visible;visibility:visible;opacity:0.24500002;isolation:auto;mix-blend-mode:normal;color-interpolation:sRGB;color-interpolation-filters:linearRGB;solid-color:#000000;solid-opacity:1;fill:url(#radialGradient5136-0-6-6-8-8-8-5);fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:1.21200001;stroke-linecap:square;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;marker:none;color-rendering:auto;image-rendering:auto;shape-rendering:auto;text-rendering:auto;enable-background:accumulate"
|
||||||
|
id="path5113-4-3-7-3-0"
|
||||||
|
cx="-632.93744"
|
||||||
|
cy="-687.5965"
|
||||||
|
rx="13.370796"
|
||||||
|
ry="11.351508"
|
||||||
|
transform="matrix(-0.99900978,0.04449109,0.3468689,-0.93791362,0,0)" />
|
||||||
|
</g>
|
||||||
|
</svg>
|
||||||
|
After Width: | Height: | Size: 21 KiB |
@ -1,198 +0,0 @@
|
|||||||
jjjjjjjjjjj;;; crafted-ui.el -*- lexical-binding: t; -*-
|
|
||||||
|
|
||||||
;; Copyright (C) 2022
|
|
||||||
;; SPDX-License-Identifier: MIT
|
|
||||||
|
|
||||||
;; Author: System Crafters Community
|
|
||||||
|
|
||||||
;; Commentary
|
|
||||||
|
|
||||||
;; User interface customizations. Examples are the modeline and how
|
|
||||||
;; help buffers are displayed.
|
|
||||||
|
|
||||||
;; This package provides a basic, customized appearance for
|
|
||||||
;; Emacs. Specifically, it uses: Helpful to customize the information
|
|
||||||
;; and visual display of help buffers, such as that created by M-x
|
|
||||||
;; `describe-function'; Doom Modeline and Themes, to customize the
|
|
||||||
;; appearance of buffers, text, et cetera; All-the-icons, to provide
|
|
||||||
;; Doom Modeline with font-based icons (rather than raster or vector
|
|
||||||
;; images); and includes some Emacs Lisp demonstrations.
|
|
||||||
|
|
||||||
;; Run `all-the-icons-install-fonts' to ensure the fonts necessary
|
|
||||||
;; for ALL THE ICONS are available on your system. You must run this
|
|
||||||
;; function if the "stop" icon at the beginning of this paragraph is
|
|
||||||
;; not displayed properly (it appears as a box with some numbers
|
|
||||||
;; and/or letters inside it).
|
|
||||||
|
|
||||||
;; Read the documentation for `all-the-icons'; on Windows,
|
|
||||||
;; `all-the-icons-install-fonts' only downloads fonts, they must be
|
|
||||||
;; installed manually. This is necessary if icons are not displaying
|
|
||||||
;; properly.
|
|
||||||
|
|
||||||
;;; Code:
|
|
||||||
|
|
||||||
(crafted-package-install-package 'all-the-icons)
|
|
||||||
(crafted-package-install-package 'elisp-demos)
|
|
||||||
(crafted-package-install-package 'helpful)
|
|
||||||
|
|
||||||
;;;; Font
|
|
||||||
(defun crafted-ui--set-default-font (spec)
|
|
||||||
"Set the default font based on SPEC.
|
|
||||||
|
|
||||||
SPEC is expected to be a plist with the same key names
|
|
||||||
as accepted by `set-face-attribute'."
|
|
||||||
(when spec
|
|
||||||
(apply 'set-face-attribute 'default nil spec)))
|
|
||||||
|
|
||||||
(defun crafted-ui--toggle-doom-modeline-mode (state)
|
|
||||||
"Turn on/off doom-modeline-mode if it is installed.
|
|
||||||
|
|
||||||
STATE is either 1 to turn the mode on, or -1 to turn it off."
|
|
||||||
(when (package-installed-p 'doom-modeline)
|
|
||||||
(doom-modeline-mode state)))
|
|
||||||
|
|
||||||
(defgroup crafted-ui '()
|
|
||||||
"User interface related configuration for Crafted Emacs."
|
|
||||||
:tag "Crafted UI"
|
|
||||||
:group 'crafted)
|
|
||||||
|
|
||||||
(define-obsolete-variable-alias
|
|
||||||
'rational-ui-default-font
|
|
||||||
'crafted-ui-default-font
|
|
||||||
"1")
|
|
||||||
(defcustom crafted-ui-default-font nil
|
|
||||||
"The configuration of the `default' face.
|
|
||||||
Use a plist with the same key names as accepted by `set-face-attribute'."
|
|
||||||
:group 'crafted-ui
|
|
||||||
:type '(plist :key-type: symbol)
|
|
||||||
:tag "Default font"
|
|
||||||
:set (lambda (sym val)
|
|
||||||
(let ((prev-val (if (boundp 'crafted-ui-default-font)
|
|
||||||
crafted-ui-default-font
|
|
||||||
nil)))
|
|
||||||
(set-default sym val)
|
|
||||||
(when (and val (not (eq val prev-val)))
|
|
||||||
(crafted-ui--set-default-font val)))))
|
|
||||||
|
|
||||||
;;;; Mode-Line
|
|
||||||
(defcustom crafted-ui-use-doom-modeline nil
|
|
||||||
"Use doom-modeline-mode."
|
|
||||||
:group 'crafted-ui
|
|
||||||
:type 'boolean
|
|
||||||
:tag "Use Doom Modeline"
|
|
||||||
:set (lambda (sym val)
|
|
||||||
(set-default sym val)
|
|
||||||
(if val
|
|
||||||
(crafted-ui--toggle-doom-modeline-mode 1)
|
|
||||||
(crafted-ui--toggle-doom-modeline-mode -1))))
|
|
||||||
|
|
||||||
;; Configure `doom-modeline' if it is enabled
|
|
||||||
(when crafted-ui-use-doom-modeline
|
|
||||||
(crafted-package-install-package 'doom-modeline)
|
|
||||||
(customize-set-variable 'doom-modeline-height 15)
|
|
||||||
(customize-set-variable 'doom-modeline-bar-width 6)
|
|
||||||
(customize-set-variable 'doom-modeline-minor-modes t)
|
|
||||||
(customize-set-variable 'doom-modeline-buffer-file-name-style 'truncate-except-project))
|
|
||||||
|
|
||||||
;;;; Help Buffers
|
|
||||||
|
|
||||||
;; Make `describe-*' screens more helpful
|
|
||||||
(require 'helpful)
|
|
||||||
(define-key helpful-mode-map [remap revert-buffer] #'helpful-update)
|
|
||||||
(global-set-key [remap describe-command] #'helpful-command)
|
|
||||||
(global-set-key [remap describe-function] #'helpful-callable)
|
|
||||||
(global-set-key [remap describe-key] #'helpful-key)
|
|
||||||
(global-set-key [remap describe-symbol] #'helpful-symbol)
|
|
||||||
(global-set-key [remap describe-variable] #'helpful-variable)
|
|
||||||
(global-set-key (kbd "C-h F") #'helpful-function)
|
|
||||||
|
|
||||||
;; Bind extra `describe-*' commands
|
|
||||||
(global-set-key (kbd "C-h K") #'describe-keymap)
|
|
||||||
|
|
||||||
;;;; Line Numbers
|
|
||||||
(define-obsolete-variable-alias
|
|
||||||
'rational-ui-line-numbers-enabled-modes
|
|
||||||
'crafted-ui-line-numbers-enabled-modes
|
|
||||||
"1")
|
|
||||||
(defcustom crafted-ui-line-numbers-enabled-modes
|
|
||||||
'(conf-mode prog-mode)
|
|
||||||
"Modes which should display line numbers."
|
|
||||||
:type 'list
|
|
||||||
:group 'crafted-ui)
|
|
||||||
|
|
||||||
(define-obsolete-variable-alias
|
|
||||||
'rational-ui-line-numbers-disabled-modes
|
|
||||||
'crafted-ui-line-numbers-disabled-modes
|
|
||||||
"1")
|
|
||||||
(defcustom crafted-ui-line-numbers-disabled-modes
|
|
||||||
'(org-mode)
|
|
||||||
"Modes which should not display line numbers.
|
|
||||||
Modes derived from the modes defined in
|
|
||||||
`crafted-ui-line-number-enabled-modes', but should not display line numbers."
|
|
||||||
:type 'list
|
|
||||||
:group 'crafted-ui)
|
|
||||||
|
|
||||||
(defun crafted-ui--enable-line-numbers-mode ()
|
|
||||||
"Turn on line numbers mode.
|
|
||||||
|
|
||||||
Used as hook for modes which should display line numbers."
|
|
||||||
(display-line-numbers-mode 1))
|
|
||||||
|
|
||||||
(defun crafted-ui--disable-line-numbers-mode ()
|
|
||||||
"Turn off line numbers mode.
|
|
||||||
|
|
||||||
Used as hook for modes which should not display line numebrs."
|
|
||||||
(display-line-numbers-mode -1))
|
|
||||||
|
|
||||||
(defun crafted-ui--update-line-numbers-display ()
|
|
||||||
"Update configuration for line numbers display."
|
|
||||||
(if crafted-ui-display-line-numbers
|
|
||||||
(progn
|
|
||||||
(dolist (mode crafted-ui-line-numbers-enabled-modes)
|
|
||||||
(add-hook (intern (format "%s-hook" mode))
|
|
||||||
#'crafted-ui--enable-line-numbers-mode))
|
|
||||||
(dolist (mode crafted-ui-line-numbers-disabled-modes)
|
|
||||||
(add-hook (intern (format "%s-hook" mode))
|
|
||||||
#'crafted-ui--disable-line-numbers-mode))
|
|
||||||
(setq-default
|
|
||||||
display-line-numbers-grow-only t
|
|
||||||
display-line-numbers-type t
|
|
||||||
display-line-numbers-width 2))
|
|
||||||
(progn
|
|
||||||
(dolist (mode crafted-ui-line-numbers-enabled-modes)
|
|
||||||
(remove-hook (intern (format "%s-hook" mode))
|
|
||||||
#'crafted-ui--enable-line-numbers-mode))
|
|
||||||
(dolist (mode crafted-ui-line-numbers-disabled-modes)
|
|
||||||
(remove-hook (intern (format "%s-hook" mode))
|
|
||||||
#'crafted-ui--disable-line-numbers-mode)))))
|
|
||||||
|
|
||||||
(define-obsolete-variable-alias
|
|
||||||
'rational-ui-display-line-numbers
|
|
||||||
'crafted-ui-display-line-numbers
|
|
||||||
"1")
|
|
||||||
(defcustom crafted-ui-display-line-numbers nil
|
|
||||||
"Whether line numbers should be enabled."
|
|
||||||
:type 'boolean
|
|
||||||
:group 'crafted-ui
|
|
||||||
:set (lambda (sym val)
|
|
||||||
(set-default sym val)
|
|
||||||
(crafted-ui--update-line-numbers-display)))
|
|
||||||
|
|
||||||
;;;; Elisp-Demos
|
|
||||||
|
|
||||||
;; also add some examples
|
|
||||||
(require 'elisp-demos)
|
|
||||||
(advice-add 'helpful-update :after #'elisp-demos-advice-helpful-update)
|
|
||||||
|
|
||||||
;; add visual pulse when changing focus, like beacon but built-in
|
|
||||||
;; from from https://karthinks.com/software/batteries-included-with-emacs/
|
|
||||||
(defun pulse-line (&rest _)
|
|
||||||
"Pulse the current line."
|
|
||||||
(pulse-momentary-highlight-one-line (point)))
|
|
||||||
|
|
||||||
(dolist (command '(scroll-up-command scroll-down-command
|
|
||||||
recenter-top-bottom other-window))
|
|
||||||
(advice-add command :after #'pulse-line))
|
|
||||||
|
|
||||||
(provide 'crafted-ui)
|
|
||||||
;;; crafted-ui.el ends here
|
|
||||||
@ -1,120 +0,0 @@
|
|||||||
;;; crafted-defaults.el -*- lexical-binding: t; -*-
|
|
||||||
|
|
||||||
;; Revert Dired and other buffers
|
|
||||||
(customize-set-variable 'global-auto-revert-non-file-buffers t)
|
|
||||||
;; Revert buffers when the underlying file has changed
|
|
||||||
(global-auto-revert-mode 1)
|
|
||||||
(setq global-auto-revert-non-file-buffers t) ;; TODO check
|
|
||||||
;; Line numbers
|
|
||||||
(global-display-line-numbers-mode 1)
|
|
||||||
(setq display-line-numbers-type `relative)
|
|
||||||
|
|
||||||
;; Typed text replaces the selection if the selection is active,
|
|
||||||
;; pressing delete or backspace deletes the selection.
|
|
||||||
(delete-selection-mode)
|
|
||||||
;; Use spaces instead of tabs // TODO Check!!
|
|
||||||
(setq-default indent-tabs-mode nil)
|
|
||||||
|
|
||||||
;; Use "y" and "n" to confirm/negate prompt instead of "yes" and "no"
|
|
||||||
;; Using `advice' here to make it easy to reverse in custom
|
|
||||||
;; configurations with `(advice-remove 'yes-or-no-p #'y-or-n-p)'
|
|
||||||
;;
|
|
||||||
;; N.B. Emacs 28 has a variable for using short answers, which should
|
|
||||||
;; be preferred if using that version or higher.
|
|
||||||
(if (boundp 'use-short-answers)
|
|
||||||
(setq use-short-answers t)
|
|
||||||
(advice-add 'yes-or-no-p :override #'y-or-n-p))
|
|
||||||
|
|
||||||
;; Turn on recentf mode
|
|
||||||
(add-hook 'after-init-hook #'recentf-mode)
|
|
||||||
(customize-set-variable 'recentf-save-file
|
|
||||||
(expand-file-name "recentf" crafted-config-var-directory))
|
|
||||||
|
|
||||||
;; Do not save duplicates in kill-ring
|
|
||||||
(customize-set-variable 'kill-do-not-save-duplicates t)
|
|
||||||
|
|
||||||
|
|
||||||
;; Make scrolling less stuttered // TODO emacs29 scroll check!!
|
|
||||||
;;(setq auto-window-vscroll nil)
|
|
||||||
;;(customize-set-variable 'fast-but-imprecise-scrolling t)
|
|
||||||
;;(customize-set-variable 'scroll-conservatively 101)
|
|
||||||
;;(customize-set-variable 'scroll-margin 0)
|
|
||||||
;;(customize-set-variable 'scroll-preserve-screen-position t)
|
|
||||||
|
|
||||||
;; Better support for files with long lines
|
|
||||||
(setq-default bidi-paragraph-direction 'left-to-right)
|
|
||||||
(setq-default bidi-inhibit-bpa t)
|
|
||||||
(global-so-long-mode 1)
|
|
||||||
|
|
||||||
;; Make shebang (#!) file executable when saved
|
|
||||||
(add-hook 'after-save-hook #'executable-make-buffer-file-executable-if-script-p)
|
|
||||||
|
|
||||||
;; Enable savehist-mode for command history
|
|
||||||
(savehist-mode 1)
|
|
||||||
|
|
||||||
;; Keep state files in `crafted-config-var-directory' by default
|
|
||||||
;; we use `with-eval-after-load' to only affect what is being used.
|
|
||||||
;;
|
|
||||||
;; Note that this can introduce issues depending on how each module
|
|
||||||
;; works. Like, for example, if the module reads those files during
|
|
||||||
;; load it may happen that it reads the file on its default location
|
|
||||||
;; before the path is changed (because this code runs after-load,
|
|
||||||
;; and user customization is run after all of crafted-emacs is loaded)
|
|
||||||
;;
|
|
||||||
;; So, each variable needs some thought on how/when to set it,
|
|
||||||
;; while also trying to not set variables for modules the user
|
|
||||||
;; is not loading / using.
|
|
||||||
|
|
||||||
;; Enable the sensible path defaults
|
|
||||||
(defcustom crafted-folders t
|
|
||||||
"Non-nil enabled 'sensible folder layout' behaviour."
|
|
||||||
:type 'boolean
|
|
||||||
:group 'crafted)
|
|
||||||
|
|
||||||
(defun crafted-defaults--sensible-path
|
|
||||||
(root varname name)
|
|
||||||
"Sets the VARNAME to a path named NAME inside ROOT.
|
|
||||||
But only if `crafted-folders' is enabled (`t').
|
|
||||||
|
|
||||||
For example (crafted-config-var-directory 'savehist-file \"history\")
|
|
||||||
Will set `savehist-file' to, ie, ~/.config/crafted-emacs/var/history"
|
|
||||||
(if-let ((path (expand-file-name name root))
|
|
||||||
(crafted-folders))
|
|
||||||
(customize-set-variable varname path)
|
|
||||||
))
|
|
||||||
|
|
||||||
(crafted-defaults--sensible-path crafted-config-var-directory
|
|
||||||
'savehist-file "history")
|
|
||||||
|
|
||||||
(crafted-defaults--sensible-path crafted-config-var-directory
|
|
||||||
'auto-save-list-file-prefix "auto-save-list/.saves-")
|
|
||||||
|
|
||||||
(with-eval-after-load 'saveplace
|
|
||||||
(crafted-defaults--sensible-path crafted-config-var-directory
|
|
||||||
'save-place-file "places"))
|
|
||||||
|
|
||||||
(with-eval-after-load 'bookmark
|
|
||||||
(crafted-defaults--sensible-path crafted-config-var-directory
|
|
||||||
'bookmark-default-file "bookmarks"))
|
|
||||||
|
|
||||||
(with-eval-after-load 'tramp
|
|
||||||
(crafted-defaults--sensible-path crafted-config-var-directory
|
|
||||||
'tramp-persistency-file-name
|
|
||||||
"tramp"))
|
|
||||||
|
|
||||||
(with-eval-after-load 'org-id
|
|
||||||
(crafted-defaults--sensible-path crafted-config-var-directory
|
|
||||||
'org-id-locations-file
|
|
||||||
"org-id-locations"))
|
|
||||||
|
|
||||||
(with-eval-after-load 'nsm
|
|
||||||
(crafted-defaults--sensible-path crafted-config-var-directory
|
|
||||||
'nsm-settings-file
|
|
||||||
"network-security.data"))
|
|
||||||
|
|
||||||
(with-eval-after-load 'project
|
|
||||||
(crafted-defaults--sensible-path crafted-config-var-directory
|
|
||||||
'project-list-file
|
|
||||||
"projects"))
|
|
||||||
|
|
||||||
(provide 'crafted-defaults)
|
|
||||||
98
.config/emacs/modules/crafted-editing.el
Normal file
98
.config/emacs/modules/crafted-editing.el
Normal file
@ -0,0 +1,98 @@
|
|||||||
|
;;; crafted-editing.el -*- lexical-binding: t; -*-
|
||||||
|
|
||||||
|
;; Copyright (C) 2022
|
||||||
|
;; SPDX-License-Identifier: MIT
|
||||||
|
|
||||||
|
;; Author: System Crafters Community
|
||||||
|
|
||||||
|
;; Commentary
|
||||||
|
|
||||||
|
;; Editing text configuration.
|
||||||
|
|
||||||
|
;;; Code:
|
||||||
|
|
||||||
|
;;; Helpers for defcustom variables
|
||||||
|
|
||||||
|
(defun crafted-editing--prefer-tabs (enable)
|
||||||
|
"Adjust whitespace configuration to support tabs based on ENABLE."
|
||||||
|
(if enable
|
||||||
|
(customize-set-variable 'whitespace-style
|
||||||
|
'(face empty trailing indentation::tab
|
||||||
|
space-after-tab::tab
|
||||||
|
space-before-tab::tab))
|
||||||
|
(customize-set-variable 'whitespace-style
|
||||||
|
'(face empty trailing tab-mark
|
||||||
|
indentation::space))))
|
||||||
|
|
||||||
|
(defun crafted-editing--enable-whitespace-modes (modes)
|
||||||
|
"Enable whitespace-mode for each mode specified by MODES."
|
||||||
|
(dolist (mode modes)
|
||||||
|
(add-hook (intern (format "%s-hook" mode))
|
||||||
|
#'whitespace-mode)))
|
||||||
|
|
||||||
|
(defun crafted-editing--disable-whitespace-modes (modes)
|
||||||
|
"Do not enable whitespace-mode for each mode specified by MODES."
|
||||||
|
(dolist (mode modes)
|
||||||
|
(remove-hook (intern (format "%s-hook" mode))
|
||||||
|
#'whitespace-mode)))
|
||||||
|
|
||||||
|
;;; Customization group for the Crafted Editing module.
|
||||||
|
(defgroup crafted-editing '()
|
||||||
|
"Editing related configuration for Crafted Emacs."
|
||||||
|
:tag "Crafted Editing"
|
||||||
|
:group 'crafted)
|
||||||
|
|
||||||
|
(define-obsolete-variable-alias
|
||||||
|
'rational-editing-prefer-tabs
|
||||||
|
'crafted-editing-prefer-tabs
|
||||||
|
"1")
|
||||||
|
|
||||||
|
;; provide an option for users who prefer tabs over spaces
|
||||||
|
(defcustom crafted-editing-prefer-tabs nil
|
||||||
|
"Prefer using tabs instead of spaces."
|
||||||
|
:tag "Prefer tabs over spaces"
|
||||||
|
:group 'crafted-editing
|
||||||
|
:set (lambda (sym val)
|
||||||
|
(set-default sym val)
|
||||||
|
(crafted-editing--prefer-tabs val)))
|
||||||
|
|
||||||
|
(define-obsolete-variable-alias
|
||||||
|
'rational-editing-whitespace-cleanup-enabled-modes
|
||||||
|
'crafted-editing-whitespace-cleanup-enabled-modes
|
||||||
|
"1")
|
||||||
|
|
||||||
|
;; whitespace cleanup configuration
|
||||||
|
(defcustom crafted-editing-whitespace-cleanup-enabled-modes
|
||||||
|
'(conf-mode prog-mode)
|
||||||
|
"Modes which should have whitespace cleanup enabled."
|
||||||
|
:type 'list
|
||||||
|
:tag "Whitespace cleanup enabled modes"
|
||||||
|
:group 'crafted-editing
|
||||||
|
:set (lambda (sym val)
|
||||||
|
(set-default sym val)
|
||||||
|
(crafted-editing--enable-whitespace-modes val)))
|
||||||
|
|
||||||
|
(define-obsolete-variable-alias
|
||||||
|
'rational-editing-whitespace-cleanup-disabled-modes
|
||||||
|
'crafted-editing-whitespace-cleanup-disabled-modes
|
||||||
|
"1")
|
||||||
|
|
||||||
|
(defcustom crafted-editing-whitespace-cleanup-disabled-modes
|
||||||
|
'(makefile-mode)
|
||||||
|
"Modes which should not have whitespace cleanup enabled."
|
||||||
|
:type 'list
|
||||||
|
:tag "Whitespace cleanup disabled modes"
|
||||||
|
:group 'crafted-editing
|
||||||
|
:set (lambda (sym val)
|
||||||
|
(set-default sym val)
|
||||||
|
(crafted-editing--disable-whitespace-modes val)))
|
||||||
|
|
||||||
|
;;; cleanup whitespace
|
||||||
|
(customize-set-variable 'whitespace-action '(cleanup auto-cleanup))
|
||||||
|
|
||||||
|
;;; parentheses
|
||||||
|
(electric-pair-mode 1) ; auto-insert matching bracket
|
||||||
|
(show-paren-mode 1) ; turn on paren match highlighting
|
||||||
|
|
||||||
|
(provide 'crafted-editing)
|
||||||
|
;;; crafted-editing.el ends here
|
||||||
135
.config/emacs/modules/crafted-latex.el
Normal file
135
.config/emacs/modules/crafted-latex.el
Normal file
@ -0,0 +1,135 @@
|
|||||||
|
;;; crafted-latex.el -*- lexical-binding: t; -*-
|
||||||
|
|
||||||
|
;; Copyright (C) 2022
|
||||||
|
;; SPDX-License-Identifier: MIT
|
||||||
|
|
||||||
|
;; Author: System Crafters Community
|
||||||
|
|
||||||
|
;; Commentary
|
||||||
|
|
||||||
|
;; Configure AUCTEX for editing LaTeX files. Provides customization
|
||||||
|
;; for various environments to provide some useful additions related
|
||||||
|
;; to drawing graphs and mathematical diagrams, and code listings.
|
||||||
|
|
||||||
|
;;; Code:
|
||||||
|
|
||||||
|
(defgroup crafted-latex '()
|
||||||
|
"LaTeX configuration for Crafted Emacs."
|
||||||
|
:tag "Crafted LaTeX"
|
||||||
|
:group 'crafted)
|
||||||
|
|
||||||
|
(defcustom crafted-latex-latexp (executable-find "latex")
|
||||||
|
"Fully qualified path to the `latex' executable"
|
||||||
|
:tag "`latex' executable location"
|
||||||
|
:group 'crafted-latex
|
||||||
|
:type 'string)
|
||||||
|
|
||||||
|
(defcustom crafted-latex-latexmkp (executable-find "latexmk")
|
||||||
|
"Fully qualified path to the `latexmk' executable"
|
||||||
|
:tag "`latexmk' executable location"
|
||||||
|
:group 'crafted-latex
|
||||||
|
:type 'string)
|
||||||
|
|
||||||
|
(defcustom crafted-latex-use-pdf-tools nil
|
||||||
|
"Use pdf-tools as the pdf reader
|
||||||
|
(this is automatic if you load `crafted-pdf-reader')"
|
||||||
|
:tag "Use pdf-tools as pdf reader"
|
||||||
|
:group 'crafted-latex
|
||||||
|
:type 'boolean)
|
||||||
|
|
||||||
|
(defcustom crafted-latex-inhibit-latexmk t
|
||||||
|
"When set to `nil', the package auctex-latexmk gets installed if the
|
||||||
|
latex and latexmk executable are found
|
||||||
|
This package contains a bug which might make it crash during loading
|
||||||
|
(with a bug related to tex-buf) on newer systems. For this reason, we inhibit
|
||||||
|
the installation of this package by default.
|
||||||
|
If you encounter the bug, you keep this package inhibited. You can install
|
||||||
|
a fix (not on melpa) with the following recipe, and the configuration in this file
|
||||||
|
will still work
|
||||||
|
'(auctex-latexmk :fetcher git :host github :repo \"wang1zhen/auctex-latexmk\")"
|
||||||
|
:tag "Inhibit using `latexmk' command from auxtex-latexmk"
|
||||||
|
:group 'crafted-latex
|
||||||
|
:type 'boolean)
|
||||||
|
|
||||||
|
|
||||||
|
;; only install and load auctex when the latex executable is found,
|
||||||
|
;; otherwise it crashes when loading
|
||||||
|
|
||||||
|
(when crafted-latex-latexp
|
||||||
|
(crafted-package-install-package 'auctex)
|
||||||
|
|
||||||
|
(with-eval-after-load 'latex
|
||||||
|
(customize-set-variable 'TeX-auto-save t)
|
||||||
|
(customize-set-variable 'TeX-parse-self t)
|
||||||
|
(setq-default TeX-master nil)
|
||||||
|
|
||||||
|
;; compile to pdf
|
||||||
|
(tex-pdf-mode)
|
||||||
|
|
||||||
|
;; correlate the source and the output
|
||||||
|
(TeX-source-correlate-mode)
|
||||||
|
|
||||||
|
;; set a correct indentation in a few additional environments
|
||||||
|
(add-to-list 'LaTeX-indent-environment-list '("lstlisting" current-indentation))
|
||||||
|
(add-to-list 'LaTeX-indent-environment-list '("tikzcd" LaTeX-indent-tabular))
|
||||||
|
(add-to-list 'LaTeX-indent-environment-list '("tikzpicture" current-indentation))
|
||||||
|
|
||||||
|
;; add a few macros and environment as verbatim
|
||||||
|
(add-to-list 'LaTeX-verbatim-environments "lstlisting")
|
||||||
|
(add-to-list 'LaTeX-verbatim-environments "Verbatim")
|
||||||
|
(add-to-list 'LaTeX-verbatim-macros-with-braces "lstinline")
|
||||||
|
(add-to-list 'LaTeX-verbatim-macros-with-delims "lstinline")
|
||||||
|
|
||||||
|
;; to use pdfview with auctex
|
||||||
|
(when crafted-latex-use-pdf-tools
|
||||||
|
(customize-set-variable 'TeX-view-program-selection '((output-pdf "PDF Tools")))
|
||||||
|
(customize-set-variable 'TeX-view-program-list '(("PDF Tools" TeX-pdf-tools-sync-view)))
|
||||||
|
(customize-set-variable 'TeX-source-correlate-start-server t))
|
||||||
|
|
||||||
|
;; electric pairs in auctex
|
||||||
|
(customize-set-variable 'TeX-electric-sub-and-superscript t)
|
||||||
|
(customize-set-variable 'LaTeX-electric-left-right-brace t)
|
||||||
|
(customize-set-variable 'TeX-electric-math (cons "$" "$"))
|
||||||
|
|
||||||
|
;; open all buffers with the math mode and auto-fill mode
|
||||||
|
(add-hook 'LaTeX-mode-hook #'auto-fill-mode)
|
||||||
|
(add-hook 'LaTeX-mode-hook #'LaTeX-math-mode)
|
||||||
|
|
||||||
|
;; add support for references
|
||||||
|
(add-hook 'LaTeX-mode-hook 'turn-on-reftex)
|
||||||
|
(customize-set-variable 'reftex-plug-into-AUCTeX t)
|
||||||
|
|
||||||
|
;; to have the buffer refresh after compilation
|
||||||
|
(add-hook 'TeX-after-compilation-finished-functions #'TeX-revert-document-buffer)))
|
||||||
|
|
||||||
|
;; message the user if the latex executable is not found
|
||||||
|
(add-hook 'tex-mode-hook
|
||||||
|
#'(lambda () (unless crafted-latex-latexp (message "latex executable not found"))))
|
||||||
|
|
||||||
|
;; The following is to use auctex with latexmk.
|
||||||
|
(defun crafted-latex--install-latexmk ()
|
||||||
|
"install the auctex-latexmk package when the latex and latexmk executable
|
||||||
|
are found (see `crafted-latex-inhibit-latexmk' )"
|
||||||
|
(when (and crafted-latex-latexp
|
||||||
|
crafted-latex-latexmkp)
|
||||||
|
(crafted-package-install-package 'auctex-latexmk)))
|
||||||
|
|
||||||
|
(defun crafted-latex--watch-inhibit-latexmk (sym val op buf)
|
||||||
|
"watcher for the `crafted-latex-inhibit-latexmk' variable"
|
||||||
|
(unless val
|
||||||
|
(crafted-latex--install-latexmk)))
|
||||||
|
|
||||||
|
(add-variable-watcher 'crafted-latex-inhibit-latexmk
|
||||||
|
#'crafted-latex--watch-inhibit-latexmk)
|
||||||
|
|
||||||
|
(when (and crafted-latex-latexp
|
||||||
|
crafted-latex-latexmkp)
|
||||||
|
(with-eval-after-load 'latex
|
||||||
|
(when (require 'auctex-latexmk nil 'noerror)
|
||||||
|
(with-eval-after-load 'auctex-latexmk
|
||||||
|
(auctex-latexmk-setup)
|
||||||
|
(customize-set-variable 'auctex-latexmk-inherit-TeX-PDF-mode t))
|
||||||
|
(add-hook 'TeX-mode-hook #'(lambda () (setq TeX-command-default "LatexMk"))))))
|
||||||
|
|
||||||
|
(provide 'crafted-latex)
|
||||||
|
;;; crafted-latex.el ends here
|
||||||
34
.config/emacs/modules/crafted-org.el
Normal file
34
.config/emacs/modules/crafted-org.el
Normal file
@ -0,0 +1,34 @@
|
|||||||
|
;;; crafted-org.el -*- lexical-binding: t; -*-
|
||||||
|
|
||||||
|
;; Copyright (C) 2022
|
||||||
|
;; SPDX-License-Identifier: MIT
|
||||||
|
|
||||||
|
;; Author: System Crafters Community
|
||||||
|
|
||||||
|
;; Commentary
|
||||||
|
|
||||||
|
;; Provides basic configuration for Org Mode.
|
||||||
|
|
||||||
|
;;; Code:
|
||||||
|
|
||||||
|
(crafted-package-install-package 'org-appear)
|
||||||
|
|
||||||
|
;; Return or left-click with mouse follows link
|
||||||
|
(customize-set-variable 'org-return-follows-link t)
|
||||||
|
(customize-set-variable 'org-mouse-1-follows-link t)
|
||||||
|
|
||||||
|
;; Display links as the description provided
|
||||||
|
(customize-set-variable 'org-link-descriptive t)
|
||||||
|
|
||||||
|
;; Hide markup markers
|
||||||
|
(customize-set-variable 'org-hide-emphasis-markers t)
|
||||||
|
(add-hook 'org-mode-hook 'org-appear-mode)
|
||||||
|
|
||||||
|
;; disable auto-pairing of "<" in org-mode
|
||||||
|
(add-hook 'org-mode-hook (lambda ()
|
||||||
|
(setq-local electric-pair-inhibit-predicate
|
||||||
|
`(lambda (c)
|
||||||
|
(if (char-equal c ?<) t (,electric-pair-inhibit-predicate c))))))
|
||||||
|
|
||||||
|
(provide 'crafted-org)
|
||||||
|
;;; crafted-org.el ends here
|
||||||
17
.config/emacs/modules/crafted-project.el
Normal file
17
.config/emacs/modules/crafted-project.el
Normal file
@ -0,0 +1,17 @@
|
|||||||
|
;;;; crafted-project.el --- Starting configuration for project management -*- lexical-binding: t; -*-
|
||||||
|
|
||||||
|
;; Copyright (C) 2022
|
||||||
|
;; SPDX-License-Identifier: MIT
|
||||||
|
|
||||||
|
;; Author: System Crafters Community
|
||||||
|
|
||||||
|
;;; Commentary
|
||||||
|
|
||||||
|
;; Provides default settings for project management with project.el
|
||||||
|
|
||||||
|
;;; Code:
|
||||||
|
|
||||||
|
(customize-set-variable 'project-list-file (expand-file-name "projects" crafted-config-var-directory))
|
||||||
|
|
||||||
|
(provide 'crafted-project)
|
||||||
|
;;; crafted-project.el ends here
|
||||||
@ -2,15 +2,15 @@
|
|||||||
(crafted-package-install-package 'dashboard)
|
(crafted-package-install-package 'dashboard)
|
||||||
|
|
||||||
(require 'dashboard)
|
(require 'dashboard)
|
||||||
|
(setq dashboard-projects-backend "project-el")
|
||||||
(setq dashboard-set-heading-icons t)
|
(setq dashboard-set-heading-icons t)
|
||||||
(setq dashboard-set-file-icons t)
|
(setq dashboard-set-file-icons t)
|
||||||
(setq dashboard-startup-banner 'logo) ;; use standard emacs logo as banner
|
|
||||||
(setq dashboard-center-content t) ;; set to 't' for centered content
|
(setq dashboard-center-content t) ;; set to 't' for centered content
|
||||||
(setq dashboard-items '((recents . 10)
|
(setq dashboard-items '((recents . 10)
|
||||||
(bookmarks . 5)))
|
(bookmarks . 5)))
|
||||||
;;(projects . 10))) // TODO after projectile
|
;;(projects . 10))) ;; TODO after projectile
|
||||||
(setq dashboard-set-footer t)
|
(setq dashboard-set-footer t)
|
||||||
(setq dashboard-page-separator "\n\n\f\n\n")
|
(setq dashboard-page-separator "\n\f\n")
|
||||||
(setq dashboard-set-navigator t)
|
(setq dashboard-set-navigator t)
|
||||||
;; Format: "(icon title help action face prefix suffix)"
|
;; Format: "(icon title help action face prefix suffix)"
|
||||||
(setq dashboard-navigator-buttons
|
(setq dashboard-navigator-buttons
|
||||||
@ -28,11 +28,10 @@
|
|||||||
(dashboard-modify-heading-icons '((recents . "file-text")
|
(dashboard-modify-heading-icons '((recents . "file-text")
|
||||||
(bookmarks . "book")))
|
(bookmarks . "book")))
|
||||||
|
|
||||||
(setq doom-fallback-buffer-name "*dashboard*")
|
(setq dashboard-startup-banner (expand-file-name "logo.png" user-emacs-directory))
|
||||||
|
|
||||||
(require 'linum)
|
(require 'linum)
|
||||||
(add-hook 'dashboard-mode-hook page-break-lines-mode)
|
(add-hook 'dashboard-mode-hook page-break-lines-mode)
|
||||||
|
|
||||||
|
|
||||||
(provide 'custom-dashboard)
|
(provide 'custom-dashboard)
|
||||||
;;; custom-dashboard.el end here
|
;;; custom-dashboard.el end here
|
||||||
|
|||||||
@ -1,109 +0,0 @@
|
|||||||
;;; crafted-evil.el --- Evil mode configuration -*- lexical-binding: t; -*-
|
|
||||||
|
|
||||||
;; Copyright (C) 2022
|
|
||||||
;; SPDX-License-Identifier: MIT
|
|
||||||
|
|
||||||
;; Author: System Crafters Community
|
|
||||||
|
|
||||||
;;; Commentary:
|
|
||||||
|
|
||||||
;; Evil mode configuration, for those who prefer `Vim' keybindings.
|
|
||||||
|
|
||||||
;;; Code:
|
|
||||||
|
|
||||||
(defgroup crafted-evil '()
|
|
||||||
"Vim-like related configuration for Crafted Emacs."
|
|
||||||
:tag "Crafted Evil"
|
|
||||||
:group 'crafted)
|
|
||||||
|
|
||||||
;; Define configuration variables
|
|
||||||
(define-obsolete-variable-alias
|
|
||||||
'rational-evil-discourage-arrow-keys
|
|
||||||
'crafted-evil-discourage-arrow-keys
|
|
||||||
"1")
|
|
||||||
(defcustom crafted-evil-discourage-arrow-keys nil
|
|
||||||
"When non-nil, prevent navigation with the arrow keys in Normal state."
|
|
||||||
:group 'crafted-evil
|
|
||||||
:type 'boolean)
|
|
||||||
|
|
||||||
(define-obsolete-variable-alias
|
|
||||||
'rational-evil-vim-muscle-memory
|
|
||||||
'crafted-evil-vim-muscle-memory
|
|
||||||
"1")
|
|
||||||
(defcustom crafted-evil-vim-muscle-memory nil
|
|
||||||
"When non-nil, let evil mode take some of the default keybindings, in order to make a more familiar Vim experience."
|
|
||||||
:group 'crafted-evil
|
|
||||||
:type 'boolean)
|
|
||||||
|
|
||||||
;; Install dependencies
|
|
||||||
(crafted-package-install-package 'evil)
|
|
||||||
(crafted-package-install-package 'evil-collection)
|
|
||||||
(crafted-package-install-package 'evil-nerd-commenter)
|
|
||||||
|
|
||||||
;; Turn on undo-tree globally
|
|
||||||
(when (< emacs-major-version 28)
|
|
||||||
(crafted-package-install-package 'undo-tree)
|
|
||||||
(global-undo-tree-mode))
|
|
||||||
|
|
||||||
;; Set some variables that must be configured before loading the package
|
|
||||||
(customize-set-variable 'evil-want-integration t)
|
|
||||||
(customize-set-variable 'evil-want-keybinding nil)
|
|
||||||
(customize-set-variable 'evil-want-C-i-jump nil)
|
|
||||||
(customize-set-variable 'evil-respect-visual-line-mode t)
|
|
||||||
;; C-h is backspace in insert state
|
|
||||||
(customize-set-variable 'evil-want-C-h-delete t)
|
|
||||||
(if (< emacs-major-version 28)
|
|
||||||
(customize-set-variable 'evil-undo-system 'undo-tree)
|
|
||||||
(customize-set-variable 'evil-undo-system 'undo-redo))
|
|
||||||
|
|
||||||
(when crafted-evil-vim-muscle-memory
|
|
||||||
(customize-set-variable 'evil-want-C-i-jump t)
|
|
||||||
(customize-set-variable 'evil-want-Y-yank-to-eol t)
|
|
||||||
(customize-set-variable 'evil-want-fine-undo t))
|
|
||||||
|
|
||||||
;; Load Evil and enable it globally
|
|
||||||
(require 'evil)
|
|
||||||
(evil-mode 1)
|
|
||||||
|
|
||||||
;; Make evil search more like vim
|
|
||||||
(evil-select-search-module 'evil-search-module 'evil-search)
|
|
||||||
|
|
||||||
;; Turn on Evil Nerd Commenter
|
|
||||||
(evilnc-default-hotkeys)
|
|
||||||
|
|
||||||
;; Make C-g revert to normal state
|
|
||||||
(define-key evil-insert-state-map (kbd "C-g") 'evil-normal-state)
|
|
||||||
|
|
||||||
;; Rebind `universal-argument' to 'C-M-u' since 'C-u' now scrolls the buffer
|
|
||||||
(global-set-key (kbd "C-M-u") 'universal-argument)
|
|
||||||
|
|
||||||
;; Use visual line motions even outside of visual-line-mode buffers
|
|
||||||
(evil-global-set-key 'motion "j" 'evil-next-visual-line)
|
|
||||||
(evil-global-set-key 'motion "k" 'evil-previous-visual-line)
|
|
||||||
|
|
||||||
(defun crafted-evil/discourage-arrow-keys ()
|
|
||||||
(interactive)
|
|
||||||
(message "Use HJKL keys instead!"))
|
|
||||||
|
|
||||||
(when crafted-evil-discourage-arrow-keys
|
|
||||||
;; Disable arrow keys in normal and visual modes
|
|
||||||
(define-key evil-normal-state-map (kbd "<left>") 'crafted-evil/discourage-arrow-keys)
|
|
||||||
(define-key evil-normal-state-map (kbd "<right>") 'crafted-evil/discourage-arrow-keys)
|
|
||||||
(define-key evil-normal-state-map (kbd "<down>") 'crafted-evil/discourage-arrow-keys)
|
|
||||||
(define-key evil-normal-state-map (kbd "<up>") 'crafted-evil/discourage-arrow-keys)
|
|
||||||
(evil-global-set-key 'motion (kbd "<left>") 'crafted-evil/discourage-arrow-keys)
|
|
||||||
(evil-global-set-key 'motion (kbd "<right>") 'crafted-evil/discourage-arrow-keys)
|
|
||||||
(evil-global-set-key 'motion (kbd "<down>") 'crafted-evil/discourage-arrow-keys)
|
|
||||||
(evil-global-set-key 'motion (kbd "<up>") 'crafted-evil/discourage-arrow-keys))
|
|
||||||
|
|
||||||
;; Make sure some modes start in Emacs state
|
|
||||||
;; TODO: Split this out to other configuration modules?
|
|
||||||
(dolist (mode '(custom-mode
|
|
||||||
eshell-mode
|
|
||||||
term-mode))
|
|
||||||
(add-to-list 'evil-emacs-state-modes mode))
|
|
||||||
|
|
||||||
(evil-collection-init)
|
|
||||||
|
|
||||||
(provide 'crafted-evil)
|
|
||||||
;;; crafted-evil.el ends here
|
|
||||||
22
.config/emacs/modules/custom-org.el
Normal file
22
.config/emacs/modules/custom-org.el
Normal file
@ -0,0 +1,22 @@
|
|||||||
|
;;; custom-org.el -*- lexical-binding: t; -*-
|
||||||
|
(crafted-package-install-package 'org-appear)
|
||||||
|
|
||||||
|
;; Return or left-click with mouse follows link
|
||||||
|
(customize-set-variable 'org-return-follows-link t)
|
||||||
|
(customize-set-variable 'org-mouse-1-follows-link t)
|
||||||
|
|
||||||
|
;; Display links as the description provided
|
||||||
|
(customize-set-variable 'org-link-descriptive t)
|
||||||
|
|
||||||
|
;; Hide markup markers
|
||||||
|
(customize-set-variable 'org-hide-emphasis-markers t)
|
||||||
|
(add-hook 'org-mode-hook 'org-appear-mode)
|
||||||
|
|
||||||
|
;; disable auto-pairing of "<" in org-mode
|
||||||
|
(add-hook 'org-mode-hook (lambda ()
|
||||||
|
(setq-local electric-pair-inhibit-predicate
|
||||||
|
`(lambda (c)
|
||||||
|
(if (char-equal c ?<) t (,electric-pair-inhibit-predicate c))))))
|
||||||
|
|
||||||
|
(provide 'custom-org)
|
||||||
|
;;; custom-org.el ends here
|
||||||
Reference in New Issue
Block a user