.spacemacs 40 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871
  1. ;; -*- mode: emacs-lisp -*-
  2. ;; This file is loaded by Spacemacs at startup.
  3. ;; It must be stored in your home directory.
  4. (defun dotspacemacs/layers ()
  5. "Layer configuration:
  6. This function should only modify configuration layer settings."
  7. (setq-default
  8. ;; Base distribution to use. This is a layer contained in the directory
  9. ;; `+distribution'. For now available distributions are `spacemacs-base'
  10. ;; or `spacemacs'. (default 'spacemacs)
  11. dotspacemacs-distribution 'spacemacs
  12. ;; Lazy installation of layers (i.e. layers are installed only when a file
  13. ;; with a supported type is opened). Possible values are `all', `unused'
  14. ;; and `nil'. `unused' will lazy install only unused layers (i.e. layers
  15. ;; not listed in variable `dotspacemacs-configuration-layers'), `all' will
  16. ;; lazy install any layer that support lazy installation even the layers
  17. ;; listed in `dotspacemacs-configuration-layers'. `nil' disable the lazy
  18. ;; installation feature and you have to explicitly list a layer in the
  19. ;; variable `dotspacemacs-configuration-layers' to install it.
  20. ;; (default 'unused)
  21. dotspacemacs-enable-lazy-installation 'unused
  22. ;; If non-nil then Spacemacs will ask for confirmation before installing
  23. ;; a layer lazily. (default t)
  24. dotspacemacs-ask-for-lazy-installation t
  25. ;; If non-nil layers with lazy install support are lazy installed.
  26. ;; List of additional paths where to look for configuration layers.
  27. ;; Paths must have a trailing slash (i.e. `~/.mycontribs/')
  28. dotspacemacs-configuration-layer-path '()
  29. ;; List of configuration layers to load.
  30. dotspacemacs-configuration-layers
  31. '(rust
  32. ruby
  33. helm
  34. emacs-lisp
  35. ; extra layers
  36. python
  37. auto-completion
  38. better-defaults
  39. git
  40. markdown
  41. notmuch
  42. (org :variables
  43. org-enable-priority-commands t
  44. org-enable-reveal-js-support t
  45. org-enable-github-support t
  46. org-enable-hugo-support t
  47. org-enable-org-journal-support t)
  48. shell
  49. spell-checking
  50. (syntax-checking :variables
  51. syntax-checking-enable-by-default t)
  52. version-control
  53. ansible
  54. asciidoc
  55. bm
  56. lsp
  57. (colors :variables
  58. colors-enable-nyan-cat-progress-bar t)
  59. csv
  60. osx
  61. docker
  62. (elfeed :variables
  63. rmh-elfeed-org-files (list "~/org/feeds.org"))
  64. html
  65. javascript
  66. ;;mastodon
  67. github
  68. go
  69. gtags
  70. (python :variables
  71. python-backend 'lsp)
  72. restclient
  73. react
  74. pass
  75. scheme
  76. spotify
  77. search-engine
  78. theming
  79. terraform
  80. typography
  81. tmux
  82. yaml
  83. )
  84. ;; List of additional packages that will be installed without being
  85. ;; wrapped in a layer. If you need some configuration for these
  86. ;; packages, then consider creating a layer. You can also put the
  87. ;; configuration in `dotspacemacs/user-config'.
  88. ;; To use a local version of a package, use the `:location' property:
  89. ;; '(your-package :location "~/path/to/your-package/")
  90. ;; Also include the dependencies as they will not be resolved automatically.
  91. dotspacemacs-additional-packages '(
  92. beacon
  93. blacken
  94. direnv
  95. all-the-icons
  96. all-the-icons-dired
  97. doom-themes
  98. forecast
  99. git-link
  100. w3m
  101. orgbox
  102. eww
  103. olivetti
  104. helm-eww
  105. line-reminder
  106. org-web-tools
  107. org-gcal
  108. atomic-chrome
  109. swiper
  110. rjsx-mode
  111. (declutter :location (recipe
  112. :fetcher github
  113. :repo "sanel/declutter"))
  114. )
  115. ;; A list of packages that cannot be updated.
  116. dotspacemacs-frozen-packages '()
  117. ;; A list of packages that will not be installed and loaded.
  118. dotspacemacs-excluded-packages '()
  119. ;; Defines the behaviour of Spacemacs when installing packages.
  120. ;; Possible values are `used-only', `used-but-keep-unused' and `all'.
  121. ;; `used-only' installs only explicitly used packages and deletes any unused
  122. ;; packages as well as their unused dependencies. `used-but-keep-unused'
  123. ;; installs only the used packages but won't delete unused ones. `all'
  124. ;; installs *all* packages supported by Spacemacs and never uninstalls them.
  125. ;; (default is `used-only')
  126. dotspacemacs-install-packages 'used-only))
  127. (defun dotspacemacs/init ()
  128. "Initialization:
  129. This function is called at the very beginning of Spacemacs startup,
  130. before layer configuration.
  131. It should only modify the values of Spacemacs settings."
  132. ;; This setq-default sexp is an exhaustive list of all the supported
  133. ;; spacemacs settings.
  134. (setq-default
  135. ;; If non-nil then enable support for the portable dumper. You'll need
  136. ;; to compile Emacs 27 from source following the instructions in file
  137. ;; EXPERIMENTAL.org at to root of the git repository.
  138. ;; (default nil)
  139. dotspacemacs-enable-emacs-pdumper nil
  140. ;; File path pointing to emacs 27.1 executable compiled with support
  141. ;; for the portable dumper (this is currently the branch pdumper).
  142. ;; (default "emacs-27.0.50")
  143. dotspacemacs-emacs-pdumper-executable-file "emacs-27.0.50"
  144. ;; Name of the Spacemacs dump file. This is the file will be created by the
  145. ;; portable dumper in the cache directory under dumps sub-directory.
  146. ;; To load it when starting Emacs add the parameter `--dump-file'
  147. ;; when invoking Emacs 27.1 executable on the command line, for instance:
  148. ;; ./emacs --dump-file=~/.emacs.d/.cache/dumps/spacemacs.pdmp
  149. ;; (default spacemacs.pdmp)
  150. dotspacemacs-emacs-dumper-dump-file "spacemacs.pdmp"
  151. ;; If non-nil ELPA repositories are contacted via HTTPS whenever it's
  152. ;; possible. Set it to nil if you have no way to use HTTPS in your
  153. ;; environment, otherwise it is strongly recommended to let it set to t.
  154. ;; This variable has no effect if Emacs is launched with the parameter
  155. ;; `--insecure' which forces the value of this variable to nil.
  156. ;; (default t)
  157. dotspacemacs-elpa-https t
  158. ;; Maximum allowed time in seconds to contact an ELPA repository.
  159. ;; (default 5)
  160. dotspacemacs-elpa-timeout 5
  161. ;; Set `gc-cons-threshold' and `gc-cons-percentage' when startup finishes.
  162. ;; This is an advanced option and should not be changed unless you suspect
  163. ;; performance issues due to garbage collection operations.
  164. ;; (default '(100000000 0.1))
  165. dotspacemacs-gc-cons '(100000000 0.1)
  166. ;; If non-nil then Spacelpa repository is the primary source to install
  167. ;; a locked version of packages. If nil then Spacemacs will install the
  168. ;; latest version of packages from MELPA. (default nil)
  169. dotspacemacs-use-spacelpa nil
  170. ;; If non-nil then verify the signature for downloaded Spacelpa archives.
  171. ;; (default nil)
  172. dotspacemacs-verify-spacelpa-archives nil
  173. ;; If non-nil then spacemacs will check for updates at startup
  174. ;; when the current branch is not `develop'. Note that checking for
  175. ;; new versions works via git commands, thus it calls GitHub services
  176. ;; whenever you start Emacs. (default nil)
  177. dotspacemacs-check-for-update nil
  178. ;; If non-nil, a form that evaluates to a package directory. For example, to
  179. ;; use different package directories for different Emacs versions, set this
  180. ;; to `emacs-version'. (default 'emacs-version)
  181. dotspacemacs-elpa-subdirectory 'emacs-version
  182. ;; One of `vim', `emacs' or `hybrid'.
  183. ;; `hybrid' is like `vim' except that `insert state' is replaced by the
  184. ;; `hybrid state' with `emacs' key bindings. The value can also be a list
  185. ;; with `:variables' keyword (similar to layers). Check the editing styles
  186. ;; section of the documentation for details on available variables.
  187. ;; (default 'vim)
  188. dotspacemacs-editing-style 'vim
  189. ;; If non-nil output loading progress in `*Messages*' buffer. (default nil)
  190. dotspacemacs-verbose-loading nil
  191. ;; Specify the startup banner. Default value is `official', it displays
  192. ;; the official spacemacs logo. An integer value is the index of text
  193. ;; banner, `random' chooses a random text banner in `core/banners'
  194. ;; directory. A string value must be a path to an image format supported
  195. ;; by your Emacs build.
  196. ;; If the value is nil then no banner is displayed. (default 'official)
  197. dotspacemacs-startup-banner 'official
  198. ;; List of items to show in startup buffer or an association list of
  199. ;; the form `(list-type . list-size)`. If nil then it is disabled.
  200. ;; Possible values for list-type are:
  201. ;; `recents' `bookmarks' `projects' `agenda' `todos'.
  202. ;; List sizes may be nil, in which case
  203. ;; `spacemacs-buffer-startup-lists-length' takes effect.
  204. dotspacemacs-startup-lists '((recents . 5)
  205. (projects . 7))
  206. ;; True if the home buffer should respond to resize events. (default t)
  207. dotspacemacs-startup-buffer-responsive t
  208. ;; Default major mode of the scratch buffer (default `text-mode')
  209. dotspacemacs-scratch-mode 'text-mode
  210. ;; Initial message in the scratch buffer, such as "Welcome to Spacemacs!"
  211. ;; (default nil)
  212. dotspacemacs-initial-scratch-message nil
  213. ;; List of themes, the first of the list is loaded when spacemacs starts.
  214. ;; Press `SPC T n' to cycle to the next theme in the list (works great
  215. ;; with 2 themes variants, one dark and one light)
  216. dotspacemacs-themes '(spacemacs-dark
  217. spacemacs-light)
  218. ;; Set the theme for the Spaceline. Supported themes are `spacemacs',
  219. ;; `all-the-icons', `custom', `vim-powerline' and `vanilla'. The first three
  220. ;; are spaceline themes. `vanilla' is default Emacs mode-line. `custom' is a
  221. ;; user defined themes, refer to the DOCUMENTATION.org for more info on how
  222. ;; to create your own spaceline theme. Value can be a symbol or list with\
  223. ;; additional properties.
  224. ;; (default '(spacemacs :separator wave :separator-scale 1.5))
  225. dotspacemacs-mode-line-theme '(spacemacs :separator wave :separator-scale 1.2)
  226. ;; If non-nil the cursor color matches the state color in GUI Emacs.
  227. ;; (default t)
  228. dotspacemacs-colorize-cursor-according-to-state t
  229. ;; Default font, or prioritized list of fonts. `powerline-scale' allows to
  230. ;; quickly tweak the mode-line size to make separators look not too crappy.
  231. dotspacemacs-default-font '("Inconsolata Nerd Font"
  232. :size 18
  233. :weight normal
  234. :width normal)
  235. ;; The leader key (default "SPC")
  236. dotspacemacs-leader-key "SPC"
  237. ;; The key used for Emacs commands `M-x' (after pressing on the leader key).
  238. ;; (default "SPC")
  239. dotspacemacs-emacs-command-key "SPC"
  240. ;; The key used for Vim Ex commands (default ":")
  241. dotspacemacs-ex-command-key ":"
  242. ;; The leader key accessible in `emacs state' and `insert state'
  243. ;; (default "M-m")
  244. dotspacemacs-emacs-leader-key "M-m"
  245. ;; Major mode leader key is a shortcut key which is the equivalent of
  246. ;; pressing `<leader> m`. Set it to `nil` to disable it. (default ",")
  247. dotspacemacs-major-mode-leader-key ","
  248. ;; Major mode leader key accessible in `emacs state' and `insert state'.
  249. ;; (default "C-M-m")
  250. dotspacemacs-major-mode-emacs-leader-key "C-M-m"
  251. ;; These variables control whether separate commands are bound in the GUI to
  252. ;; the key pairs `C-i', `TAB' and `C-m', `RET'.
  253. ;; Setting it to a non-nil value, allows for separate commands under `C-i'
  254. ;; and TAB or `C-m' and `RET'.
  255. ;; In the terminal, these pairs are generally indistinguishable, so this only
  256. ;; works in the GUI. (default nil)
  257. dotspacemacs-distinguish-gui-tab nil
  258. ;; Name of the default layout (default "Default")
  259. dotspacemacs-default-layout-name "Default"
  260. ;; If non-nil the default layout name is displayed in the mode-line.
  261. ;; (default nil)
  262. dotspacemacs-display-default-layout nil
  263. ;; If non-nil then the last auto saved layouts are resumed automatically upon
  264. ;; start. (default nil)
  265. dotspacemacs-auto-resume-layouts nil
  266. ;; If non-nil, auto-generate layout name when creating new layouts. Only has
  267. ;; effect when using the "jump to layout by number" commands. (default nil)
  268. dotspacemacs-auto-generate-layout-names nil
  269. ;; Size (in MB) above which spacemacs will prompt to open the large file
  270. ;; literally to avoid performance issues. Opening a file literally means that
  271. ;; no major mode or minor modes are active. (default is 1)
  272. dotspacemacs-large-file-size 1
  273. ;; Location where to auto-save files. Possible values are `original' to
  274. ;; auto-save the file in-place, `cache' to auto-save the file to another
  275. ;; file stored in the cache directory and `nil' to disable auto-saving.
  276. ;; (default 'cache)
  277. dotspacemacs-auto-save-file-location 'cache
  278. ;; Maximum number of rollback slots to keep in the cache. (default 5)
  279. dotspacemacs-max-rollback-slots 5
  280. ;; If non-nil, the paste transient-state is enabled. While enabled, pressing
  281. ;; `p' several times cycles through the elements in the `kill-ring'.
  282. ;; (default nil)
  283. dotspacemacs-enable-paste-transient-state nil
  284. ;; Which-key delay in seconds. The which-key buffer is the popup listing
  285. ;; the commands bound to the current keystroke sequence. (default 0.4)
  286. dotspacemacs-which-key-delay 0.4
  287. ;; Which-key frame position. Possible values are `right', `bottom' and
  288. ;; `right-then-bottom'. right-then-bottom tries to display the frame to the
  289. ;; right; if there is insufficient space it displays it at the bottom.
  290. ;; (default 'bottom)
  291. dotspacemacs-which-key-position 'bottom
  292. ;; Control where `switch-to-buffer' displays the buffer. If nil,
  293. ;; `switch-to-buffer' displays the buffer in the current window even if
  294. ;; another same-purpose window is available. If non-nil, `switch-to-buffer'
  295. ;; displays the buffer in a same-purpose window even if the buffer can be
  296. ;; displayed in the current window. (default nil)
  297. dotspacemacs-switch-to-buffer-prefers-purpose nil
  298. ;; If non-nil a progress bar is displayed when spacemacs is loading. This
  299. ;; may increase the boot time on some systems and emacs builds, set it to
  300. ;; nil to boost the loading time. (default t)
  301. dotspacemacs-loading-progress-bar t
  302. ;; If non-nil the frame is fullscreen when Emacs starts up. (default nil)
  303. ;; (Emacs 24.4+ only)
  304. dotspacemacs-fullscreen-at-startup nil
  305. ;; If non-nil `spacemacs/toggle-fullscreen' will not use native fullscreen.
  306. ;; Use to disable fullscreen animations in OSX. (default nil)
  307. dotspacemacs-fullscreen-use-non-native nil
  308. ;; If non-nil the frame is maximized when Emacs starts up.
  309. ;; Takes effect only if `dotspacemacs-fullscreen-at-startup' is nil.
  310. ;; (default nil) (Emacs 24.4+ only)
  311. dotspacemacs-maximized-at-startup nil
  312. ;; A value from the range (0..100), in increasing opacity, which describes
  313. ;; the transparency level of a frame when it's active or selected.
  314. ;; Transparency can be toggled through `toggle-transparency'. (default 90)
  315. dotspacemacs-active-transparency 90
  316. ;; A value from the range (0..100), in increasing opacity, which describes
  317. ;; the transparency level of a frame when it's inactive or deselected.
  318. ;; Transparency can be toggled through `toggle-transparency'. (default 90)
  319. dotspacemacs-inactive-transparency 90
  320. ;; If non-nil show the titles of transient states. (default t)
  321. dotspacemacs-show-transient-state-title t
  322. ;; If non-nil show the color guide hint for transient state keys. (default t)
  323. dotspacemacs-show-transient-state-color-guide t
  324. ;; If non-nil unicode symbols are displayed in the mode line.
  325. ;; If you use Emacs as a daemon and wants unicode characters only in GUI set
  326. ;; the value to quoted `display-graphic-p'. (default t)
  327. dotspacemacs-mode-line-unicode-symbols t
  328. ;; If non-nil smooth scrolling (native-scrolling) is enabled. Smooth
  329. ;; scrolling overrides the default behavior of Emacs which recenters point
  330. ;; when it reaches the top or bottom of the screen. (default t)
  331. dotspacemacs-smooth-scrolling t
  332. ;; Control line numbers activation.
  333. ;; If set to `t' or `relative' line numbers are turned on in all `prog-mode' and
  334. ;; `text-mode' derivatives. If set to `relative', line numbers are relative.
  335. ;; This variable can also be set to a property list for finer control:
  336. ;; '(:relative nil
  337. ;; :disabled-for-modes dired-mode
  338. ;; doc-view-mode
  339. ;; markdown-mode
  340. ;; org-mode
  341. ;; pdf-view-mode
  342. ;; text-mode
  343. ;; :size-limit-kb 1000)
  344. ;; (default nil)
  345. dotspacemacs-line-numbers 'relative
  346. ;; Code folding method. Possible values are `evil' and `origami'.
  347. ;; (default 'evil)
  348. dotspacemacs-folding-method 'evil
  349. ;; If non-nil `smartparens-strict-mode' will be enabled in programming modes.
  350. ;; (default nil)
  351. dotspacemacs-smartparens-strict-mode nil
  352. ;; If non-nil pressing the closing parenthesis `)' key in insert mode passes
  353. ;; over any automatically added closing parenthesis, bracket, quote, etc…
  354. ;; This can be temporary disabled by pressing `C-q' before `)'. (default nil)
  355. dotspacemacs-smart-closing-parenthesis nil
  356. ;; Select a scope to highlight delimiters. Possible values are `any',
  357. ;; `current', `all' or `nil'. Default is `all' (highlight any scope and
  358. ;; emphasis the current one). (default 'all)
  359. dotspacemacs-highlight-delimiters 'all
  360. ;; If non-nil, start an Emacs server if one is not already running.
  361. ;; (default nil)
  362. dotspacemacs-enable-server nil
  363. ;; Set the emacs server socket location.
  364. ;; If nil, uses whatever the Emacs default is, otherwise a directory path
  365. ;; like \"~/.emacs.d/server\". It has no effect if
  366. ;; `dotspacemacs-enable-server' is nil.
  367. ;; (default nil)
  368. dotspacemacs-server-socket-dir nil
  369. ;; If non-nil, advise quit functions to keep server open when quitting.
  370. ;; (default nil)
  371. dotspacemacs-persistent-server nil
  372. ;; List of search tool executable names. Spacemacs uses the first installed
  373. ;; tool of the list. Supported tools are `rg', `ag', `pt', `ack' and grep'.
  374. ;; (default '("rg" "ag" "pt" "ack" "grep"))
  375. dotspacemacs-search-tools '("rg" "ag" "pt" "ack" "grep")
  376. ;; Format specification for setting the frame title.
  377. ;; %a - the `abbreviated-file-name', or `buffer-name'
  378. ;; %t - `projectile-project-name'
  379. ;; %I - `invocation-name'
  380. ;; %S - `system-name'
  381. ;; %U - contents of $USER
  382. ;; %b - buffer name
  383. ;; %f - visited file name
  384. ;; %F - frame name
  385. ;; %s - process status
  386. ;; %p - percent of buffer above top of window, or Top, Bot or All
  387. ;; %P - percent of buffer above bottom of window, perhaps plus Top, or Bot or All
  388. ;; %m - mode name
  389. ;; %n - Narrow if appropriate
  390. ;; %z - mnemonics of buffer, terminal, and keyboard coding systems
  391. ;; %Z - like %z, but including the end-of-line format
  392. ;; (default "%I@%S")
  393. dotspacemacs-frame-title-format "%I@%S"
  394. ;; Format specification for setting the icon title format
  395. ;; (default nil - same as frame-title-format)
  396. dotspacemacs-icon-title-format nil
  397. ;; Delete whitespace while saving buffer. Possible values are `all'
  398. ;; to aggressively delete empty line and long sequences of whitespace,
  399. ;; `trailing' to delete only the whitespace at end of lines, `changed' to
  400. ;; delete only whitespace for changed lines or `nil' to disable cleanup.
  401. ;; (default nil)
  402. dotspacemacs-whitespace-cleanup nil
  403. ;; Either nil or a number of seconds. If non-nil zone out after the specified
  404. ;; number of seconds. (default nil)
  405. dotspacemacs-zone-out-when-idle nil
  406. ;; Run `spacemacs/prettify-org-buffer' when
  407. ;; visiting README.org files of Spacemacs.
  408. ;; (default nil)
  409. dotspacemacs-pretty-docs nil))
  410. (defun dotspacemacs/user-env ()
  411. "Environment variables setup.
  412. This function defines the environment variables for your Emacs session. By
  413. default it calls `spacemacs/load-spacemacs-env' which loads the environment
  414. variables declared in `~/.spacemacs.env' or `~/.spacemacs.d/.spacemacs.env'.
  415. See the header of this file for more information."
  416. (spacemacs/load-spacemacs-env))
  417. (defun dotspacemacs/user-init ()
  418. "Initialization for user code:
  419. This function is called immediately after `dotspacemacs/init', before layer
  420. configuration.
  421. It is mostly for variables that should be set before packages are loaded.
  422. If you are unsure, try setting them in `dotspacemacs/user-config' first."
  423. )
  424. (defun dotspacemacs/user-load ()
  425. "Library to load while dumping.
  426. This function is called only while dumping Spacemacs configuration. You can
  427. `require' or `load' the libraries of your choice that will be included in the
  428. dump."
  429. )
  430. (defun dotspacemacs/user-config ()
  431. "Configuration for user code:
  432. This function is called at the very end of Spacemacs startup, after layer
  433. configuration.
  434. Put your configuration code here, except for variables that should be set
  435. before packages are loaded."
  436. (global-set-key (kbd "<M-up>") 'shrink-window)
  437. (global-set-key (kbd "<M-down>") 'enlarge-window)
  438. (global-set-key (kbd "<M-left>") 'shrink-window-horizontally)
  439. (global-set-key (kbd "<M-right>") 'enlarge-window-horizontally)
  440. (setq mastodon-instance-url "https://mastodon.technology")
  441. ; Set consistent 2-space indenting in JS and JSX files
  442. (setq-default
  443. ;; js2-mode
  444. js2-basic-offset 2
  445. ;; web-mode
  446. css-indent-offset 2
  447. web-mode-markup-indent-offset 2
  448. web-mode-css-indent-offset 2
  449. web-mode-code-indent-offset 2
  450. web-mode-attr-indent-offset 2)
  451. ; Speed up cursor
  452. (setq auto-window-vscroll nil)
  453. ; Auto format python on save ... helpful, but not in collab repos :)
  454. ;(setq-default dotspacemacs-configuration-layers '((python :variables python-enable-yapf-format-on-save t)))
  455. (setq python-shell-interpreter "python3")
  456. (setq python-indent-offset 4)
  457. ; Becaons!
  458. (beacon-mode 1)
  459. (setq beacon-color "#00FFFF")
  460. ;; Set magit autocompletion
  461. (setq magit-repository-directories '("~/devel/"))
  462. ;; packages
  463. (when (>= emacs-major-version 24)
  464. (require 'package)
  465. (package-initialize)
  466. (add-to-list 'package-archives '("melpa" . "http://melpa.milkbox.net/packages/") t)
  467. )
  468. ; Add notice for lines over 80 chars
  469. (setq-default
  470. whitespace-line-column 88
  471. whitespace-style '(face lines-tail))
  472. (add-hook 'prog-mode-hook #'whitespace-mode)
  473. ;; Arrowed powerline
  474. ;; re-saturate powerline separators
  475. (setq ns-use-srgb-colorspace nil)
  476. ;(setq powerline-default-separator 'utf-8)
  477. ;; Allow K8s access via timonier
  478. (setq timonier-k8s-proxy "http://localhost:8001")
  479. (doom-themes-org-config)
  480. (doom-themes-neotree-config)
  481. (setq ispell-program-name "/usr/local/bin/aspell")
  482. ; Load ALL THE FONTS!
  483. (require 'all-the-icons)
  484. (add-hook 'dired-mode-hook 'all-the-icons-dired-mode)
  485. (setq org-reveal-root "http://cdn.jsdelivr.net/reveal.js/3.0.0/")
  486. ;; Custom org-mode settings for Dropbox syncing
  487. (require 'direnv)
  488. ;; Make all links actionable
  489. ;; http://xenodium.com/#actionable-urls-in-emacs-buffers
  490. (use-package goto-addr
  491. :hook ((compilation-mode . goto-address-mode)
  492. (prog-mode . goto-address-prog-mode)
  493. (eshell-mode . goto-address-mode)
  494. (shell-mode . goto-address-mode))
  495. :bind (:map goto-address-highlight-keymap
  496. ("<RET>" . goto-address-at-point)
  497. ("M-<RET>" . newline))
  498. :commands (goto-address-prog-mode
  499. goto-address-mode))
  500. (setq org-todo-keywords '((sequence "TODO(t)" "NEXT(n)" "PROJ(p)" "|" "DONE(d)")
  501. (sequence "HOLD(h)" "|")
  502. (sequence "|" "CANCELED(c)"))
  503. )
  504. (setq org-agenda-custom-commands
  505. '(
  506. ("n" todo "NEXT")
  507. ("h" todo "HOLD")
  508. ("d" "Agenda + Next Actions" ((agenda) (todo "NEXT")))
  509. ))
  510. (setq org-tag-alist '(("@home" . ?h)
  511. ("@personal" . ?p)
  512. ("@town" . ?t)
  513. ("@farm" . ?f)
  514. ("@church" . ?c)
  515. ("@read" . ?r)
  516. ("@errand" . ?e)
  517. ("@office" . ?w))
  518. )
  519. (setq confluence-url "https://elationhealth.atlassian.net/wiki/rpc/xmlrpc")
  520. (setq spaceline-org-clock-p t)
  521. ;; org-mode visual configuration
  522. (add-hook 'org-mode-hook (lambda () (org-bullets-mode 2)))
  523. (setq org-agenda-files (list "~/org/todo.org"
  524. "~/org/gcal.org"
  525. "~/org/training.org"))
  526. ;(with-eval-after-load 'org-agenda
  527. ; (require 'org-projectile)
  528. ; (push (org-projectile:todo-files) org-agenda-files))
  529. (setq org-startup-indented t
  530. org-pretty-entities t
  531. org-hide-emphasis-markers t
  532. org-hide-leading-start t
  533. ;; show actually italicized text instead of /italicized text/
  534. org-agenda-block-separator ""
  535. org-fontify-whole-heading-line t
  536. org-fontify-done-headline t
  537. org-fontify-quote-and-verse-blocks t
  538. org-bullets-face-name (quote org-bullet-face)
  539. org-bullets-bullet-list '("■" "◆" "▲" "▶")
  540. ;org-bullets-bullet-list '("✙" "♱" "♰" "☥" "✚" "✛" "✣")
  541. ;org-ellipsis " ⬊ "
  542. )
  543. ; Capture templates
  544. (setq org-capture-templates
  545. '(("i" "Send to inbox" entry (file+headline "~/org/todo.org" "Inbox")
  546. "* TODO %?\n %i\n %a")
  547. ("n" "Create new note" entry (file "~/org/notes.org")
  548. "* %?\nEntered on %U\n %i\n %a")
  549. ("e" "Elation related note" entry (file "~/org/elation.org")
  550. "* %?\nEntered on %U\n %i\n %a")
  551. ("g" "Add glossary note" entry (file "~/org/glossary.org")
  552. "* %?\nEntered on %U\n %i\n")
  553. ("d" "Add an idea" entry (file "~/org/ideas.org")
  554. "* %?\nEntered on %U\n %i\n")
  555. ))
  556. ; keep track when you move a deadline or reschedule a task
  557. ;(setq org-log-redeadline (quote time))
  558. ;(setq org-log-reschedule (quote time))
  559. (setq org-refile-targets '(("~/org/todo.org" :maxlevel . 3)
  560. ("~/org/someday.org" :maxlevel . 2)
  561. ("~/org/gcal.org" :maxlevel . 1)))
  562. ;; make the lines in the buffer wrap around the edges of the screen.
  563. (add-hook 'org-mode-hook '(lambda () (visual-line-mode)))
  564. ; attempt to return todo function to spacemacs
  565. (setq evil-org-key-theme '(textobjects navigation additional insert todo))
  566. (setq org-modules '(org-drill
  567. org-info
  568. org-habit
  569. org-protocol
  570. org-annotate-file
  571. org-eval
  572. org-expiry
  573. org-man
  574. org-collector
  575. org-panel
  576. org-screen
  577. org-toc))
  578. ;; Set default column view headings: Task Total-Time Time-Stamp
  579. (setq org-columns-default-format "%50ITEM(Task) %10CLOCKSUM %16TIMESTAMP_IA")
  580. (setq org-use-fast-todo-selection t)
  581. ;; org-journal directory
  582. (setq org-journal-dir "~/org/journal/")
  583. ;;; We apparently need this to get MU4E to load
  584. ;(setq mu4e-mu-binary "/usr/local/bin/mu")
  585. ;(let ((default-directory "/usr/local/share/emacs/site-lisp/"))
  586. ; (normal-top-level-add-subdirs-to-load-path))
  587. ;;; MU4E settings
  588. ;(setq mu4e-maildir "~/.mail/protonmail"
  589. ; mu4e-trash-folder "/Trash"
  590. ; mu4e-sent-folder "/Sent"
  591. ; mu4e-drafts-folder "/Drafts"
  592. ; mu4e-spam-folder "/Spam"
  593. ; mu4e-refile-folder "/Archive"
  594. ; mu4e-attachment-dir "~/Downloads"
  595. ; mu4e-get-mail-command "offlineimap"
  596. ; mu4e-update-interval 1500
  597. ; mu4e-confirm-quit nil
  598. ; mu4e-compose-format-flowed t
  599. ; mu4e-enable-notifications t
  600. ; mu4e-compose-signature-auto-include nil
  601. ; mu4e-view-show-images t
  602. ; message-kill-buffer-on-exit t
  603. ; mu4e-view-show-addresses t)
  604. ;;; Setup our sent folder, with some smtpmail config in there
  605. ;(setq mu4e-sent-folder "/Sent"
  606. ; ;; mu4e-sent-messages-behavior 'delete ;; Unsure how this should be configured
  607. ; mu4e-drafts-folder "/Drafts"
  608. ; user-mail-address "colin@onec.me"
  609. ; smtpmail-default-smtp-server "localhost"
  610. ; smtpmail-local-domain "localhost"
  611. ; smtpmail-smtp-user "colin@onec.me"
  612. ; smtpmail-debug-info t
  613. ; smtpmail-smtp-server "localhost"
  614. ; smtpmail-smtp-service 1025)
  615. ;;;; Mail directory shortcuts
  616. ;(setq mu4e-maildir-shortcuts
  617. ; '(("/INBOX" . ?i)
  618. ; ("/Archive" . ?a)))
  619. ;;;; Bookmarks
  620. ;(setq mu4e-bookmarks
  621. ; `(("flag:unread AND NOT flag:trashed" "Unread messages" ?u)
  622. ; ("date:today..now AND NOT flag:trashed" "Today's messages" ?t)
  623. ; ("date:7d..now AND NOT flag:trashed" "Last 7 days" ?w)
  624. ; ("mime:image/*" "Messages with images" ?p)
  625. ; (,(mapconcat 'identity
  626. ; (mapcar
  627. ; (lambda (maildir)
  628. ; (concat "maildir:" (car maildir)))
  629. ; mu4e-maildir-shortcuts) " OR ")
  630. ; "All inboxes" ?i)))
  631. ;;; quickmarks for notmuch
  632. ;(define-key notmuch-show-mode-map "d"
  633. ; (lambda ()
  634. ; "toggle deleted tag for message"
  635. ; (interactive)
  636. ; (if (member "deleted" (notmuch-show-get-tags))
  637. ; (notmuch-show-tag (list "-deleted"))
  638. ; (notmuch-show-tag (list "+deleted")))))
  639. ;(define-key notmuch-show-mode-map "n"
  640. ; (lambda ()
  641. ; "toggle new tag for message"
  642. ; (interactive)
  643. ; (if (member "new" (notmuch-show-get-tags))
  644. ; (notmuch-show-tag (list "-new"))
  645. ; (notmuch-show-tag (list "+new")))))
  646. ; Use w3m to parse HTML email
  647. (setq mm-text-html-renderer 'w3m)
  648. (setq w3m-fill-column 72)
  649. ; Kill email message buffers when you close them
  650. (setq message-kill-buffer-on-exit t)
  651. (setq message-default-mail-headers "Cc: \nBcc: \n")
  652. (setq message-auto-save-directory "~/Mail/colin@onec.me/Drafts/")
  653. (setq message-directory "~/Mail/colin@onec.me/")
  654. ;;; Setup sending email with msmtp
  655. (setq send-mail-function 'sendmail-send-it
  656. sendmail-program "/usr/local/bin/msmtp"
  657. mail-specify-envelope-from t
  658. message-sendmail-envelope-from 'header
  659. mail-envelope-from 'header)
  660. ;;;; Adjust how mu4e marks a message for deletion
  661. ;(defun remove-nth-element (nth list)
  662. ; (if (zerop nth) (cdr list)
  663. ; (let ((last (nthcdr (1- nth) list)))
  664. ; (setcdr last (cddr last))
  665. ; list)))
  666. ;(setq mu4e-marks (remove-nth-element 5 mu4e-marks))
  667. ;(add-to-list 'mu4e-marks
  668. ; '(trash
  669. ; :char ("d" . "▼")
  670. ; :prompt "dtrash"
  671. ; :dyn-target (lambda (target msg) (mu4e-get-trash-folder msg))
  672. ; :action (lambda (docid msg target)
  673. ; (mu4e~proc-move docid
  674. ; (mu4e~mark-check-target target) "-N"))))
  675. ;; Clean up elfeed entry buffer
  676. (setq elfeed-show-mode-hook
  677. (lambda ()
  678. (set-face-attribute 'variable-pitch (selected-frame) :font (font-spec :family "Hack" :size 14))
  679. (setq fill-column 80)
  680. (setq elfeed-show-entry-switch #'my-show-elfeed)))
  681. (defun my-show-elfeed (buffer)
  682. (with-current-buffer buffer
  683. (setq buffer-read-only nil)
  684. (goto-char (point-min))
  685. (re-search-forward "\n\n")
  686. (fill-individual-paragraphs (point) (point-max))
  687. (setq buffer-read-only t))
  688. (switch-to-buffer buffer))
  689. ;; Enable atomic chrome to fill text boxes in browsers
  690. (require 'atomic-chrome)
  691. ;(atomic-chrome-start-server)
  692. (setq atomic-chrome-buffer-open-style 'split)
  693. (org-babel-do-load-languages
  694. 'org-babel-load-languages
  695. '((sql . t)))
  696. )
  697. ;; Do not write anything past this comment. This is where Emacs will
  698. ;; auto-generate custom variable definitions.
  699. (defun dotspacemacs/emacs-custom-settings ()
  700. "Emacs custom settings.
  701. This is an auto-generated function, do not modify its content directly, use
  702. Emacs customize menu instead.
  703. This function is called at the very end of Spacemacs initialization."
  704. (custom-set-variables
  705. ;; custom-set-variables was added by Custom.
  706. ;; If you edit it by hand, you could mess it up, so be careful.
  707. ;; Your init file should contain only one such instance.
  708. ;; If there is more than one, they won't work right.
  709. '(evil-want-Y-yank-to-eol nil)
  710. '(org-agenda-files
  711. (quote
  712. ("~/org/todo.org" "~/org/gcal.org" "~/org/training.org")))
  713. '(package-selected-packages
  714. (quote
  715. (orgbox w3m olivetti treepy graphql declutter all-the-icons memoize org-super-agenda yapfify yaml-mode xterm-color ws-butler winum which-key web-mode web-beautify volatile-highlights vi-tilde-fringe uuidgen use-package unfill typo toml-mode toc-org terraform-mode hcl-mode tagedit swiper ivy spotify spaceline smeargle slim-mode shell-pop scss-mode sass-mode rvm ruby-tools ruby-test-mode rubocop rspec-mode robe rjsx-mode reveal-in-osx-finder restclient-helm restart-emacs rbenv rake rainbow-mode rainbow-identifiers rainbow-delimiters racer pyvenv pytest pyenv-mode py-isort pug-mode pip-requirements persp-mode pcre2el pbcopy paradox spinner ox-reveal ox-gfm osx-trash osx-dictionary orgit org-web-tools esxml org-projectile org-category-capture org-present org-pomodoro org-mime org-gcal request-deferred deferred org-download org-bullets open-junk-file ob-restclient ob-http neotree mwim multi-term mu4e-maildirs-extension mu4e-alert alert log4e gntp move-text mmm-mode minitest markdown-toc magit-gitflow magit-gh-pulls macrostep lorem-ipsum livid-mode skewer-mode live-py-mode linum-relative link-hint line-reminder launchctl js2-refactor multiple-cursors js2-mode js-doc jinja2-mode indent-guide hydra hy-mode hungry-delete htmlize hl-todo highlight-parentheses highlight-numbers parent-mode highlight-indentation helm-themes helm-swoop helm-spotify-plus multi helm-pydoc helm-projectile helm-mode-manager helm-make projectile helm-gtags helm-gitignore request helm-flx helm-eww helm-descbinds helm-css-scss helm-company helm-c-yasnippet helm-ag haml-mode google-translate golden-ratio go-guru go-eldoc gnuplot gitignore-mode github-search github-clone github-browse-file gitconfig-mode gitattributes-mode git-timemachine git-messenger git-link git-gutter-fringe+ git-gutter-fringe fringe-helper git-gutter+ git-gutter gist gh marshal logito pcache ht gh-md ggtags geiser fuzzy forecast flyspell-correct-helm flyspell-correct flycheck-rust flycheck-pos-tip pos-tip flycheck pkg-info epl flx-ido flx fill-column-indicator fancy-battery eyebrowse expand-region exec-path-from-shell evil-visualstar evil-visual-mark-mode evil-unimpaired evil-tutor evil-surround evil-search-highlight-persist evil-numbers evil-nerd-commenter evil-mc evil-matchit evil-magit magit git-commit ghub evil-lisp-state smartparens evil-indent-plus evil-iedit-state iedit evil-exchange evil-escape evil-ediff evil-args evil-anzu anzu evil goto-chg undo-tree eval-sexp-fu highlight eshell-z eshell-prompt-extras esh-help engine-mode emmet-mode elisp-slime-nav elfeed-web simple-httpd elfeed-org elfeed-goodies ace-jump-mode noflet powerline popwin elfeed dumb-jump dockerfile-mode docker json-mode tablist magit-popup docker-tramp json-snatcher json-reformat direnv with-editor diminish diff-hl cython-mode csv-mode company-web web-completion-data company-tern dash-functional tern company-statistics company-restclient restclient know-your-http-well company-go go-mode company-ansible company-anaconda company column-enforce-mode color-identifiers-mode coffee-mode clean-aindent-mode chruby cargo markdown-mode rust-mode bundler inf-ruby blacken bind-map bind-key beacon auto-yasnippet yasnippet auto-highlight-symbol auto-dictionary auto-compile packed atomic-chrome websocket ansible-doc ansible anaconda-mode pythonic f s all-the-icons-dired aggressive-indent adoc-mode markup-faces adaptive-wrap ace-window ace-link ace-jump-helm-line helm avy helm-core async ac-ispell auto-complete popup doom-themes dash))))
  716. (custom-set-faces
  717. ;; custom-set-faces was added by Custom.
  718. ;; If you edit it by hand, you could mess it up, so be careful.
  719. ;; Your init file should contain only one such instance.
  720. ;; If there is more than one, they won't work right.
  721. )
  722. )
  723. (custom-set-variables
  724. ;; custom-set-variables was added by Custom.
  725. ;; If you edit it by hand, you could mess it up, so be careful.
  726. ;; Your init file should contain only one such instance.
  727. ;; If there is more than one, they won't work right.
  728. '(evil-want-Y-yank-to-eol nil)
  729. '(org-agenda-files
  730. (quote
  731. ("~/org/todo.org" "~/org/gcal.org" "~/org/training.org")))
  732. '(package-selected-packages
  733. (quote
  734. (w3m olivetti treepy graphql declutter all-the-icons memoize org-super-agenda yapfify yaml-mode xterm-color ws-butler winum which-key web-mode web-beautify volatile-highlights vi-tilde-fringe uuidgen use-package unfill typo toml-mode toc-org terraform-mode hcl-mode tagedit swiper ivy spotify spaceline smeargle slim-mode shell-pop scss-mode sass-mode rvm ruby-tools ruby-test-mode rubocop rspec-mode robe rjsx-mode reveal-in-osx-finder restclient-helm restart-emacs rbenv rake rainbow-mode rainbow-identifiers rainbow-delimiters racer pyvenv pytest pyenv-mode py-isort pug-mode pip-requirements persp-mode pcre2el pbcopy paradox spinner ox-reveal ox-gfm osx-trash osx-dictionary orgit org-web-tools esxml org-projectile org-category-capture org-present org-pomodoro org-mime org-gcal request-deferred deferred org-download org-bullets open-junk-file ob-restclient ob-http neotree mwim multi-term mu4e-maildirs-extension mu4e-alert alert log4e gntp move-text mmm-mode minitest markdown-toc magit-gitflow magit-gh-pulls macrostep lorem-ipsum livid-mode skewer-mode live-py-mode linum-relative link-hint line-reminder launchctl js2-refactor multiple-cursors js2-mode js-doc jinja2-mode indent-guide hydra hy-mode hungry-delete htmlize hl-todo highlight-parentheses highlight-numbers parent-mode highlight-indentation helm-themes helm-swoop helm-spotify-plus multi helm-pydoc helm-projectile helm-mode-manager helm-make projectile helm-gtags helm-gitignore request helm-flx helm-eww helm-descbinds helm-css-scss helm-company helm-c-yasnippet helm-ag haml-mode google-translate golden-ratio go-guru go-eldoc gnuplot gitignore-mode github-search github-clone github-browse-file gitconfig-mode gitattributes-mode git-timemachine git-messenger git-link git-gutter-fringe+ git-gutter-fringe fringe-helper git-gutter+ git-gutter gist gh marshal logito pcache ht gh-md ggtags geiser fuzzy forecast flyspell-correct-helm flyspell-correct flycheck-rust flycheck-pos-tip pos-tip flycheck pkg-info epl flx-ido flx fill-column-indicator fancy-battery eyebrowse expand-region exec-path-from-shell evil-visualstar evil-visual-mark-mode evil-unimpaired evil-tutor evil-surround evil-search-highlight-persist evil-numbers evil-nerd-commenter evil-mc evil-matchit evil-magit magit git-commit ghub evil-lisp-state smartparens evil-indent-plus evil-iedit-state iedit evil-exchange evil-escape evil-ediff evil-args evil-anzu anzu evil goto-chg undo-tree eval-sexp-fu highlight eshell-z eshell-prompt-extras esh-help engine-mode emmet-mode elisp-slime-nav elfeed-web simple-httpd elfeed-org elfeed-goodies ace-jump-mode noflet powerline popwin elfeed dumb-jump dockerfile-mode docker json-mode tablist magit-popup docker-tramp json-snatcher json-reformat direnv with-editor diminish diff-hl cython-mode csv-mode company-web web-completion-data company-tern dash-functional tern company-statistics company-restclient restclient know-your-http-well company-go go-mode company-ansible company-anaconda company column-enforce-mode color-identifiers-mode coffee-mode clean-aindent-mode chruby cargo markdown-mode rust-mode bundler inf-ruby blacken bind-map bind-key beacon auto-yasnippet yasnippet auto-highlight-symbol auto-dictionary auto-compile packed atomic-chrome websocket ansible-doc ansible anaconda-mode pythonic f s all-the-icons-dired aggressive-indent adoc-mode markup-faces adaptive-wrap ace-window ace-link ace-jump-helm-line helm avy helm-core async ac-ispell auto-complete popup doom-themes dash))))
  735. (custom-set-faces
  736. ;; custom-set-faces was added by Custom.
  737. ;; If you edit it by hand, you could mess it up, so be careful.
  738. ;; Your init file should contain only one such instance.
  739. ;; If there is more than one, they won't work right.
  740. )