Browse Source

test

master
marc 5 years ago
parent
commit
4e501cda18
1 changed files with 46 additions and 14 deletions
  1. 60
      config.org

60
config.org

@ -1,5 +1,7 @@
#+TITLE: Emacs Configuration #+TITLE: Emacs Configuration
#+AUTHOR: Marc Pohling #+AUTHOR: Marc Pohling
#+BABEL: :cache yes
#+PROPERTY: :header-args :tangle yes
* Personal Information * Personal Information
@ -31,7 +33,7 @@
- markdown: - markdown:
add hooks for certain file extensions, maybe add a smart way to start gfm-mode if markdown-file is in a git-project add hooks for certain file extensions, maybe add a smart way to start gfm-mode if markdown-file is in a git-project
- move package dependend configurations inside the package configuration itself, like keymaps for magit - move package dependend configurations inside the package configuration itself, like keymaps for magit
- get rid of user-local and user-global and work with git-ignore
* Update config in a running config * Update config in a running config
Two options: Two options:
- reload the open file: M-x load-file, then press twice to accept - reload the open file: M-x load-file, then press twice to accept
@ -151,10 +153,17 @@
Don't add the font in the work environment, which I am logged in as POH Don't add the font in the work environment, which I am logged in as POH
#+BEGIN_SRC emacs-lisp #+BEGIN_SRC emacs-lisp
(pcase my/whoami
("home" (set-face-attribute 'default nil :font "Hack-10"))
("work_hyperv" (set-face-attribute 'default nil :font "Hack-12"))
)
; (set-face-attribute 'default nil
; :family "Hack Nerd Font Mono-14"
; :height 110
; :weight 'normal
; :width 'normal)
(set-face-font 'default "Hack Nerd Font Mono-10")
; (pcase my/whoami
; ("home" (set-face-font 'default "Hack Nerd Font Mono-10"))
;; ("home" (set-face-attribute 'default nil :font "Hack-10"))
; ("work_hyperv" (set-face-attribute 'default nil :font "Hack-12"))
; )
#+END_SRC #+END_SRC
** Themes ** Themes
@ -1121,8 +1130,8 @@ fi
#+BEGIN_EXAMPLE #+BEGIN_EXAMPLE
cd /opt cd /opt
python3 -m venv vava
source ./vava/bin/activate
python3 -m venv fava
source ./fava/bin/activate
pip3 install wheel pip3 install wheel
pip3 install fava pip3 install fava
deactivate deactivate
@ -1379,6 +1388,15 @@ Backend configuration for beancount
) )
#+END_SRC #+END_SRC
Backend configuration for lua
#+BEGIN_SRC emacs-lisp
(defun company/lua-mode-hook()
(set (make-local-variable 'company-backends)
'(company-lua))
(company-mode t)
)
#+END_SRC
** Misc Company packages ** Misc Company packages
Addon to sort suggestions by usage Addon to sort suggestions by usage
@ -1459,7 +1477,7 @@ Maybe add [[https://github.com/hlissner/emacs-company-dict][company-dict]]? It's
:diminish yas-minor-mode :diminish yas-minor-mode
:init :init
(yas-global-mode t) (yas-global-mode t)
(setq yas-snippet-dirs (concat PATH_USER_GLOBAL "snippets"))
;; (setq yas-snippet-dirs '(concat PATH_USER_GLOBAL "snippets"))
:mode ("\\.yasnippet" . snippet-mode) :mode ("\\.yasnippet" . snippet-mode)
:config :config
(unless (string-equal my/whoami "work_remote") ; very hacky, but yas-reload-all throws a wrongp error at work (unless (string-equal my/whoami "work_remote") ; very hacky, but yas-reload-all throws a wrongp error at work
@ -1490,6 +1508,15 @@ Add some helpers to handle and understand macros
(define-key emacs-lisp-mode-map (kbd "C-c c") 'macrostep-collapse)) (define-key emacs-lisp-mode-map (kbd "C-c c") 'macrostep-collapse))
#+END_SRC #+END_SRC
** LUA
#+BEGIN_SRC emacs-lisp
(use-package lua-mode
:ensure t
:mode (("\\.lua$" . lua-mode))
:init
(add-hook 'lua-mode-hook 'company/lua-mode-hook)
)
#+END_SRC
** R ** R
TODO: test it TODO: test it
For now only enable ESS at home. Not sure if it is useful at work. For now only enable ESS at home. Not sure if it is useful at work.
@ -1766,9 +1793,14 @@ BEGIN_SRC emacs-lisp
END_SRC END_SRC
** Latex ** Latex
Requirements for Linux:
- Latex
- pdf-tools
Requirements for Debian:
- texlive (texlive-base?)
- elpa-pdf-tools
- dh-autoreconf?
Recommended:
- texlive-lang-german
- texlive-latex-extra
The midnight mode hook is disabled for now, because CVs with my pic just look weird in this mode. The midnight mode hook is disabled for now, because CVs with my pic just look weird in this mode.
@ -1790,12 +1822,12 @@ END_SRC
) )
#+END_SRC #+END_SRC
For latex-preview-pane a patch might be necessary (as of 2017-10), see the issue [[https://github.com/jsinglet/latex-preview-pane/issues/37][here]]
Update 2018-03: It seems to work without this patch. I will keep it here in case something breaks again.
For latex-preview-pane a patch might be necessary (as of 2017-10), see the issue [[https://github.com/jsinglet/latex-preview-pane/issues/37][here]].
Without it, the preview pane won't update, even when compiling works fine.
#+BEGIN_SRC #+BEGIN_SRC
latex-preview-pane-update-p() latex-preview-pane-update-p()
--- (doc-view-revert-buffer nil t) --- (doc-view-revert-buffer nil t)
+++ (revert-buffer-nil t 'preserve-modes)
+++ (revert-buffer nil t 'preserve-modes)
#+END_SRC #+END_SRC
After that M-x byte-compile-file After that M-x byte-compile-file

Loading…
Cancel
Save