Compare commits
No commits in common. "8173bfcb20c4c3c2aaba53c8f5c469300e9ac62b" and "220b43aaf2c6761f4eda128ccfa9e1faf60b7f19" have entirely different histories.
8173bfcb20
...
220b43aaf2
Binary file not shown.
@ -118,7 +118,7 @@ This function is called at the very end of Spacemacs initialization."
|
|||||||
'(objed-cursor-color "#ff6c6b")
|
'(objed-cursor-color "#ff6c6b")
|
||||||
'(org-export-headline-levels 4)
|
'(org-export-headline-levels 4)
|
||||||
'(package-selected-packages
|
'(package-selected-packages
|
||||||
'(org-appear yasnippet-snippets yapfify yaml-mode xkcd x86-lookup wttrin xterm-color ws-butler wrap-region winum which-key web-mode web-beautify volatile-highlights vmd-mode visual-fill-column vi-tilde-fringe uuidgen use-package unfill undo-tree twittering-mode toml-mode toc-org tide typescript-mode tagedit systemd stickyfunc-enhance srefactor spaceline smeargle slim-mode sicp shell-pop selectric-mode scss-mode sass-mode restclient-helm restart-emacs rainbow-mode rainbow-identifiers rainbow-delimiters racer pyvenv pytest pyenv-mode py-isort pug-mode pony-mode plantuml-mode pip-requirements pinentry persp-mode pcre2el paradox spinner ox-ssh ox-reveal ox-gfm outorg orgit org-tree-slide org-sidebar org-ql peg ov org-super-agenda ts org-ref pdf-tools key-chord ivy org-projectile org-category-capture org-present org-pomodoro org-mime org-download org-bullets open-junk-file ob-restclient ob-latex-as-png ob-http nginx-mode neotree nasm-mode mwim multi-term mu4e-maildirs-extension mu4e-alert ht alert log4e gntp move-text mmm-mode markdown-toc magit-gitflow magit-popup magit macrostep lua-mode lorem-ipsum livid-mode skewer-mode live-py-mode linum-relative link-hint js2-refactor multiple-cursors js2-mode js-doc insert-shebang info-colors indent-guide imenu-list ibuffer-projectile hydra lv hy-mode dash-functional hungry-delete htmlize hl-todo highlight-parentheses highlight-numbers parent-mode highlight-indentation helm-themes helm-swoop helm-pydoc helm-projectile projectile helm-mode-manager helm-make helm-gitignore request helm-flx helm-descbinds helm-css-scss helm-company helm-c-yasnippet helm-bibtex bibtex-completion parsebib helm-ag haml-mode graphviz-dot-mode google-translate golden-ratio gnuplot gitignore-mode gitconfig-mode gitattributes-mode git-timemachine git-messenger git-link git-commit with-editor gh-md geiser fuzzy flyspell-correct-helm flyspell-correct flycheck-rust flycheck-pos-tip flycheck pkg-info epl flx-ido flx fish-mode 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 highlight evil-numbers evil-nerd-commenter evil-mc evil-matchit 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 eval-sexp-fu eshell-z eshell-syntax-highlighting eshell-prompt-extras esh-help emmet-mode elisp-slime-nav elfeed-web simple-httpd elfeed-org elfeed-goodies ace-jump-mode noflet powerline popwin elfeed elcord edit-indirect dumb-jump dockerfile-mode docker transient tablist json-mode docker-tramp json-snatcher json-reformat disaster diredfl dired-git-info diminish define-word cython-mode csv-mode company-web web-completion-data company-statistics company-shell company-restclient restclient know-your-http-well company-quickhelp pos-tip company-emacs-eclim eclim company-c-headers company-auctex company-anaconda company column-enforce-mode color-identifiers-mode coffee-mode cmake-mode clean-aindent-mode clang-format cargo markdown-mode rust-mode caddyfile-mode loop bind-map bind-key biblio biblio-core auto-yasnippet yasnippet auto-highlight-symbol auto-dictionary auto-compile packed auctex anaconda-mode pythonic f dash s aggressive-indent adaptive-wrap ace-window ace-link ace-jump-helm-line helm avy helm-core async ac-ispell auto-complete popup nord-theme))
|
'(ob-latex-as-png nord-theme eshell-syntax-highlighting diredfl caddyfile-mode ob-swift wttrin wrap-region pinentry org-tree-slide org-sidebar org-ql peg ov org-super-agenda ts dired-du caddyfile-mode loop xkcd vmd-mode visual-fill-column typit mmt sudoku restclient-helm pony-mode pacmacs ox-reveal outorg ob-restclient ob-http meson-mode ibuffer-projectile lv helm-w3m w3m graphviz-dot-mode flycheck-gometalinter transient ess-smart-equals ess-R-data-view ctable ess julia-mode eshell-git-prompt emoji-cheat-sheet-plus edit-indirect dockerfile-mode docker docker-tramp company-restclient restclient know-your-http-well company-quickhelp company-emoji company-emacs-eclim eclim atomic-chrome websocket 2048-game ox-gfm slime-company slime common-lisp-snippets erlang insert-shebang fish-mode company-shell faceup racket-mode treepy graphql yapfify yaml-mode xterm-color web-beautify twittering-mode toml-mode tagedit stickyfunc-enhance smeargle slim-mode shell-pop selectric-mode scss-mode sass-mode ranger rainbow-identifiers pytest pyenv-mode py-isort pug-mode plantuml-mode phpunit phpcbf php-auto-yasnippets pdf-tools tablist ox-pandoc orgit org-present org-pomodoro alert log4e gntp ob-elixir multi-term markdown-toc magit-gitflow magit-gh-pulls livid-mode live-py-mode json-snatcher js2-refactor js-doc htmlize hlint-refactor hindent helm-pydoc helm-hoogle helm-gitignore helm-css-scss haskell-snippets haml-mode gnuplot glsl-mode gitignore-mode github-search github-clone github-browse-file gitconfig-mode gitattributes-mode git-messenger gist gh marshal logito pcache ht gh-md flyspell-correct-helm flyspell-correct flycheck-rust pos-tip flycheck-mix flycheck-credo eshell-z eshell-prompt-extras esh-help drupal-mode disaster cython-mode dash-functional tern company-ghci company-ghc ghc color-identifiers-mode cmm-mode clang-format cargo auto-dictionary alchemist modern-cpp-font-lock yasnippet-snippets x86-lookup web-mode srefactor racer pyvenv pip-requirements pandoc-mode org-projectile org-category-capture org-mime org-download nasm-mode json-reformat intero imenu-list hy-mode git-timemachine git-link geiser flycheck-pos-tip flycheck-haskell evil-magit emmet-mode cmake-mode anaconda-mode rust-mode elixir-mode flycheck haskell-mode multiple-cursors skewer-mode simple-httpd markdown-mode magit magit-popup git-commit ghub with-editor pythonic emms gmail-message-mode ham-mode html-to-markdown flymd edit-server image-dired+ go-guru go-eldoc company-go go-mode unfill mwim company-web web-completion-data company-tern company-cabal company-c-headers company-auctex company-anaconda elcord xresources-theme sql-indent rainbow-mode php-extras php-mode mmm-mode json-mode js2-mode csv-mode coffee-mode auctex helm-company helm-c-yasnippet fuzzy company-statistics company auto-yasnippet yasnippet ac-ispell auto-complete ws-butler winum which-key volatile-highlights vi-tilde-fringe uuidgen use-package toc-org spaceline powerline restart-emacs request rainbow-delimiters popwin persp-mode pcre2el paradox spinner org-plus-contrib org-bullets open-junk-file neotree move-text macrostep lorem-ipsum linum-relative link-hint indent-guide hydra hungry-delete hl-todo highlight-parentheses highlight-numbers parent-mode highlight-indentation helm-themes helm-swoop helm-projectile helm-mode-manager helm-make projectile pkg-info epl helm-flx helm-descbinds helm-ag google-translate golden-ratio 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-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 elisp-slime-nav dumb-jump f dash s diminish define-word column-enforce-mode clean-aindent-mode bind-map bind-key auto-highlight-symbol auto-compile packed aggressive-indent adaptive-wrap ace-window ace-link ace-jump-helm-line helm avy helm-core popup async))
|
||||||
'(pdf-view-midnight-colors '("#655370" . "#fbf8ef"))
|
'(pdf-view-midnight-colors '("#655370" . "#fbf8ef"))
|
||||||
'(safe-local-variable-values
|
'(safe-local-variable-values
|
||||||
'((org-confirm-babel-evaluate)
|
'((org-confirm-babel-evaluate)
|
||||||
|
@ -1313,9 +1313,9 @@ to which tag by default.
|
|||||||
| class | firefox | 3 |
|
| class | firefox | 3 |
|
||||||
| class | Nemo | 4 |
|
| class | Nemo | 4 |
|
||||||
| class | Gimp* | 5 |
|
| class | Gimp* | 5 |
|
||||||
| class | Steam | 9 |
|
|
||||||
| class | discord | 0 |
|
| class | discord | 0 |
|
||||||
| class | mattermost | 0 |
|
| class | mattermost | 0 |
|
||||||
|
| class | Steam | 9 |
|
||||||
|
|
||||||
#+NAME: rules-default-tags-generate
|
#+NAME: rules-default-tags-generate
|
||||||
#+BEGIN_SRC emacs-lisp :tangle no :exports none :cache yes :var tags=rules-default-tags-table
|
#+BEGIN_SRC emacs-lisp :tangle no :exports none :cache yes :var tags=rules-default-tags-table
|
||||||
|
@ -468,7 +468,7 @@ sequencially.
|
|||||||
:HEADER-ARGS: :shebang "#!/bin/bash" :mkdirp yes :tangle ~/.local/bin/dired
|
:HEADER-ARGS: :shebang "#!/bin/bash" :mkdirp yes :tangle ~/.local/bin/dired
|
||||||
:END:
|
:END:
|
||||||
#+BEGIN_SRC bash
|
#+BEGIN_SRC bash
|
||||||
emacsclient -c -a emacs -e "(dired \"$@\")"
|
emacsclient -c -e "(dired \"$@\")"
|
||||||
#+END_SRC
|
#+END_SRC
|
||||||
|
|
||||||
** Emacsmail
|
** Emacsmail
|
||||||
@ -479,7 +479,7 @@ sequencially.
|
|||||||
This short script is used in my =~/.local/share/applications/mu4e.desktop= file
|
This short script is used in my =~/.local/share/applications/mu4e.desktop= file
|
||||||
in order to send to Emacs any ~mailto:~ requests made in my system.
|
in order to send to Emacs any ~mailto:~ requests made in my system.
|
||||||
#+BEGIN_SRC bash
|
#+BEGIN_SRC bash
|
||||||
emacsclient -c -n -a emacs -e "(browse-url-mail \"$@\")"
|
emacsclient -c --eval "(browse-url-mail \"$@\")"
|
||||||
#+END_SRC
|
#+END_SRC
|
||||||
|
|
||||||
* Media
|
* Media
|
||||||
|
@ -163,8 +163,8 @@ Typically, the variable will be set like so:
|
|||||||
helm
|
helm
|
||||||
multiple-cursors
|
multiple-cursors
|
||||||
org
|
org
|
||||||
(shell :variables shell-default-height 30
|
(shell :variables shell-default-height
|
||||||
shell-default-position 'bottom)
|
30 shell-default-position 'bottom)
|
||||||
treemacs))
|
treemacs))
|
||||||
#+END_SRC
|
#+END_SRC
|
||||||
|
|
||||||
@ -259,7 +259,6 @@ the cursor is on one.
|
|||||||
org-enable-hugo-support t
|
org-enable-hugo-support t
|
||||||
org-enable-reveal-js-support t
|
org-enable-reveal-js-support t
|
||||||
org-enable-sticky-header t
|
org-enable-sticky-header t
|
||||||
org-enable-appear-support t
|
|
||||||
spaceline-org-clock-p t
|
spaceline-org-clock-p t
|
||||||
org-projectile-file "TODOs.org"
|
org-projectile-file "TODOs.org"
|
||||||
org-download-image-dir "~/Pictures/org/"
|
org-download-image-dir "~/Pictures/org/"
|
||||||
@ -497,10 +496,10 @@ programming language, so here it is.
|
|||||||
lua-lsp-emmy-enable-file-watchers t)
|
lua-lsp-emmy-enable-file-watchers t)
|
||||||
#+END_SRC
|
#+END_SRC
|
||||||
|
|
||||||
Unfortunately, I have to write Java and Scala code for one of my university
|
Unfortunately, I have to write Java code for one of my university courses, so
|
||||||
courses, so here are the layers:
|
here is the layer:
|
||||||
#+BEGIN_SRC emacs-lisp
|
#+BEGIN_SRC emacs-lisp
|
||||||
java scala
|
java
|
||||||
#+END_SRC
|
#+END_SRC
|
||||||
|
|
||||||
*** Readers
|
*** Readers
|
||||||
@ -1054,10 +1053,7 @@ control:
|
|||||||
When used in a plist, ~visual~ takes precendence over ~relative~.
|
When used in a plist, ~visual~ takes precendence over ~relative~.
|
||||||
#+BEGIN_SRC emacs-lisp
|
#+BEGIN_SRC emacs-lisp
|
||||||
(setq-default dotspacemacs-line-numbers '(:relative nil
|
(setq-default dotspacemacs-line-numbers '(:relative nil
|
||||||
:visual nil
|
:enabled-for-modes prog-mode))
|
||||||
:disabled-for-modes org-mode pdf-view-mode
|
|
||||||
dired-mode doc-view-mode
|
|
||||||
text-mode))
|
|
||||||
#+END_SRC
|
#+END_SRC
|
||||||
|
|
||||||
Select a scope to highlight delimiter. Possible values are:
|
Select a scope to highlight delimiter. Possible values are:
|
||||||
@ -1380,6 +1376,12 @@ Emacs config file:
|
|||||||
(load "~/.config/emacs/private/private_emacs")
|
(load "~/.config/emacs/private/private_emacs")
|
||||||
#+END_SRC
|
#+END_SRC
|
||||||
|
|
||||||
|
I’ll also load a package I cloned locally as it is not (yet?) available in the
|
||||||
|
MELPA: [[https://github.com/awth13/org-appear][org-appear]].
|
||||||
|
#+BEGIN_SRC emacs-lisp
|
||||||
|
(require 'org-appear "~/fromGIT/emacs-packages/org-appear/org-appear.el")
|
||||||
|
#+END_SRC
|
||||||
|
|
||||||
Then, I want a couple of requires:
|
Then, I want a couple of requires:
|
||||||
#+BEGIN_SRC emacs-lisp
|
#+BEGIN_SRC emacs-lisp
|
||||||
(require 'org-id)
|
(require 'org-id)
|
||||||
@ -1504,26 +1506,6 @@ the ~$HOME~ (~/home/<username>/~) directory to a simple =~=.
|
|||||||
(t (error "Invalid argument %s, neither stringp nor listp" $path))))
|
(t (error "Invalid argument %s, neither stringp nor listp" $path))))
|
||||||
#+END_SRC
|
#+END_SRC
|
||||||
|
|
||||||
*** ~phundrak/all?~
|
|
||||||
:PROPERTIES:
|
|
||||||
:CUSTOM_ID: User-Configuration-Custom-functions-macros-and-variables-phundrak-all-0655600c
|
|
||||||
:END:
|
|
||||||
This function is inspired by dash’s ~-all?~ function: it will test all the
|
|
||||||
elements of the list ~seq~ against the predicate ~fn~ which should return either
|
|
||||||
~t~ or ~nil~. If all of them return something else than ~nil~, then it is a
|
|
||||||
success, otherwise it is a failure. Note that empty lists will always return
|
|
||||||
~t~.
|
|
||||||
#+BEGIN_SRC emacs-lisp
|
|
||||||
(defun phundrak/all? (fn seq)
|
|
||||||
"Check if all members of `SEQ' satisfy predicate `FN'. Note that
|
|
||||||
it will return t if `SEQ' is nil."
|
|
||||||
(declare (pure t) (side-effect-free t))
|
|
||||||
(if seq
|
|
||||||
(and (funcall fn (car seq))
|
|
||||||
(phundrak/all? fn (cdr seq)))
|
|
||||||
t))
|
|
||||||
#+END_SRC
|
|
||||||
|
|
||||||
*** ~phundrak/add-all-to-list~
|
*** ~phundrak/add-all-to-list~
|
||||||
:PROPERTIES:
|
:PROPERTIES:
|
||||||
:CUSTOM_ID: User-Configuration-Custom-functions-macros-and-variables-phundrak-add-all-to-list-a8b2680d
|
:CUSTOM_ID: User-Configuration-Custom-functions-macros-and-variables-phundrak-add-all-to-list-a8b2680d
|
||||||
@ -1703,24 +1685,6 @@ the root of the git repository, else it will return ~nil~.
|
|||||||
(phundrak/git-repo-root (f-parent $path)))))
|
(phundrak/git-repo-root (f-parent $path)))))
|
||||||
#+END_SRC
|
#+END_SRC
|
||||||
|
|
||||||
*** ~phundrak/none?~
|
|
||||||
:PROPERTIES:
|
|
||||||
:CUSTOM_ID: User-Configuration-Custom-functions-macros-and-variables-phundrak-none-463dee26
|
|
||||||
:END:
|
|
||||||
In the same vein as ~phundrak/all?~, ~phundrak/none?~ checks if all elements of
|
|
||||||
~seq~ do not satify the predicate ~fn~. Again, if the list is empty, it will
|
|
||||||
return ~t~.
|
|
||||||
#+BEGIN_SRC emacs-lisp
|
|
||||||
(defun phundrak/none? (fn seq)
|
|
||||||
"Check if all members of `SEQ' do not satisfy predicate `FN'.
|
|
||||||
Note that it will return t if `SEQ' is nil."
|
|
||||||
(declare (pure t) (side-effect-free t))
|
|
||||||
(if seq
|
|
||||||
(and (not (funcall fn (car seq)))
|
|
||||||
(phundrak/none? fn (cdr seq)))
|
|
||||||
t))
|
|
||||||
#+END_SRC
|
|
||||||
|
|
||||||
*** ~phundrak/prompt-toggle-abbreviation~
|
*** ~phundrak/prompt-toggle-abbreviation~
|
||||||
:PROPERTIES:
|
:PROPERTIES:
|
||||||
:CUSTOM_ID: User-Configuration-Custom-functions-macros-and-variables-phundrak-prompt-toggle-abbreviation-753ca549
|
:CUSTOM_ID: User-Configuration-Custom-functions-macros-and-variables-phundrak-prompt-toggle-abbreviation-753ca549
|
||||||
@ -2416,13 +2380,10 @@ such as with this document.
|
|||||||
<<org-confirm-babel>>
|
<<org-confirm-babel>>
|
||||||
;; Beautiful org
|
;; Beautiful org
|
||||||
<<beautiful-org-hooks>>
|
<<beautiful-org-hooks>>
|
||||||
|
<<beautiful-org-faces>>
|
||||||
<<beautiful-org-options>>
|
<<beautiful-org-options>>
|
||||||
<<beautiful-org-fontify-blocks>>
|
|
||||||
<<beautiful-org-fontify-inline>>
|
|
||||||
<<beautiful-org-images>>
|
<<beautiful-org-images>>
|
||||||
<<beautiful-org-latex-inline>>
|
<<beautiful-org-hide-macro-markers>>
|
||||||
<<beautiful-org-latex-inline-transparent>>
|
|
||||||
<<beautiful-org-macro-ellipsis-markers>>
|
|
||||||
<<beautiful-org-hide-dots>>
|
<<beautiful-org-hide-dots>>
|
||||||
;; Capture
|
;; Capture
|
||||||
<<org-capture-target-files>>
|
<<org-capture-target-files>>
|
||||||
@ -2632,219 +2593,46 @@ of:
|
|||||||
|
|
||||||
In order to make org-mode even sexier, let’s enable ~variable-pitch-mode~ for
|
In order to make org-mode even sexier, let’s enable ~variable-pitch-mode~ for
|
||||||
org-mode so we can get some proportional font. I’ll also remove ~auto-fill-mode~
|
org-mode so we can get some proportional font. I’ll also remove ~auto-fill-mode~
|
||||||
which seems to stick to Orgmode like hell and I don’t know why.
|
which seems to stick to Orgmode like hell and I don’t know why. A hook to
|
||||||
|
org-appear’s minor mode will also be added.
|
||||||
#+NAME: beautiful-org-hooks
|
#+NAME: beautiful-org-hooks
|
||||||
#+BEGIN_SRC emacs-lisp
|
#+BEGIN_SRC emacs-lisp
|
||||||
(add-hook 'org-mode-hook 'visual-line-mode)
|
(add-hook 'org-mode-hook 'visual-line-mode)
|
||||||
(remove-hook 'org-mode-hook 'auto-fill-mode)
|
(remove-hook 'org-mode-hook 'auto-fill-mode)
|
||||||
(add-hook 'org-mode-hook 'variable-pitch-mode)
|
(add-hook 'org-mode-hook 'variable-pitch-mode)
|
||||||
(auto-fill-mode -1)
|
(auto-fill-mode -1)
|
||||||
|
(add-hook 'org-mode-hook 'org-appear-mode)
|
||||||
#+END_SRC
|
#+END_SRC
|
||||||
|
|
||||||
You can then see the modified faces for org-mode [[#User-Configuration-Visual-configuration-Better-faces-Org-mode-07754177][here]].
|
You can then see the modified faces for org-mode [[#User-Configuration-Visual-configuration-Better-faces-Org-mode-07754177][here]].
|
||||||
|
|
||||||
By default, I would like my org-mode buffers to be indented and tables to be
|
Some other tweaks will make Org-mode more beautiful. This includes a new folding
|
||||||
aligned.
|
icon, some indentation that is not added whitespace.
|
||||||
#+NAME: beautiful-org-options
|
#+NAME: beautiful-org-options
|
||||||
#+BEGIN_SRC emacs-lisp
|
#+BEGIN_SRC emacs-lisp
|
||||||
(setq org-startup-indented t
|
(setq org-startup-indented t
|
||||||
org-startup-align-all-tables t)
|
org-startup-align-all-tables t
|
||||||
|
org-pretty-entities t
|
||||||
|
org-fontify-whole-heading-line t
|
||||||
|
org-fontify-done-headline t
|
||||||
|
org-fontify-quote-and-verse-blocks t
|
||||||
|
org-display-inline-images t
|
||||||
|
org-redisplay-inline-images t
|
||||||
|
org-startup-with-inline-images "inlineimages"
|
||||||
|
org-ellipsis " ")
|
||||||
#+END_SRC
|
#+END_SRC
|
||||||
|
|
||||||
***** Fontifying parts of org-mode
|
Let’s limit the width of images inlined in org buffers to 550px. It roughly
|
||||||
:PROPERTIES:
|
corresponds to the width of a paragraph on which ~org-fill-paragraph~ is called.
|
||||||
:CUSTOM_ID: User-Configuration-Emacs-builtins-Org-mode-Beautify-Org-mode-Fontifying-parts-of-org-mode-f690ee40
|
|
||||||
:END:
|
|
||||||
Some blocks of org-mode should have their own face, such as the whole heading
|
|
||||||
line, the done headline, the quote and the verse blocks,… actually, let’s enable
|
|
||||||
that for all of them.
|
|
||||||
#+name: beautiful-org-fontify-blocks
|
|
||||||
#+BEGIN_SRC emacs-lisp
|
|
||||||
(setq org-pretty-entities t
|
|
||||||
org-fontify-whole-heading-line t
|
|
||||||
org-fontify-done-headline t
|
|
||||||
org-fontify-quote-and-verse-blocks t)
|
|
||||||
#+END_SRC
|
|
||||||
|
|
||||||
***** Fontifying inline src blocks
|
|
||||||
:PROPERTIES:
|
|
||||||
:CUSTOM_ID: User-Configuration-Emacs-builtins-Org-mode-Beautify-Org-mode-Fontifying-inline-src-blocks-bf879724
|
|
||||||
:END:
|
|
||||||
When it comes to source blocks in org-mode, Emacs handle them really well with
|
|
||||||
some beautiful syntax highlight thanks to the the languages’ major mode and
|
|
||||||
their font-locks. But inline src blocks are the forgotten child and get next to
|
|
||||||
no love, which is really sad ; I want it to feel loved, to stand out from the
|
|
||||||
crowd and to give me what its brother gives me already!
|
|
||||||
|
|
||||||
Enters [[https://tecosaur.github.io/emacs-config/config.html#fontifying-inline-src][Tecosaur’s config]]! With ~org-src-font-lock-fontify-block~, anything’s
|
|
||||||
possible! And ~{{{results(...)}}}~ can also have the ~org-block~ face applied to
|
|
||||||
match and make org-mode even more beautiful! Let’s do it:
|
|
||||||
#+name: beautiful-org-fontify-inline
|
|
||||||
#+BEGIN_SRC emacs-lisp
|
|
||||||
(defvar org-prettify-inline-results t
|
|
||||||
"Whether to use (ab)use prettify-symbols-mode on
|
|
||||||
{{{results(...)}}}.")
|
|
||||||
|
|
||||||
(defun org-fontify-inline-src-blocks (limit)
|
|
||||||
"Try to apply `org-fontify-inline-src-blocks-1'."
|
|
||||||
(condition-case nil
|
|
||||||
(org-fontify-inline-src-blocks-1 limit)
|
|
||||||
(error (message "Org mode fontification error in %S at %d"
|
|
||||||
(current-buffer)
|
|
||||||
(line-number-at-pos)))))
|
|
||||||
|
|
||||||
(defun org-fontify-inline-src-blocks-1 (limit)
|
|
||||||
"Fontify inline src_LANG blocks, from `point' up to `LIMIT'."
|
|
||||||
(let ((case-fold-search t))
|
|
||||||
(when
|
|
||||||
; stolen from `org-element-inline-src-block-parser'
|
|
||||||
(re-search-forward "\\_<src_\\([^ \t\n[{]+\\)[{[]?" limit t)
|
|
||||||
(let ((beg (match-beginning 0))
|
|
||||||
pt
|
|
||||||
(lang-beg (match-beginning 1))
|
|
||||||
(lang-end (match-end 1)))
|
|
||||||
(remove-text-properties beg lang-end '(face nil))
|
|
||||||
(font-lock-append-text-property lang-beg lang-end 'face 'org-meta-line)
|
|
||||||
(font-lock-append-text-property beg lang-beg 'face 'shadow)
|
|
||||||
(font-lock-append-text-property beg lang-end 'face 'org-block)
|
|
||||||
(setq pt (goto-char lang-end))
|
|
||||||
(when (org-element--parse-paired-brackets ?\[)
|
|
||||||
(remove-text-properties pt (point) '(face nil))
|
|
||||||
(font-lock-append-text-property pt
|
|
||||||
(point)
|
|
||||||
'face
|
|
||||||
'org-block)
|
|
||||||
(setq pt (point)))
|
|
||||||
(when (org-element--parse-paired-brackets ?\{)
|
|
||||||
(remove-text-properties pt (point) '(face nil))
|
|
||||||
(font-lock-append-text-property pt
|
|
||||||
(1+ pt)
|
|
||||||
'face
|
|
||||||
'(org-block shadow))
|
|
||||||
(unless (= (1+ pt) (1- (point)))
|
|
||||||
(if org-src-fontify-natively
|
|
||||||
(org-src-font-lock-fontify-block
|
|
||||||
(buffer-substring-no-properties lang-beg
|
|
||||||
lang-end)
|
|
||||||
(1+ pt)
|
|
||||||
(1- (point)))
|
|
||||||
(font-lock-append-text-property (1+ pt)
|
|
||||||
(1- (point))
|
|
||||||
'face
|
|
||||||
'org-block)))
|
|
||||||
(font-lock-append-text-property (1- (point))
|
|
||||||
(point)
|
|
||||||
'face
|
|
||||||
'(org-block shadow))
|
|
||||||
(setq pt (point)))
|
|
||||||
(when (and org-prettify-inline-results
|
|
||||||
(re-search-forward "\\= {{{results(" limit t))
|
|
||||||
(font-lock-append-text-property pt
|
|
||||||
(1+ pt)
|
|
||||||
'face
|
|
||||||
'org-block)
|
|
||||||
(goto-char pt))))
|
|
||||||
(when (and org-prettify-inline-results
|
|
||||||
(re-search-forward "{{{results(\\(.+?\\))}}}"
|
|
||||||
limit t))
|
|
||||||
(remove-list-of-text-properties (match-beginning 0)
|
|
||||||
(point)
|
|
||||||
'(composition prettify-symbols-start prettify-symbols-end))
|
|
||||||
(font-lock-append-text-property (match-beginning 0)
|
|
||||||
(match-end 0)
|
|
||||||
'face
|
|
||||||
'org-block)
|
|
||||||
(let ((start (match-beginning 0))
|
|
||||||
(end (match-beginning 1)))
|
|
||||||
(with-silent-modifications (compose-region start end "⟨")
|
|
||||||
(add-text-properties start
|
|
||||||
end
|
|
||||||
`(prettify-symbols-start ,start prettify-symbols-end
|
|
||||||
,end))))
|
|
||||||
(let ((start (match-end 1))
|
|
||||||
(end (point)))
|
|
||||||
(with-silent-modifications (compose-region start end "⟩")
|
|
||||||
(add-text-properties start
|
|
||||||
end
|
|
||||||
`(prettify-symbols-start ,start prettify-symbols-end
|
|
||||||
,end)))))))
|
|
||||||
|
|
||||||
(defun org-fontify-inline-src-blocks-enable ()
|
|
||||||
"Add inline src fontification to font-lock in Org.
|
|
||||||
Must be run as part of `org-font-lock-set-keywords-hook'."
|
|
||||||
(setq org-font-lock-extra-keywords
|
|
||||||
(append org-font-lock-extra-keywords '((org-fontify-inline-src-blocks)))))
|
|
||||||
|
|
||||||
(add-hook 'org-font-lock-set-keywords-hook #'org-fontify-inline-src-blocks-enable)
|
|
||||||
#+END_SRC
|
|
||||||
|
|
||||||
***** Images in org-mode
|
|
||||||
:PROPERTIES:
|
|
||||||
:CUSTOM_ID: User-Configuration-Emacs-builtins-Org-mode-Beautify-Org-mode-Images-in-org-mode-8cf9bb6c
|
|
||||||
:END:
|
|
||||||
By default, images should be displayed inline, but not with a too large width. I
|
|
||||||
found that 550px fits well, since that is roughly the average width of the text
|
|
||||||
when ~org-fill-paragraph~ is called. Let’s also tell org-mode to display images
|
|
||||||
as inline images and redisplay them when needed.
|
|
||||||
#+NAME: beautiful-org-images
|
#+NAME: beautiful-org-images
|
||||||
#+BEGIN_SRC emacs-lisp
|
#+BEGIN_SRC emacs-lisp
|
||||||
(setq org-image-actual-width 550
|
(setq org-image-actual-width 550)
|
||||||
org-redisplay-inline-images t
|
|
||||||
org-display-inline-images t
|
|
||||||
org-startup-with-inline-images "inlineimages")
|
|
||||||
#+END_SRC
|
#+END_SRC
|
||||||
|
|
||||||
***** Prettier LaTeX inline rendering
|
Visually, I prefer to hide the markers of macros, so let’s do that:
|
||||||
:PROPERTIES:
|
#+NAME: beautiful-org-hide-macro-markers
|
||||||
:CUSTOM_ID: User-Configuration-Emacs-builtins-Org-mode-Beautify-Org-mode-Prettier-LaTeX-inline-rendering-66605d3c
|
|
||||||
:END:
|
|
||||||
[[https://tecosaur.github.io/emacs-config/config.html#prettier-rendering][Tecosaur strikes again]]! Let’s admit it, inline LaTeX code looks cool, properly
|
|
||||||
formatted LaTeX inline fragments look rad! Let’s fix their appearance:
|
|
||||||
#+name: beautiful-org-latex-inline
|
|
||||||
#+BEGIN_SRC emacs-lisp
|
#+BEGIN_SRC emacs-lisp
|
||||||
(setq org-format-latex-header "\\documentclass{article}
|
(setq org-hide-macro-markers t)
|
||||||
\\usepackage[usenames]{color}
|
|
||||||
|
|
||||||
\\usepackage[T1]{fontenc}
|
|
||||||
|
|
||||||
\\usepackage{booktabs}
|
|
||||||
|
|
||||||
\\pagestyle{empty} % do not remove
|
|
||||||
% The settings below are copied from fullpage.sty
|
|
||||||
\\setlength{\\textwidth}{\\paperwidth}
|
|
||||||
\\addtolength{\\textwidth}{-3cm}
|
|
||||||
\\setlength{\\oddsidemargin}{1.5cm}
|
|
||||||
\\addtolength{\\oddsidemargin}{-2.54cm}
|
|
||||||
\\setlength{\\evensidemargin}{\\oddsidemargin}
|
|
||||||
\\setlength{\\textheight}{\\paperheight}
|
|
||||||
\\addtolength{\\textheight}{-\\headheight}
|
|
||||||
\\addtolength{\\textheight}{-\\headsep}
|
|
||||||
\\addtolength{\\textheight}{-\\footskip}
|
|
||||||
\\addtolength{\\textheight}{-3cm}
|
|
||||||
\\setlength{\\topmargin}{1.5cm}
|
|
||||||
\\addtolength{\\topmargin}{-2.54cm}
|
|
||||||
% my custom stuff
|
|
||||||
\\usepackage[nofont,plaindd]{bmc-maths}
|
|
||||||
\\usepackage{arev}
|
|
||||||
")
|
|
||||||
#+END_SRC
|
|
||||||
|
|
||||||
And I much prefer when LaTeX fragments are transparent, so let’s make them.
|
|
||||||
#+name: beautiful-org-latex-inline-transparent
|
|
||||||
#+BEGIN_SRC emacs-lisp
|
|
||||||
(setq org-format-latex-options
|
|
||||||
(plist-put org-format-latex-options :background "Transparent"))
|
|
||||||
#+END_SRC
|
|
||||||
|
|
||||||
***** Symbols
|
|
||||||
:PROPERTIES:
|
|
||||||
:CUSTOM_ID: User-Configuration-Emacs-builtins-Org-mode-Beautify-Org-mode-Symbols-042d7374
|
|
||||||
:END:
|
|
||||||
I visually prefer to have a nicer folding icon in Emacs and the markers of macros hidden.
|
|
||||||
#+NAME: beautiful-org-macro-ellipsis-markers
|
|
||||||
#+BEGIN_SRC emacs-lisp
|
|
||||||
(setq org-hide-macro-markers t
|
|
||||||
org-ellipsis " ")
|
|
||||||
#+END_SRC
|
#+END_SRC
|
||||||
|
|
||||||
I also have an issue where small dots precede my org headers. Let’s fix that:
|
I also have an issue where small dots precede my org headers. Let’s fix that:
|
||||||
@ -3019,7 +2807,7 @@ Will be exported as if it were the buffer
|
|||||||
**** Capture
|
**** Capture
|
||||||
:PROPERTIES:
|
:PROPERTIES:
|
||||||
:CUSTOM_ID: User_Configuration-Org-mode-Org_capture-f58979cf
|
:CUSTOM_ID: User_Configuration-Org-mode-Org_capture-f58979cf
|
||||||
:header-args:org: :mkdirp yes :padline no
|
:header-args:org: :mkdirp yes
|
||||||
:END:
|
:END:
|
||||||
Org-capture is an amazing feature of Org-mode which allows me to quickly save
|
Org-capture is an amazing feature of Org-mode which allows me to quickly save
|
||||||
links, resources, reminders, and notes in neatly organized org files. Here they
|
links, resources, reminders, and notes in neatly organized org files. Here they
|
||||||
@ -3580,6 +3368,7 @@ Chinese and Korean) support.
|
|||||||
("" "amssymb" t)
|
("" "amssymb" t)
|
||||||
("" "capt-of" nil)
|
("" "capt-of" nil)
|
||||||
("" "minted" nil)
|
("" "minted" nil)
|
||||||
|
("" "xeCJK" nil)
|
||||||
("" "hyperref" nil)))
|
("" "hyperref" nil)))
|
||||||
#+END_SRC
|
#+END_SRC
|
||||||
|
|
||||||
@ -3618,65 +3407,6 @@ HTML. Let’s disable that since I never use it.
|
|||||||
(setq org-html-validation-link nil)
|
(setq org-html-validation-link nil)
|
||||||
#+END_SRC
|
#+END_SRC
|
||||||
|
|
||||||
However, something I very often use are metadata information in my HTML files. I
|
|
||||||
just want to automate that. Fortunately, [[https://tecosaur.github.io/emacs-config/config.html#extra-header-content,code--3][Tecosaur comes to the rescue]]! First,
|
|
||||||
here is our function that will generate all the meta tags in our HTML:
|
|
||||||
#+BEGIN_SRC emacs-lisp
|
|
||||||
(defun org-html-meta-tags-fancy (info)
|
|
||||||
"Use the INFO plist to construct the meta tags, as described in
|
|
||||||
`org-html-meta-tags'."
|
|
||||||
(message "%s" info)
|
|
||||||
(let ((title (org-html-plain-text
|
|
||||||
(org-element-interpret-data (plist-get info :title)) info))
|
|
||||||
(author (and (plist-get info :with-author)
|
|
||||||
(let ((auth (plist-get info :author)))
|
|
||||||
;; Return raw Org syntax.
|
|
||||||
(and auth (org-html-plain-text
|
|
||||||
(org-element-interpret-data auth) info))))))
|
|
||||||
(list
|
|
||||||
(when (org-string-nw-p author)
|
|
||||||
(list "name" "author" author))
|
|
||||||
(when (org-string-nw-p (plist-get info :description))
|
|
||||||
(list "name" "description"
|
|
||||||
(plist-get info :description)))
|
|
||||||
'("name" "generator" "org mode (Emacs)")
|
|
||||||
'("name" "theme-color" "#3b4252")
|
|
||||||
'("property" "og:type" "article")
|
|
||||||
(list "property" "og:title" title)
|
|
||||||
(let ((subtitle (org-export-data (plist-get info :subtitle) info)))
|
|
||||||
(when (org-string-nw-p subtitle)
|
|
||||||
(list "property" "og:description" subtitle)))
|
|
||||||
(let ((meta-image (org-export-data (plist-get info :metaimage) info)))
|
|
||||||
(when (org-string-nw-p meta-image)
|
|
||||||
(list "property" "og:image" meta-image)))
|
|
||||||
(let ((meta-image-type (org-export-data (plist-get info :metaimagetype) info)))
|
|
||||||
(when (org-string-nw-p meta-image-type)
|
|
||||||
(list "property" "og:image:type" meta-image-type)))
|
|
||||||
(let ((meta-image-width (org-export-data (plist-get info :metaimagewidth) info)))
|
|
||||||
(when (org-string-nw-p meta-image-width)
|
|
||||||
(list "property" "og:image:width" meta-image-width)))
|
|
||||||
(let ((meta-image-height (org-export-data (plist-get info :metaimageheight) info)))
|
|
||||||
(when (org-string-nw-p meta-image-height)
|
|
||||||
(list "property" "og:image:height" meta-image-height)))
|
|
||||||
(let ((meta-image-alt (org-export-data (plist-get info :metaimagealt) info)))
|
|
||||||
(when (org-string-nw-p meta-image-alt)
|
|
||||||
(list "property" "og:image:alt" meta-image-alt)))
|
|
||||||
(when (org-string-nw-p author)
|
|
||||||
(list "property" "og:article:author:first_name" (car (s-split-up-to " " author 2))))
|
|
||||||
(when (and (org-string-nw-p author) (s-contains-p " " author))
|
|
||||||
(list "property" "og:article:author:last_name" (cadr (s-split-up-to " " author 2))))
|
|
||||||
(list "property" "og:article:published_time" (format-time-string "%FT%T%z")))))
|
|
||||||
#+END_SRC
|
|
||||||
|
|
||||||
This will use some special keywords in our org buffer and insert their content in
|
|
||||||
|
|
||||||
Now let’s bind it to when we export our org buffer to HTML:
|
|
||||||
#+BEGIN_SRC emacs-lisp
|
|
||||||
(unless (functionp #'org-html-meta-tags-default)
|
|
||||||
(defalias 'org-html-meta-tags-default #'ignore))
|
|
||||||
(setq org-html-meta-tags #'org-html-meta-tags-fancy)
|
|
||||||
#+END_SRC
|
|
||||||
|
|
||||||
**** LaTeX formats
|
**** LaTeX formats
|
||||||
:PROPERTIES:
|
:PROPERTIES:
|
||||||
:CUSTOM_ID: User_Configuration-Org-mode-Custom_LaTeX_formats-8e8dca1c
|
:CUSTOM_ID: User_Configuration-Org-mode-Custom_LaTeX_formats-8e8dca1c
|
||||||
@ -3902,36 +3632,6 @@ include in exported files.
|
|||||||
user-mail-address "lucien@phundrak.com")
|
user-mail-address "lucien@phundrak.com")
|
||||||
#+END_SRC
|
#+END_SRC
|
||||||
|
|
||||||
*** Recentf
|
|
||||||
:PROPERTIES:
|
|
||||||
:CUSTOM_ID: User-Configuration-Emacs-builtins-Recentf-b00d8ddd
|
|
||||||
:END:
|
|
||||||
~recentf-mode~ allows Emacs to list all recent files it read. It is also used by
|
|
||||||
Spacemacs to display a list of recent files so they can be quickly opened by the
|
|
||||||
user. Unfortunately, a lot of these files are just noise I don’t care about, but
|
|
||||||
fortunately we can ignore files with the variable ~recentf-exclude~. So, I will
|
|
||||||
ignore these paths:
|
|
||||||
#+name: recentf-ignored-paths
|
|
||||||
| =~/.mail/= |
|
|
||||||
| =~/.emacs.d/= |
|
|
||||||
| =~/.elfeed/index= |
|
|
||||||
| =/tmp/= |
|
|
||||||
|
|
||||||
#+name: recentf-ignored-paths-gen
|
|
||||||
#+header: :var paths=recentf-ignored-paths
|
|
||||||
#+BEGIN_SRC emacs-lisp :tangle no :exports none
|
|
||||||
(mapconcat (lambda (path)
|
|
||||||
(format "(add-to-list 'recentf-exclude\n (expand-file-name \"%s\"))"
|
|
||||||
(replace-regexp-in-string "=" "" (car path))))
|
|
||||||
paths
|
|
||||||
"\n")
|
|
||||||
#+END_SRC
|
|
||||||
|
|
||||||
#+BEGIN_SRC emacs-lisp :noweb yes
|
|
||||||
(with-eval-after-load 'recentf
|
|
||||||
<<recentf-ignored-paths-gen()>>)
|
|
||||||
#+END_SRC
|
|
||||||
|
|
||||||
** Editing and modes
|
** Editing and modes
|
||||||
:PROPERTIES:
|
:PROPERTIES:
|
||||||
:CUSTOM_ID: User_Configuration-Editing_and_modes-7dbaf258
|
:CUSTOM_ID: User_Configuration-Editing_and_modes-7dbaf258
|
||||||
@ -4102,12 +3802,12 @@ As this is a new category, let’s declare its prefix:
|
|||||||
Now, let’s also declare the keybindings in this category. ~oac~ will invoke
|
Now, let’s also declare the keybindings in this category. ~oac~ will invoke
|
||||||
Emacs’ calculator, while ~oac~ invokes the calendar, ~oae~ invokes the Eww web
|
Emacs’ calculator, while ~oac~ invokes the calendar, ~oae~ invokes the Eww web
|
||||||
browser, ~oaw~ invokes ~woman~ (actually ~helm-man-woman~), and ~oaW~ invokes
|
browser, ~oaw~ invokes ~woman~ (actually ~helm-man-woman~), and ~oaW~ invokes
|
||||||
the weather forecast. Lastly, the apostrophe in ~o'~ will invoke Eshell
|
the weather forecast. Lastly, the apostrophe in ~oa'~ will invoke Eshell
|
||||||
directly, without any popup window as with ~,'~ while ~oan~ will open a new
|
directly, without any popup window as with ~,'~ while ~oan~ will open a new
|
||||||
eshell buffer if another one already exists.
|
eshell buffer if another one already exists.
|
||||||
#+BEGIN_SRC emacs-lisp
|
#+BEGIN_SRC emacs-lisp
|
||||||
(spacemacs/set-leader-keys
|
(spacemacs/set-leader-keys
|
||||||
"o'" 'eshell
|
"oa'" 'eshell
|
||||||
"oac" 'calc
|
"oac" 'calc
|
||||||
"oaC" 'calendar
|
"oaC" 'calendar
|
||||||
"oae" 'eww
|
"oae" 'eww
|
||||||
@ -4116,23 +3816,6 @@ eshell buffer if another one already exists.
|
|||||||
"oaW" 'wttrin)
|
"oaW" 'wttrin)
|
||||||
#+END_SRC
|
#+END_SRC
|
||||||
|
|
||||||
**** Image mode
|
|
||||||
:PROPERTIES:
|
|
||||||
:CUSTOM_ID: User-Configuration-Keybindings-Applications-Image-mode-e5df694e
|
|
||||||
:END:
|
|
||||||
Viewing images in Emacs is nice, but I want to be able to do more than just view
|
|
||||||
them, such as opening them in GIMP. I’ll also declare a couple of keybindings
|
|
||||||
that make sense to me.
|
|
||||||
#+BEGIN_SRC emacs-lisp
|
|
||||||
(spacemacs/declare-prefix-for-mode 'image-mode "G" "Open in GIMP")
|
|
||||||
(spacemacs/declare-prefix-for-mode 'image-mode "o" "Open in external viewer")
|
|
||||||
(spacemacs/declare-prefix-for-mode 'image-mode "r" "Rotate clockwise")
|
|
||||||
(spacemacs/set-leader-keys-for-major-mode 'image-mode
|
|
||||||
"G" (lambda () (interactive) (start-process "" nil "gimp" (buffer-name)))
|
|
||||||
"o" (lambda () (interactive) (start-process "" nil "xdg-open" (buffer-name)))
|
|
||||||
"r" 'image-rotate)
|
|
||||||
#+END_SRC
|
|
||||||
|
|
||||||
**** Org tree slide
|
**** Org tree slide
|
||||||
:PROPERTIES:
|
:PROPERTIES:
|
||||||
:CUSTOM_ID: User_Configuration-Keybindings-Applications-Org_tree_slide-29545c5e
|
:CUSTOM_ID: User_Configuration-Keybindings-Applications-Org_tree_slide-29545c5e
|
||||||
@ -4494,22 +4177,6 @@ signature to emails to the hook called when creating a new email.
|
|||||||
(add-hook 'mu4e-compose-mode-hook 'mml-secure-message-sign-pgpmime)
|
(add-hook 'mu4e-compose-mode-hook 'mml-secure-message-sign-pgpmime)
|
||||||
#+END_SRC
|
#+END_SRC
|
||||||
|
|
||||||
mu4e used to be able to export emails to PDFs, but unfortunately this
|
|
||||||
possibility was discontinued. But we can (sort of) bring it back!
|
|
||||||
#+BEGIN_SRC emacs-lisp
|
|
||||||
(defun mu4e-action-open-as-pdf (msg)
|
|
||||||
"Export and open as PDF a mu4e `MSG'"
|
|
||||||
(let* ((date (mu4e-message-field msg :date))
|
|
||||||
(infile (mu4e~write-body-to-html msg))
|
|
||||||
(outfile (format-time-string "/tmp/%Y-%m-%d%H%M%S.pdf" date)))
|
|
||||||
(with-temp-buffer
|
|
||||||
(shell-command
|
|
||||||
(format "wkhtmltopdf %s %s" infile outfile) t))
|
|
||||||
(find-file outfile)))
|
|
||||||
|
|
||||||
(add-to-list 'mu4e-view-actions '("PDF view" . mu4e-action-open-as-pdf) t)
|
|
||||||
#+END_SRC
|
|
||||||
|
|
||||||
Lastly, some emails are better displayed in a browser than in Emacs. My Emacs
|
Lastly, some emails are better displayed in a browser than in Emacs. My Emacs
|
||||||
build has the webkit browser enabled, so I’ll add an option to open with it
|
build has the webkit browser enabled, so I’ll add an option to open with it
|
||||||
emails.
|
emails.
|
||||||
@ -4809,8 +4476,8 @@ Emacs throws me an error about the python interpreter, let’s silence it:
|
|||||||
I need to point to racer where the source code of Rust is located so I can get
|
I need to point to racer where the source code of Rust is located so I can get
|
||||||
some documentation. This is installed with the ~rust-src~ component you can get
|
some documentation. This is installed with the ~rust-src~ component you can get
|
||||||
through ~rustup~. To install it, simply run
|
through ~rustup~. To install it, simply run
|
||||||
#+BEGIN_SRC sh :tangle no :exports code
|
#+BEGIN_SRC shell :tangle no :exports code
|
||||||
rustup component add rust-src
|
$ rustup component add rust-src
|
||||||
#+END_SRC
|
#+END_SRC
|
||||||
|
|
||||||
Now, the source code for Rust should be included in your installation. I
|
Now, the source code for Rust should be included in your installation. I
|
||||||
@ -4824,8 +4491,8 @@ search for documentation in the stable sources:
|
|||||||
Rust’s default ~cargo check~ command is already very good, however I also enjoy
|
Rust’s default ~cargo check~ command is already very good, however I also enjoy
|
||||||
getting some more hints while developping, and ~clippy~ does a very good job at
|
getting some more hints while developping, and ~clippy~ does a very good job at
|
||||||
it. To get clippy, I need to run the following to install it:
|
it. To get clippy, I need to run the following to install it:
|
||||||
#+BEGIN_SRC sh :tangle no :exports code
|
#+BEGIN_SRC shell
|
||||||
rustup compontent add clippy
|
$ rustup compontent add clippy
|
||||||
#+END_SRC
|
#+END_SRC
|
||||||
|
|
||||||
And this will get it installed with all of my Rust toolchain, and it will be
|
And this will get it installed with all of my Rust toolchain, and it will be
|
||||||
@ -4837,11 +4504,12 @@ updated with it. Now, let’s indicate LSP that I want to use that instead of
|
|||||||
|
|
||||||
Finally, I wish to enable ~electric-pair-mode~ and ~indent-guide-mode~ for Rust
|
Finally, I wish to enable ~electric-pair-mode~ and ~indent-guide-mode~ for Rust
|
||||||
files, so let’s enable that through the use of a hook:
|
files, so let’s enable that through the use of a hook:
|
||||||
#+BEGIN_SRC emacs-lisp :tangle no
|
#+BEGIN_SRC emacs-lisp
|
||||||
(add-hook 'rust-mode-hook
|
(add-hook 'rust-mode-hook
|
||||||
'(lambda ()
|
'(lambda ()
|
||||||
(local-set-key (kbd "TAB") #'company-indent-or-complete-common)
|
(local-set-key (kbd "TAB") #'company-indent-or-complete-common)
|
||||||
(electric-pair-mode 1)))
|
(electric-pair-mode 1)
|
||||||
|
(indent-guide-mode 1)))
|
||||||
#+END_SRC
|
#+END_SRC
|
||||||
|
|
||||||
*** Scheme
|
*** Scheme
|
||||||
@ -5024,7 +4692,6 @@ The user can also add some tags if they wish to.
|
|||||||
*** Org blocks
|
*** Org blocks
|
||||||
:PROPERTIES:
|
:PROPERTIES:
|
||||||
:CUSTOM_ID: User_Configuration-Snippets-org-mode_snippets-Org_blocks-e4dfc448
|
:CUSTOM_ID: User_Configuration-Snippets-org-mode_snippets-Org_blocks-e4dfc448
|
||||||
:HEADER-ARGS:snippet: :padline no :mkdirp yes
|
|
||||||
:END:
|
:END:
|
||||||
Now, Let’s write some snippets for org blocks. The first one is for a comment
|
Now, Let’s write some snippets for org blocks. The first one is for a comment
|
||||||
block, then two snippets for an unnamed and a named Elisp source block, and two
|
block, then two snippets for an unnamed and a named Elisp source block, and two
|
||||||
@ -5283,12 +4950,12 @@ I’ll get into more detail below this code block.
|
|||||||
Apparently, diff and Magit faces do not follow the nord theme’s color scheme, so
|
Apparently, diff and Magit faces do not follow the nord theme’s color scheme, so
|
||||||
let’s redefine their background and sometimes their foreground.
|
let’s redefine their background and sometimes their foreground.
|
||||||
#+tblname: diff-faces
|
#+tblname: diff-faces
|
||||||
| / | |
|
| / | | |
|
||||||
| Name | background |
|
| Name | background | foreground |
|
||||||
|----------------------+------------------|
|
|----------------------+------------------+------------|
|
||||||
| ediff-current-diff-A | ,phundrak/nord11 |
|
| ediff-current-diff-A | ,phundrak/nord11 | |
|
||||||
| ediff-current-diff-C | ,phundrak/nord13 |
|
| ediff-current-diff-C | ,phundrak/nord13 | |
|
||||||
| ediff-current-diff-C | ,phundrak/nord14 |
|
| ediff-current-diff-C | ,phundrak/nord14 | |
|
||||||
|
|
||||||
**** Mu4e
|
**** Mu4e
|
||||||
:PROPERTIES:
|
:PROPERTIES:
|
||||||
|
@ -170,6 +170,7 @@ highlighting. Let’s set the manpager to bat then:
|
|||||||
set -x MANPAGER "sh -c 'col -bx | bat -l man -p'"
|
set -x MANPAGER "sh -c 'col -bx | bat -l man -p'"
|
||||||
#+END_SRC
|
#+END_SRC
|
||||||
|
|
||||||
|
|
||||||
** Development
|
** Development
|
||||||
:PROPERTIES:
|
:PROPERTIES:
|
||||||
:CUSTOM_ID: Global_variables-Development-76b3ff13
|
:CUSTOM_ID: Global_variables-Development-76b3ff13
|
||||||
|
Loading…
Reference in New Issue
Block a user