Most of the user configuration of Spacemacs now in Org file

Most of the content of `dotspacemacs/user-init' and
`dotspacemacs/user-config' is now loaded from `~/spacemacs.org'.
Literary programming ftw.
This commit is contained in:
Lucien Cartier-Tilet 2020-01-14 21:10:21 +01:00
parent fb55a58dfa
commit ad3e0d7ced
Signed by: phundrak
GPG Key ID: BD7789E705CB8DCA
3 changed files with 1205 additions and 538 deletions

View File

@ -1,39 +0,0 @@
(defun my-gnus-group-list-subscribed-groups ()
"List all subscribed groups with or without un-read messages"
(interactive)
(gnus-group-list-all-groups 5))
;; get email, store in nnml
(setq gnus-secondary-select-methods '((nnimap "lucien@phundrak.com"
(nnimap-address "mail.phundrak.com")
(nnimap-server-port 143)
(nnimap-stream starttls)))
;; send email via 1and1
message-send-mail-function 'smtpmail-send-it
smtpmail-smtp-server "mail.phundrak.com"
smtpmail-stream-type 'starttls
smtpmail-smtp-service 587
;; archive outgoing emails in Sent folder on imap.1and1.fr
gnus-message-archive-method '(nnimap "mail.phundrak.com")
gnus-message-archive-group "Sent"
;; store email in ~/Mails directory
nnml-directory "~/Mails"
message-directory "~/Mails"
gnus-fetch-old-headers 'some
mm-discouraged-alternatives '("text/html" "text/richtext")
mm-text-html-renderer 'w3m
gnus-use-cache t)
(gnus-add-configuration
'(article (horizontal 1.0 (summary .4 point) (article 1.0))))
(eval-after-load 'gnus-topic
'(progn
(setq gnus-message-archive-group '((format-time-string "sent.%Y")))
(setq gnus-topic-topology '(("Gnus" visible)
(("lucien@phundrak.com" visible nil nil))))
(setq gnus-topic-alist '(("lucien@phundrak.com" ; the key of the topic
"nnimap+lucien@phundrak.com:INBOX"
"nnimap+lucien@phundrak.com:Sent"
"nnimap+lucien@phundrak.com:Drafts")
("Gnus")))))

View File

@ -601,20 +601,22 @@ This function is called immediately after `dotspacemacs/init', before layer
configuration. configuration.
It is mostly for variables that should be set before packages are loaded. It is mostly for variables that should be set before packages are loaded.
If you are unsure, try setting them in `dotspacemacs/user-config' first." If you are unsure, try setting them in `dotspacemacs/user-config' first."
(load "~/.emacs.d/private/private_emacs.el")
(require 'org-id)
(require 'package)
(require 'ox-latex)
(require 'ox-publish)
;; (require 'org-tempo)
(require 'dap-lldb)
(require 'dap-firefox)
(add-to-list 'load-path "~/.local/share/icons-in-terminal/") (setq phundrak/src-dir (concat (getenv "HOME") "/.emacs.d/private/")
(add-hook 'flycheck-mode-hook #'flycheck-rust-setup) phundrak/gnus-uc (concat (getenv "HOME") "/.gnus.el")
(flyspell-mode 0) phundrak/src (concat (getenv "HOME") "/spacemacs.org")
(setq tramp-ssh-controlmaster-options phundrak/uc (concat phundrak/src-dir "user-config.el")
"-o ControlMaster=auto -o ControlPath='tramp.%%C' -o ControlPersist=no")) phundrak/ui (concat phundrak/src-dir "user-init.el"))
(when (or (file-newer-than-file-p phundrak/src phundrak/ui)
(file-newer-than-file-p phundrak/src phundrak/gnus-uc)
(file-newer-than-file-p phundrak/src phundrak/uc))
(message "Exporting new Emacs configuration from spacemacs.org through Org-babel")
(call-process
(concat invocation-directory invocation-name)
nil nil t
"-q" "--batch" "--eval" "(require 'ob-tangle)"
"--eval" (format "(org-babel-tangle-file \"%s\")" phundrak/src)))
(load-file phundrak/ui))
(defun dotspacemacs/user-load () (defun dotspacemacs/user-load ()
"Library to load while dumping. "Library to load while dumping.
@ -628,448 +630,10 @@ dump."
This function is called at the very end of Spacemacs startup, after layer This function is called at the very end of Spacemacs startup, after layer
configuration. configuration.
Put your configuration code here, except for variables that should be set Put your configuration code here, except for variables that should be set
biefore packages are loaded." before packages are loaded."
(defun load-config (FILE) ;; load file exported from `~/spacemacs.org' in `dotspacemacs/user-load'
"Loads specified org file as EmacsLisp configuration file." (load-file phundrak/uc)
(interactive)
(org-babel-load-file FILE))
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
; Custom functions ;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
(defun write-to-buffer (input-string outputbuf &optional switchbuf)
"Writes `input-string' to the specified `output-buffer'. If
`switch-buffer' is non-nil, the active buffer will switch to the
output buffer; otherwise, it will take the user back to their
initial buffer. Works with `input-string' as a string or a list
of strings."
(let ((oldbuf (current-buffer)))
(switch-to-buffer outputbuf)
(cond ((char-or-string-p input-string) (insert input-string))
((listp input-string) (dolist (elem input-string)
(insert (format "%s\n" elem)))))
(if switchbuf
(switch-to-buffer oldbuf))))
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
; Dart ;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
(spacemacs/set-leader-keys-for-major-mode 'dart-mode
"ofH" 'flutter-hot-restart
"ofh" 'flutter-hot-reload
"ofq" 'flutter-quit
"ofr" (lambda () (interactive) (flutter-run "-v"))
"ofs" 'flutter-screenshot)
(spacemacs/declare-prefix-for-mode 'dart-mode "o" "custom")
(spacemacs/declare-prefix-for-mode 'dart-mode "of" "flutter")
(spacemacs/declare-prefix-for-mode 'dart-mode "ofr" "flutter-run")
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
; LSP ;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
(lsp-treemacs-sync-mode 1)
(dap-mode 1)
(dap-ui-mode 1)
(dap-tooltip-mode 1)
(tooltip-mode 1)
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
; Misc ;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
(defun terminal-here-default-terminal-command (_dir)
'("st"))
(setq x86-lookup-pdf "~/Documents/code/asm/Intelx86/325383-sdm-vol-2abcd.pdf"
evil-want-C-u-scroll nil
asm-comment-char ?\#
twittering-use-master-password t
edit-server-default-major-mode 'org-mode
epa-pinentry-mode 'loopback
paragraph-start "\f\\|[ \t]*$\\|[ \t]*[-+*] "
python-shell-completion-native-disabled-interpreters '("python")
wttrin-default-cities '("Aubervilliers" "Paris"
"Lyon" "Nonières"
"Saint Agrève")
prettify-symbols-alist '(("lambda" . 955) ; λ
("->" . 8594) ; →
("<->" . 8596) ; ↔
("<-" . 8592) ; ←
("=>" . 8658) ; ⇒
("<=>" . 8860) ; ⇔
("<=" . 8656) ; ⇐
("mapc" . 8614) ; ↦
("map" . 8614) ; ↦
(">>" . 187) ; »
("<<" . 171) ; «
))
(add-hook 'before-save-hook 'delete-trailing-whitespace)
(add-hook 'prog-mode-hook 'eldoc-mode)
(add-hook 'prog-mode-hook 'visual-line-mode)
(mapc (lambda (x)
(add-hook x 'auto-fill-mode)
(add-hook x 'visual-line-mode))
'(message-mode-hook
org-mode-hook
text-mode-hook
markdown-mode-hook))
(global-aggressive-indent-mode 1)
(add-to-list 'aggressive-indent-excluded-modes 'dart-mode)
(defun phundrak/fill-paragraph()
(interactive)
(let* ((current-prefix-arg 4))
(call-interactively 'fill-paragraph)))
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
; Nov-mode ;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
(defun my-nov-font-setup ()
(face-remap-add-relative 'variable-pitch :family "Charis SIL"
:size 16
:height 1.0))
(mapc (lambda (mode)
(add-hook 'nov-mode-hook mode))
'('my-nov-font-setup
'visual-line-mode))
(setq nov-text-width 80)
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
; file extension ;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
(dolist (e '(("xml" . web-mode) ("xinp" . web-mode) ("aiml" . web-mode)
("C" . c++-mode) ("dconf" . conf-mode) ("yy" . bison-mode)
("ll" . flex-mode) ("s" . asm-mode) ("pl" . prolog-mode)
("l" . scheme-mode) ("vs" . glsl-mode) ("fs" . glsl-mode)))
(push (cons (concat "\\." (car e) "\\'") (cdr e)) auto-mode-alist))
(dolist (e '("service" "timer" "target" "mount" "automount" "slice" "socket"
"path" "netdev" "network" "link"))
(push (cons (concat "\\." e "\\'") 'conf-unix-mode) auto-mode-alist))
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
; shortcuts ;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
(global-set-key (kbd "C-x C-b") 'ibuffer)
(global-set-key (kbd "S-C-<left>") 'shrink-window-horizontally)
(global-set-key (kbd "S-C-<right>") 'enlarge-window-horizontally)
(global-set-key (kbd "S-C-<down>") 'shrink-window)
(global-set-key (kbd "S-C-<up>") 'enlarge-window)
(global-set-key (kbd "C-x <up>") 'windmove-up)
(global-set-key (kbd "C-x <down>") 'windmove-down)
(global-set-key (kbd "C-x <right>") 'windmove-right)
(global-set-key (kbd "C-x <left>") 'windmove-left)
(global-set-key (kbd "C-<prior>") 'previous-buffer)
(global-set-key (kbd "C-<next>") 'next-buffer)
(global-set-key (kbd "M-»") 'end-of-buffer)
(global-set-key (kbd "M-«") 'beginning-of-buffer)
(global-set-key (kbd "<XF86HomePage>") 'spacemacs/home)
(global-set-key (kbd "<XF86Open>") 'helm-find-files)
(global-set-key (kbd "<XF86Close>") 'kill-this-buffer)
(global-set-key (kbd "<XF86Save>") 'save-buffer)
(global-set-key (kbd "<C-tab>") 'evil-close-fold)
(global-set-key (kbd "<S-C-tab>") 'evil-close-folds)
(global-set-key (kbd "<C-iso-lefttab>") 'evil-open-fold)
(spacemacs/declare-prefix "o" "custom")
(spacemacs/declare-prefix "oa" "applications")
(spacemacs/declare-prefix "oB" "byte-compile .emacs.d")
(spacemacs/declare-prefix "oc" "comments")
(spacemacs/declare-prefix "of" "files")
(spacemacs/declare-prefix "ofb" ".local/bin sources")
(spacemacs/declare-prefix "off" "fish config")
(spacemacs/declare-prefix "ofi" "i3 config")
(spacemacs/declare-prefix "ofp" "polybar config")
(spacemacs/declare-prefix "ofr" "yadm README")
(spacemacs/declare-prefix "oi" "insert")
(spacemacs/declare-prefix "oii" "invisible space")
(spacemacs/declare-prefix "om" "multiple-cursors")
(spacemacs/declare-prefix "oo" "org-mode")
(spacemacs/declare-prefix "ooi" "custom IDs")
(spacemacs/declare-prefix "oos" "structure")
(spacemacs/declare-prefix "oot" "tables")
(spacemacs/declare-prefix "oott" "toggle width")
(spacemacs/declare-prefix "oote" "expand")
(spacemacs/declare-prefix "oots" "shrink")
(spacemacs/declare-prefix "or" "external command")
(spacemacs/declare-prefix "ot" "toggle")
(spacemacs/declare-prefix "ow" "writeroom")
(spacemacs/declare-prefix "ox" "text")
(spacemacs/set-leader-keys
"oac" 'calc
"oaC" 'calendar
"oae" 'eww
"oaw" 'wttrin
"oB" (lambda () (byte-recompile-directory (expand-file-name "~/.emacs.d") 0))
"ob" 'fancy-battery-mode
"occ" 'outorg-copy-edits-and-exit
"oce" 'outorg-edit-as-org
"oco" 'outline-minor-mode
"od" 'elcord-mode
"oF" 'flycheck-mode
"ofb" (lambda () (interactive) (find-file "~/.local/bin/README.org"))
"off" (lambda () (interactive) (find-file "~/.config/fish/README.org"))
"ofi" (lambda () (interactive) (find-file "~/.config/i3/README.org"))
"ofp" (lambda () (interactive) (find-file "~/.config/polybar/config##yadm.j2"))
"ofr" (lambda () (interactive) (find-file "~/README.org"))
"ofo" 'find-file-at-point
"oii" (lambda () (interactive) (insert ""))
"ome" 'mc/edit-lines
"omn" 'mc/mark-next-like-this
"omp" 'mc/mark-previous-like-this
"oma" 'mc/mark-all-like-this
"ooi" 'eos/org-add-ids-to-headlines-in-file
"oos" 'org-insert-structure-template
"ooT" 'org-sidebar-tree
"oott" 'org-table-toggle-column-width
"oote" 'org-table-expand
"oots" 'org-table-shrink
"oow" 'org-pomodoro
"owi" 'writeroom-increase-width
"or" 'helm-run-external-command
"os" 'prettify-symbols-mode
"oti" 'toggle-input-method
"otI" 'set-input-method
"owd" 'writeroom-decrease-width
"oxf" 'phundrak/fill-paragraph)
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
; gnus ;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
(spacemacs/declare-prefix "og" "gnus")
(spacemacs/set-leader-keys
"ogD" 'turn-on-gnus-dired-mode
"ogd" 'gnus-summary-delete-article
"ogf" 'gnus-summary-mail-forward
"ogo" 'my-gnus-group-list-subscribed-groups
"ogr" 'gnus-summary-insert-new-articles
"ogs" 'message-send-and-exit)
(add-hook 'gnus-group-mode-hook 'gnus-topic-mode)
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
; Dired ;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
(setq dired-recursive-copies 'always
dired-dwim-target t
dired-listing-switches "-ahl --group-directories-first")
(require 'org-download)
(add-hook 'dired-mode-hook 'org-download-enable)
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
; org-mode ;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
(with-eval-after-load 'org
(org-link-set-parameters
"file"
:face (lambda (path) (if (file-exists-p path) 'org-link 'org-warning)))
;; custom org functions ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
(defun ck/org-confirm-babel-evaluate (lang body)
(not (or (string= lang "latex") (string= lang "maxima"))))
;; custom IDs when exporting
;; inspired by
;; https://writequit.org/articles/emacs-org-mode-generate-ids.html
(defun eos/org-id-new (&optional prefix)
"Create a new globally unique ID.
An ID consists of two parts separated by a colon:
- a prefix
- a unique part that will be created according to
`org-id-method'.
PREFIX can specify the prefix, the default is given by the
variable `org-id-prefix'. However, if PREFIX is the symbol
`none', don't use any prefix even if `org-id-prefix' specifies
one.
So a typical ID could look like \"Org-4nd91V40HI\"."
(let* ((prefix (if (eq prefix 'none)
""
(concat (or prefix org-id-prefix) "-")))
unique)
(if (equal prefix "-") (setq prefix ""))
(cond
((memq org-id-method '(uuidgen uuid))
(setq unique (org-trim (shell-command-to-string org-id-uuid-program)))
(unless (org-uuidgen-p unique)
(setq unique (org-id-uuid))))
((eq org-id-method 'org)
(let* ((etime (org-reverse-string (org-id-time-to-b36)))
(postfix (if org-id-include-domain
(progn
(require 'message)
(concat "@" (message-make-fqdn))))))
(setq unique (concat etime postfix))))
(t (error "Invalid `org-id-method'")))
(concat prefix unique)))
(defun eos/org-custom-id-get (&optional pom create prefix)
"Get the CUSTOM_ID property of the entry at point-or-marker POM.
If POM is nil, refer to the entry at point. If the entry does
not have an CUSTOM_ID, the function returns nil. However, when
CREATE is non nil, create a CUSTOM_ID if none is present
already. PREFIX will be passed through to `eos/org-id-new'. In
any case, the CUSTOM_ID of the entry is returned."
(interactive)
(org-with-point-at pom
(let ((id (org-entry-get nil "CUSTOM_ID")))
(cond
((and id (stringp id) (string-match "\\S-" id))
id)
(create
(setq id (eos/org-id-new (concat prefix "h")))
(org-entry-put pom "CUSTOM_ID" id)
(org-id-add-location id (buffer-file-name (buffer-base-buffer)))
id)))))
(defun eos/org-add-ids-to-headlines-in-file ()
"Add CUSTOM_ID properties to all headlines in the current
file which do not already have one. Only adds ids if the
`auto-id' option is set to `t' in the file somewhere. ie,
#+OPTIONS: auto-id:t"
(interactive)
(save-excursion
(widen)
(goto-char (point-min))
(when (re-search-forward "^#\\+OPTIONS:.*auto-id:t" (point-max) t)
(org-map-entries (lambda () (eos/org-custom-id-get (point) 'create))))))
;; org-babel languages ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
(org-babel-do-load-languages
'org-babel-load-languages
'((C . t)
(dot . t)
(emacs-lisp . t)
(gnuplot . t)
(latex . t)
(makefile . t)
(python . t)
(R . t)
(sass . t)
(scheme . t)
(shell . t)))
;; org hooks ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
(add-hook 'org-mode-hook
(lambda ()
(add-hook 'before-save-hook
(lambda ()
(when (and (eq major-mode 'org-mode)
(eq buffer-read-only nil))
(eos/org-add-ids-to-headlines-in-file))))))
;; variables ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
(setq
org-hide-macro-markers t
org-id-link-to-org-use-id 'create-if-interactive-and-no-custom-id
geiser-default-implementation 'racket
org-agenda-custom-commands '(("h" "Daily habits"
((agenda ""))
((org-agenda-show-log t)
(org-agenda-ndays 7)
(org-agenda-log-mode-items '(state))
(org-agenda-skip-function
'(org-agenda-skip-entry-if 'notregexp
":DAILY:")))))
org-agenda-files (list "~/org")
org-confirm-babel-evaluate 'ck/org-confirm-babel-evaluate
org-export-latex-hyperref-format "\\ref{%s}"
org-html-validation-link nil
org-journal-date-prefix "#+TITLE: "
org-journal-dir "~/org/journal/"
org-journal-file-format "%Y-%m-%d"
org-src-tab-acts-natively t
user-full-name "Lucien Cartier-Tilet"
user-mail-address "lucien@phundrak.com"
;; subscripts and superscripts need {} to work
org-use-sub-superscripts (quote {})
org-latex-listings 'minted
org-reveal-root "file:///home/phundrak/fromGIT/reveal.js"
org-latex-compiler "xelatex"
org-latex-pdf-process
'("xelatex -shell-escape -interaction nonstopmode -output-directory %o %f"
"xelatex -shell-escape -interaction nonstopmode -output-directory %o %f"
"xelatex -shell-escape -interaction nonstopmode -output-directory %o %f")
org-latex-default-packages-alist '(("" "graphicx" t)
("" "longtable" nil)
("" "wrapfig" nil)
("" "rotating" nil)
("normalem" "ulem" t)
("" "amsmath" t)
("" "textcomp" t)
("" "amssymb" t)
("" "capt-of" nil)
("" "hyperref" nil))
org-structure-template-alist (append org-structure-template-alist
'(("el" . "src emacs-lisp")))
;;; Org projects
org-publish-project-alist
'(("langue-phundrak-com-org"
:base-directory "~/Documents/conlanging/web/"
:base-extension "org"
:exclude "\\./\\(CONTRIB\\|README\\|head\\|temp\\|svg-ink\\).*"
:publishing-directory "/ssh:Naro:~/www/phundrak.com/langue-phundrak-com/web"
:recursive t
:publishing-function org-html-publish-to-html
:headline-levels 5
:auto-sitemap t
:auto-preamble t)
("langue-phundrak-com-pdf"
:base-directory "~/Documents/conlanging/web/"
:base-extension "org"
:exclude "\\./\\(CONTRIB\\|README\\|index\\|head\\|temp\\|svg-ink\\).*"
:publishing-directory "/ssh:Naro:~/www/phundrak.com/langue-phundrak-com/web"
:recursive t
:publishing-function org-latex-publish-to-pdf
:headline-levels 5
:auto-preamble t)
("langue-phundrak-com-static"
:base-directory "~/Documents/conlanging/web/"
:base-extension "css\\|scss\\|dart\\|js\\|png\\|jpg\\|gif\\|svg\\|jpeg\\|ttf\\|woff\\|txt\\|epub"
:publishing-directory "/ssh:Naro:~/www/phundrak.com/langue-phundrak-com/web"
:recursive t
:publishing-function org-publish-attachment)
("langue-phundrak-com"
:components ("langue-phundrak-com-org"
"langue-phundrak-com-static"
"langue-phundrak-com-pdf"))))
(add-to-list 'org-latex-packages-alist '("" "minted"))
(add-to-list 'org-latex-packages-alist '("" "fontspec"))
(add-to-list 'org-latex-packages-alist '("" "xeCJK"))
;; Shortcuts ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
(with-eval-after-load 'org-agenda
(require 'org-projectile)
(mapcar #'(lambda (file)
(when (file-exists-p file)
(push file org-agenda-files)))
(org-projectile-todo-files)))
(eval-after-load "ox-latex"
;; update the list of LaTeX classes and associated header (encoding, etc.)
;; and structure
'(add-to-list 'org-latex-classes
'("conlang"
"\\documentclass{book}"
("\\chapter{%s}" . "\\chapter*{%s}")
("\\section{%s}" . "\\section*{%s}")
("\\subsection{%s}" . "\\subsection*{%s}")
("\\subsubsection{%s}" . "\\subsubsection*{%s}"))
`("beamer"
,(concat "\\documentclass[presentation]{beamer}\n"
"[DEFAULT-PACKAGES]"
"[PACKAGES]"
"[EXTRA]\n")
("\\section{%s}" . "\\section*{%s}")
("\\subsection{%s}" . "\\subsection*{%s}")
("\\subsubsection{%s}" . "\\subsubsection*{%s}")))))
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
; LaTeX ; ; LaTeX ;
@ -1095,51 +659,6 @@ double-quotes matter and must be escaped appropriately."
:safe 'stringp) :safe 'stringp)
(add-hook 'doc-view-minor-mode-hook 'auto-revert-mode) (add-hook 'doc-view-minor-mode-hook 'auto-revert-mode)
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
; Qt ;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
(setq
c-C++-access-key
"\\<\\(slots\\|signals\\|private\\|protected\\|public\\)\\>[ \t]*[(slots\\|signals)]*[ \t]*:")
(font-lock-add-keywords
'c++-mode
'(("\\<\\(Q_OBJECT\\|public slots\\|public signals\\|private slots\\|private signals\\|protected slots\\|protected signals\\)\\>" . font-lock-constant-face)))
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
; flycheck ;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;; force flycheck to always use c++11 support. We use the
;; clang language backend so this is set to clang
(add-hook 'c++-mode-hook
(lambda () (setq flycheck-clang-language-standard "c++17")))
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
; rust ;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
(setq racer-cmd "~/.cargo/bin/racer"
racer-rust-src-path (concat
(getenv "HOME")
"/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/src"))
(add-hook 'rust-mode-hook
'(lambda ()
(local-set-key (kbd "TAB") #'company-indent-or-complete-common)
(electric-pair-mode 1)
(indent-guide-mode 1)))
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
; scheme ;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
(setq geiser-chicken-binary "chicken-csi")
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
; Java ;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
(setq eclimd-default-workspace "/home/phundrak/eclipse-workspace")
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
; Eshell ; ; Eshell ;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
@ -1264,6 +783,9 @@ This function is called at the very end of Spacemacs initialization."
(javascript-backend . lsp) (javascript-backend . lsp)
(go-backend . go-mode) (go-backend . go-mode)
(go-backend . lsp)))) (go-backend . lsp))))
'(send-mail-function (quote smtpmail-send-it))
'(smtpmail-smtp-server "mail.phundrak.com")
'(smtpmail-smtp-service 587)
'(solaire-mode-auto-swap-bg t) '(solaire-mode-auto-swap-bg t)
'(vc-annotate-background "#282c34") '(vc-annotate-background "#282c34")
'(vc-annotate-color-map '(vc-annotate-color-map

1184
spacemacs.org Normal file

File diff suppressed because it is too large Load Diff