|
|
@ -51,43 +51,43 @@ When pulling the repository the first time, an initial init.el needs to be setup |
|
|
|
This function updates init.el whenever changes in init.org are made. The update will be active after saving. |
|
|
|
|
|
|
|
#+BEGIN_SRC emacs-lisp |
|
|
|
(defun me/tangle-init () |
|
|
|
"If the current buffer is 'init.org', |
|
|
|
the code blocks are tangled, and the tangled file is compiled." |
|
|
|
(when (equal (buffer-file-name) |
|
|
|
(expand-file-name (concat user-emacs-directory "init.org"))) |
|
|
|
;; avoid running hooks |
|
|
|
(let ((prog-mode-hook nil)) |
|
|
|
(defun me/tangle-init () |
|
|
|
"If the current buffer is 'init.org', the code blocks are tangled, and the tangled file is compiled." |
|
|
|
(when (equal (buffer-file-name) |
|
|
|
(expand-file-name (concat user-emacs-directory "init.org"))) |
|
|
|
;; avoid running hooks |
|
|
|
(let ((prog-mode-hook nil)) |
|
|
|
(org-babel-tangle) |
|
|
|
(byte-compile-file (concat user-emacs-directory "init.el")) |
|
|
|
(load-file user-init-file)))) |
|
|
|
(add-hook 'after-save-hook 'me/tangle-init) |
|
|
|
(add-hook 'after-save-hook 'me/tangle-init) |
|
|
|
#+END_SRC |
|
|
|
|
|
|
|
#+BEGIN_SRC emacs-lisp |
|
|
|
(require 'package) |
|
|
|
(require 'package) |
|
|
|
|
|
|
|
(add-to-list 'package-archives '("elpa" . "https://elpa.gnu.org/packages/") t) |
|
|
|
(add-to-list 'package-archives '("melpa" . "https://melpa.org/packages/") t) |
|
|
|
(add-to-list 'package-archives '("melpa-stable" . "https://stable.melpa.org/packages/") t) |
|
|
|
(add-to-list 'package-archives '("org" . "https://orgmode.org/elpa/") t) |
|
|
|
(add-to-list 'package-archives '("elpa" . "https://elpa.gnu.org/packages/") t) |
|
|
|
(add-to-list 'package-archives '("melpa" . "https://melpa.org/packages/") t) |
|
|
|
(add-to-list 'package-archives '("melpa-stable" . "https://stable.melpa.org/packages/") t) |
|
|
|
(add-to-list 'package-archives '("org" . "https://orgmode.org/elpa/") t) |
|
|
|
|
|
|
|
(when (< emacs-major-version 27) |
|
|
|
(package-initialize)) |
|
|
|
#+END_SRC |
|
|
|
|
|
|
|
#+BEGIN_SRC emacs-lisp |
|
|
|
(unless (package-installed-p 'use-package) |
|
|
|
(package-refresh-contents) |
|
|
|
(package-install 'use-package)) |
|
|
|
(unless (package-installed-p 'use-package) |
|
|
|
(package-refresh-contents) |
|
|
|
(package-install 'use-package)) |
|
|
|
|
|
|
|
(setq use-package-verbose nil) |
|
|
|
(setq use-package-verbose nil) |
|
|
|
|
|
|
|
(eval-when-compile |
|
|
|
(require 'use-package)) |
|
|
|
(require 'bind-key) |
|
|
|
(use-package diminish |
|
|
|
:ensure t) |
|
|
|
(eval-when-compile |
|
|
|
(require 'use-package)) |
|
|
|
(require 'bind-key) |
|
|
|
|
|
|
|
(use-package diminish |
|
|
|
:ensure t) |
|
|
|
#+END_SRC |
|
|
|
|
|
|
|
cl is deprecated in favor for cl-lib, some packages like emmet still depend on cl. |
|
|
@ -204,17 +204,17 @@ Edit bookmarks (while in bookmark file): |
|
|
|
|
|
|
|
Some windows specific stuff |
|
|
|
#+BEGIN_SRC emacs-lisp |
|
|
|
(when *sys/windows* |
|
|
|
(remove-hook 'find-file-hook 'vc-refresh-state) |
|
|
|
(progn |
|
|
|
(setq gc-cons-threshold (* 511 1024 1024) |
|
|
|
gc-cons-percentage 0.5 |
|
|
|
garbage-collection-messages t) |
|
|
|
(run-with-idle-timer 5 t #'garbage-collect)) |
|
|
|
(when (boundp 'w32-pipe-read-delay) |
|
|
|
(setq w32-pipe-read-delay 0)) |
|
|
|
(when (boundp 'w32-get-true-file-attributes) |
|
|
|
(setq w32-get-true-file-attributes nil))) |
|
|
|
(when *sys/windows* |
|
|
|
(remove-hook 'find-file-hook 'vc-refresh-state) |
|
|
|
(progn |
|
|
|
(setq gc-cons-threshold (* 511 1024 1024) |
|
|
|
gc-cons-percentage 0.5 |
|
|
|
garbage-collection-messages t) |
|
|
|
(run-with-idle-timer 5 t #'garbage-collect)) |
|
|
|
(when (boundp 'w32-pipe-read-delay) |
|
|
|
(setq w32-pipe-read-delay 0)) |
|
|
|
(when (boundp 'w32-get-true-file-attributes) |
|
|
|
(setq w32-get-true-file-attributes nil))) |
|
|
|
#+END_SRC |
|
|
|
* visuals |
|
|
|
** Font |
|
|
@ -259,12 +259,12 @@ Windows Theme: |
|
|
|
:ID: 14ae933e-2941-4cc3-82de-38f90f91bfd3 |
|
|
|
:END: |
|
|
|
#+BEGIN_SRC emacs-lisp |
|
|
|
(global-visual-line-mode) |
|
|
|
(diminish 'visual-line-mode) |
|
|
|
(use-package adaptive-wrap |
|
|
|
:ensure t |
|
|
|
:config |
|
|
|
(add-hook 'visual-line-mode-hook #'adaptive-wrap-prefix-mode)) |
|
|
|
(global-visual-line-mode) |
|
|
|
(diminish 'visual-line-mode) |
|
|
|
(use-package adaptive-wrap |
|
|
|
:ensure t |
|
|
|
:config |
|
|
|
(add-hook 'visual-line-mode-hook #'adaptive-wrap-prefix-mode)) |
|
|
|
; :init |
|
|
|
; (when (fboundp 'adaptive-wrap-prefix-mode) |
|
|
|
; (defun my/activate-adaptive-wrap-prefix-mode () |
|
|
@ -277,15 +277,15 @@ Windows Theme: |
|
|
|
:ID: 7b969436-98c9-4b61-ba7a-9fb22c9781ad |
|
|
|
:END: |
|
|
|
#+BEGIN_SRC emacs-lisp |
|
|
|
(use-package display-line-numbers |
|
|
|
(use-package display-line-numbers |
|
|
|
:init |
|
|
|
(add-hook 'prog-mode-hook 'display-line-numbers-mode) |
|
|
|
(add-hook 'org-src-mode-hook 'display-line-numbers-mode) |
|
|
|
(add-hook 'prog-mode-hook 'display-line-numbers-mode) |
|
|
|
(add-hook 'org-src-mode-hook 'display-line-numbers-mode) |
|
|
|
:config |
|
|
|
(setq-default display-line-numbers-type 'visual |
|
|
|
display-line-numbers-current-absolute t |
|
|
|
display-line-numbers-with 4 |
|
|
|
display-line-numbers-widen t)) |
|
|
|
display-line-numbers-current-absolute t |
|
|
|
display-line-numbers-with 4 |
|
|
|
display-line-numbers-widen t)) |
|
|
|
; (add-hook 'emacs-lisp-mode-hook 'display-line-numbers-mode) |
|
|
|
#+END_SRC |
|
|
|
** misc |
|
|
@ -308,10 +308,10 @@ Windows Theme: |
|
|
|
:END: |
|
|
|
#+BEGIN_SRC emacs-lisp |
|
|
|
(use-package undo-tree |
|
|
|
:ensure t |
|
|
|
:diminish undo-tree-mode |
|
|
|
:init |
|
|
|
(global-undo-tree-mode 1)) |
|
|
|
:ensure t |
|
|
|
:diminish undo-tree-mode |
|
|
|
:init |
|
|
|
(global-undo-tree-mode 1)) |
|
|
|
#+END_SRC |
|
|
|
* ace-window |
|
|
|
#+begin_src emacs-lisp |
|
|
@ -346,14 +346,14 @@ Windows Theme: |
|
|
|
:ID: a880f079-b3a3-4706-bf1e-5f6c680101f1 |
|
|
|
:END: |
|
|
|
#+BEGIN_SRC emacs-lisp |
|
|
|
(use-package which-key |
|
|
|
:ensure t |
|
|
|
:diminish which-key-mode |
|
|
|
:config |
|
|
|
(which-key-mode) |
|
|
|
(which-key-setup-side-window-right-bottom) |
|
|
|
(which-key-setup-minibuffer) |
|
|
|
(setq which-key-idle-delay 0.5)) |
|
|
|
(use-package which-key |
|
|
|
:ensure t |
|
|
|
:diminish which-key-mode |
|
|
|
:config |
|
|
|
(which-key-mode) |
|
|
|
(which-key-setup-side-window-right-bottom) |
|
|
|
(which-key-setup-minibuffer) |
|
|
|
(setq which-key-idle-delay 0.5)) |
|
|
|
#+END_SRC |
|
|
|
|
|
|
|
* Evil |
|
|
@ -362,27 +362,27 @@ Windows Theme: |
|
|
|
:END: |
|
|
|
|
|
|
|
#+BEGIN_SRC emacs-lisp |
|
|
|
(use-package evil |
|
|
|
:ensure t |
|
|
|
:defer .1 ;; don't block emacs when starting, load evil immediately after startup |
|
|
|
:config |
|
|
|
(evil-mode 1)) |
|
|
|
(use-package evil |
|
|
|
:ensure t |
|
|
|
:defer .1 ;; don't block emacs when starting, load evil immediately after startup |
|
|
|
:config |
|
|
|
(evil-mode 1)) |
|
|
|
#+END_SRC |
|
|
|
* General (key mapper) |
|
|
|
:PROPERTIES: |
|
|
|
:ID: a20f183f-d41a-4dff-bc37-3bc4e25c8036 |
|
|
|
:END: |
|
|
|
#+BEGIN_SRC emacs-lisp |
|
|
|
(use-package general |
|
|
|
:ensure t) |
|
|
|
|
|
|
|
(general-define-key |
|
|
|
:states 'normal |
|
|
|
:keymaps 'imenu-list-major-mode-map |
|
|
|
(kbd "RET") '(imenu-list-goto-entry :which-key "goto") |
|
|
|
(kbd "TAB") '(hs-toggle-hiding :which-key "collapse") |
|
|
|
"d" '(imenu-list-display-entry :which-key "show") |
|
|
|
"q" '(imenu-list-quit-window :which-key "quit")) |
|
|
|
(use-package general |
|
|
|
:ensure t) |
|
|
|
|
|
|
|
(general-define-key |
|
|
|
:states 'normal |
|
|
|
:keymaps 'imenu-list-major-mode-map |
|
|
|
(kbd "RET") '(imenu-list-goto-entry :which-key "goto") |
|
|
|
(kbd "TAB") '(hs-toggle-hiding :which-key "collapse") |
|
|
|
"d" '(imenu-list-display-entry :which-key "show") |
|
|
|
"q" '(imenu-list-quit-window :which-key "quit")) |
|
|
|
#+END_SRC |
|
|
|
* ivy / counsel / swiper |
|
|
|
:PROPERTIES: |
|
|
@ -391,39 +391,39 @@ Windows Theme: |
|
|
|
|
|
|
|
#+BEGIN_SRC emacs-lisp |
|
|
|
; (require 'ivy) |
|
|
|
(use-package ivy |
|
|
|
:ensure t |
|
|
|
:diminish |
|
|
|
(ivy-mode . "") |
|
|
|
:init |
|
|
|
(ivy-mode 1) |
|
|
|
:bind |
|
|
|
("C-r" . ivy-resume) ;; overrides isearch-backwards binding |
|
|
|
:config |
|
|
|
(setq ivy-use-virtual-buffers t ;; recent files and bookmarks in ivy-switch-buffer |
|
|
|
ivy-height 20 ;; height of ivy window |
|
|
|
ivy-count-format "%d/%d" ;; current and total number |
|
|
|
ivy-re-builders-alist ;; regex replaces spaces with * |
|
|
|
'((t . ivy--regex-plus)))) |
|
|
|
|
|
|
|
(use-package counsel |
|
|
|
:ensure t |
|
|
|
:bind* |
|
|
|
(("M-x" . counsel-M-x) |
|
|
|
("C-x C-f" . counsel-find-file) |
|
|
|
("C-x C-r" . counsel-recentf) |
|
|
|
("C-c C-f" . counsel-git) |
|
|
|
("C-c h f" . counsel-describe-function) |
|
|
|
("C-c h v" . counsel-describe-variable) |
|
|
|
("M-i" . counsel-imenu))) |
|
|
|
|
|
|
|
(use-package swiper |
|
|
|
:ensure t |
|
|
|
:bind |
|
|
|
("C-s" . swiper)) |
|
|
|
(use-package ivy |
|
|
|
:ensure t |
|
|
|
:diminish |
|
|
|
(ivy-mode . "") |
|
|
|
:init |
|
|
|
(ivy-mode 1) |
|
|
|
:bind |
|
|
|
("C-r" . ivy-resume) ;; overrides isearch-backwards binding |
|
|
|
:config |
|
|
|
(setq ivy-use-virtual-buffers t ;; recent files and bookmarks in ivy-switch-buffer |
|
|
|
ivy-height 20 ;; height of ivy window |
|
|
|
ivy-count-format "%d/%d" ;; current and total number |
|
|
|
ivy-re-builders-alist ;; regex replaces spaces with * |
|
|
|
'((t . ivy--regex-plus)))) |
|
|
|
|
|
|
|
(use-package counsel |
|
|
|
:ensure t |
|
|
|
:bind* |
|
|
|
(("M-x" . counsel-M-x) |
|
|
|
("C-x C-f" . counsel-find-file) |
|
|
|
("C-x C-r" . counsel-recentf) |
|
|
|
("C-c C-f" . counsel-git) |
|
|
|
("C-c h f" . counsel-describe-function) |
|
|
|
("C-c h v" . counsel-describe-variable) |
|
|
|
("M-i" . counsel-imenu))) |
|
|
|
|
|
|
|
(use-package swiper |
|
|
|
:ensure t |
|
|
|
:bind |
|
|
|
("C-s" . swiper)) |
|
|
|
|
|
|
|
(use-package ivy-hydra |
|
|
|
:ensure t) |
|
|
|
:ensure t) |
|
|
|
#+END_SRC |
|
|
|
|
|
|
|
* company |
|
|
@ -477,20 +477,20 @@ Windows Theme: |
|
|
|
:END: |
|
|
|
|
|
|
|
#+BEGIN_SRC emacs-lisp |
|
|
|
(defun company/org-mode-hook() |
|
|
|
(set (make-local-variable 'company-backends) |
|
|
|
'(company-capf company-files)) |
|
|
|
(add-hook 'completion-at-point-functions 'pcomplete-completions-at-point nil t) |
|
|
|
(message "company/org-mode-hook")) |
|
|
|
|
|
|
|
(defun company/elisp-mode-hook() |
|
|
|
(set (make-local-variable 'company-backends) |
|
|
|
'(company-capf company-files)) |
|
|
|
(message "company/elisp-mode-hook")) |
|
|
|
|
|
|
|
(defun company/beancount-mode-hook() |
|
|
|
(set (make-local-variable 'company-backends) |
|
|
|
'(company-beancount))) |
|
|
|
(defun company/org-mode-hook() |
|
|
|
(set (make-local-variable 'company-backends) |
|
|
|
'(company-capf company-files)) |
|
|
|
(add-hook 'completion-at-point-functions 'pcomplete-completions-at-point nil t) |
|
|
|
(message "company/org-mode-hook")) |
|
|
|
|
|
|
|
(defun company/elisp-mode-hook() |
|
|
|
(set (make-local-variable 'company-backends) |
|
|
|
'(company-capf company-files)) |
|
|
|
(message "company/elisp-mode-hook")) |
|
|
|
|
|
|
|
(defun company/beancount-mode-hook() |
|
|
|
(set (make-local-variable 'company-backends) |
|
|
|
'(company-beancount))) |
|
|
|
#+END_SRC |
|
|
|
* orgmode |
|
|
|
** org |
|
|
@ -516,7 +516,7 @@ Windows Theme: |
|
|
|
(concat MY--PATH_ORG_FILES "tasks.org"))) |
|
|
|
(when *sys/linux* |
|
|
|
(nconc org-agenda-files |
|
|
|
(directory-files-recursively MY--PATH_ORG_FILES_MOBILE "\\.org$"))) |
|
|
|
(directory-files-recursively MY--PATH_ORG_FILES_MOBILE "\\.org$"))) |
|
|
|
(setq org-id-locations-file (concat MY--PATH_USER_LOCAL ".org-id-locations") |
|
|
|
org-log-into-drawer "LOGBOOK") |
|
|
|
|
|
|
@ -561,12 +561,12 @@ Set some languages and disable confirmation for evaluating code blocks C-c C-c |
|
|
|
:ID: fcc91d0a-d040-4910-b2cf-3221496a3842 |
|
|
|
:END: |
|
|
|
#+BEGIN_SRC emacs-lisp |
|
|
|
(require 'org-habit) ;;TODO Lösung ohne require finden, scheint mir nicht ideal zu sein, nur um ein org-modul zu aktivieren |
|
|
|
(require 'org-habit) ;;TODO Lösung ohne require finden, scheint mir nicht ideal zu sein, nur um ein org-modul zu aktivieren |
|
|
|
;; (add-to-list 'org-modules "org-habit") |
|
|
|
(setq org-habit-graph-column 80 |
|
|
|
org-habit-preceding-days 30 |
|
|
|
org-habit-following-days 7 |
|
|
|
org-habit-show-habits-only-for-today nil) |
|
|
|
(setq org-habit-graph-column 80 |
|
|
|
org-habit-preceding-days 30 |
|
|
|
org-habit-following-days 7 |
|
|
|
org-habit-show-habits-only-for-today nil) |
|
|
|
#+END_SRC |
|
|
|
** org-id |
|
|
|
:PROPERTIES: |
|
|
@ -691,16 +691,15 @@ In status buffer: |
|
|
|
- F u git pull |
|
|
|
|
|
|
|
#+BEGIN_SRC emacs-lisp |
|
|
|
(use-package magit |
|
|
|
:ensure t |
|
|
|
:defer t |
|
|
|
:init |
|
|
|
; set git-path in work environment |
|
|
|
(if (string-equal user-login-name "POH") |
|
|
|
(use-package magit |
|
|
|
:ensure t |
|
|
|
:defer t |
|
|
|
:init |
|
|
|
; set git-path in work environment |
|
|
|
(if (string-equal user-login-name "POH") |
|
|
|
(setq magit-git-executable "P:/Eigene Dateien/Tools/Git/bin/git.exe") |
|
|
|
) |
|
|
|
:bind (("C-x g" . magit-status)) |
|
|
|
) |
|
|
|
:bind (("C-x g" . magit-status))) |
|
|
|
#+END_SRC |
|
|
|
|
|
|
|
** LSP |
|
|
@ -714,49 +713,49 @@ Getestet wurde die funktionierende Datei selbst und neu erstellte Dateien im sel |
|
|
|
TODO Unterverzeichnisse wurden noch nicht getestet |
|
|
|
|
|
|
|
#+BEGIN_SRC emacs-lisp |
|
|
|
(use-package lsp-mode |
|
|
|
:defer t |
|
|
|
:commands lsp |
|
|
|
:custom |
|
|
|
(lsp-auto-guess-root nil) |
|
|
|
(lsp-prefer-flymake nil) ; use flycheck instead |
|
|
|
(lsp-file-watch-threshold 2000) |
|
|
|
:bind (:map lsp-mode-map ("C-c C-f" . lsp-format-buffer)) |
|
|
|
:hook ((python-mode |
|
|
|
js-mode |
|
|
|
js2-mode |
|
|
|
typescript-mode |
|
|
|
web-mode) . lsp)) |
|
|
|
|
|
|
|
(use-package lsp-ui |
|
|
|
:after lsp-mode |
|
|
|
:ensure t |
|
|
|
:diminish |
|
|
|
:commands lsp-ui-mode |
|
|
|
:config |
|
|
|
(setq lsp-ui-doc-enable t |
|
|
|
lsp-ui-doc-header t |
|
|
|
lsp-ui-doc-include-signature t |
|
|
|
lsp-ui-doc-position 'top |
|
|
|
lsp-ui-doc-border (face-foreground 'default) |
|
|
|
lsp-ui-sideline-enable nil |
|
|
|
lsp-ui-sideline-ignore-duplicate t |
|
|
|
lsp-ui-sideline-show-code-actions nil) |
|
|
|
(when *sys/gui* |
|
|
|
(setq lsp-ui-doc-use-webkit t)) |
|
|
|
;; workaround hide mode-line of lsp-ui-imenu buffer |
|
|
|
(defadvice lsp-ui-imenu (after hide-lsp-ui-imenu-mode-line activate) |
|
|
|
(setq mode-line-format nil))) |
|
|
|
|
|
|
|
(use-package company-lsp |
|
|
|
:requires company |
|
|
|
:defer t |
|
|
|
:ensure t |
|
|
|
:config |
|
|
|
;;disable client-side cache because lsp server does a better job |
|
|
|
(setq company-transformers nil |
|
|
|
company-lsp-async t |
|
|
|
company-lsp-cache-candidates nil)) |
|
|
|
(use-package lsp-mode |
|
|
|
:defer t |
|
|
|
:commands lsp |
|
|
|
:custom |
|
|
|
(lsp-auto-guess-root nil) |
|
|
|
(lsp-prefer-flymake nil) ; use flycheck instead |
|
|
|
(lsp-file-watch-threshold 2000) |
|
|
|
:bind (:map lsp-mode-map ("C-c C-f" . lsp-format-buffer)) |
|
|
|
:hook ((python-mode |
|
|
|
js-mode |
|
|
|
js2-mode |
|
|
|
typescript-mode |
|
|
|
web-mode) . lsp)) |
|
|
|
|
|
|
|
(use-package lsp-ui |
|
|
|
:after lsp-mode |
|
|
|
:ensure t |
|
|
|
:diminish |
|
|
|
:commands lsp-ui-mode |
|
|
|
:config |
|
|
|
(setq lsp-ui-doc-enable t |
|
|
|
lsp-ui-doc-header t |
|
|
|
lsp-ui-doc-include-signature t |
|
|
|
lsp-ui-doc-position 'top |
|
|
|
lsp-ui-doc-border (face-foreground 'default) |
|
|
|
lsp-ui-sideline-enable nil |
|
|
|
lsp-ui-sideline-ignore-duplicate t |
|
|
|
lsp-ui-sideline-show-code-actions nil) |
|
|
|
(when *sys/gui* |
|
|
|
(setq lsp-ui-doc-use-webkit t)) |
|
|
|
;; workaround hide mode-line of lsp-ui-imenu buffer |
|
|
|
(defadvice lsp-ui-imenu (after hide-lsp-ui-imenu-mode-line activate) |
|
|
|
(setq mode-line-format nil))) |
|
|
|
|
|
|
|
(use-package company-lsp |
|
|
|
:requires company |
|
|
|
:defer t |
|
|
|
:ensure t |
|
|
|
:config |
|
|
|
;;disable client-side cache because lsp server does a better job |
|
|
|
(setq company-transformers nil |
|
|
|
company-lsp-async t |
|
|
|
company-lsp-cache-candidates nil)) |
|
|
|
#+END_SRC |
|
|
|
|
|
|
|
** yasnippet |
|
|
@ -797,20 +796,20 @@ With hippie expand I am able to use yasnippet and emmet at the same time with th |
|
|
|
:ID: 3d8f2547-c5b3-46d0-91b0-9667f9ee5c47 |
|
|
|
:END: |
|
|
|
#+BEGIN_SRC emacs-lisp |
|
|
|
(use-package flycheck |
|
|
|
:ensure t |
|
|
|
:hook |
|
|
|
((css-mode . flycheck-mode) |
|
|
|
(emacs-lisp-mode . flycheck-mode) |
|
|
|
(python-mode . flycheck-mode)) |
|
|
|
:init |
|
|
|
(setq flycheck-emacs-lisp-load-path 'inherit) |
|
|
|
:config |
|
|
|
(setq-default |
|
|
|
flycheck-check-synta-automatically '(save mode-enabled) |
|
|
|
flycheck-disable-checkers '(emacs-lisp-checkdoc) |
|
|
|
eldoc-idle-delay .1 ;; let eldoc echo faster than flycheck |
|
|
|
flycheck-display-errors-delay .3)) ;; this way any errors will override eldoc messages |
|
|
|
(use-package flycheck |
|
|
|
:ensure t |
|
|
|
:hook |
|
|
|
((css-mode . flycheck-mode) |
|
|
|
(emacs-lisp-mode . flycheck-mode) |
|
|
|
(python-mode . flycheck-mode)) |
|
|
|
:init |
|
|
|
(setq flycheck-emacs-lisp-load-path 'inherit) |
|
|
|
:config |
|
|
|
(setq-default |
|
|
|
flycheck-check-synta-automatically '(save mode-enabled) |
|
|
|
flycheck-disable-checkers '(emacs-lisp-checkdoc) |
|
|
|
eldoc-idle-delay .1 ;; let eldoc echo faster than flycheck |
|
|
|
flycheck-display-errors-delay .3)) ;; this way any errors will override eldoc messages |
|
|
|
#+END_SRC |
|
|
|
|
|
|
|
** Projectile |
|
|
@ -819,25 +818,25 @@ With hippie expand I am able to use yasnippet and emmet at the same time with th |
|
|
|
:END: |
|
|
|
Manage projects and jump quickly between its files |
|
|
|
#+BEGIN_SRC emacs-lisp |
|
|
|
(use-package projectile |
|
|
|
:ensure t |
|
|
|
:defer t |
|
|
|
:hook (projectile-after-switch-project . (lambda () (set-workon_home))) |
|
|
|
:bind |
|
|
|
(("C-c p p" . projectile-switch-project) |
|
|
|
("C-c p c" . projectile-command-map) |
|
|
|
("C-c p s s" . projectile-ag)) |
|
|
|
:preface |
|
|
|
(defun set-workon_home() |
|
|
|
(setenv "WORKON_HOME" (projectile-project-root))) |
|
|
|
:init |
|
|
|
(setq-default projectile-cache-file (concat MY--PATH_USER_LOCAL ".projectile-cache") |
|
|
|
projectile-known-projects-file (concat MY--PATH_USER_LOCAL ".projectile-bookmarks")) |
|
|
|
:config |
|
|
|
(projectile-mode t) |
|
|
|
(setq-default projectile-completion-system 'ivy |
|
|
|
projectile-enable-caching t |
|
|
|
projectile-mode-line '(:eval (projectile-project-name)))) |
|
|
|
(use-package projectile |
|
|
|
:ensure t |
|
|
|
:defer t |
|
|
|
:hook (projectile-after-switch-project . (lambda () (set-workon_home))) |
|
|
|
:bind |
|
|
|
(("C-c p p" . projectile-switch-project) |
|
|
|
("C-c p c" . projectile-command-map) |
|
|
|
("C-c p s s" . projectile-ag)) |
|
|
|
:preface |
|
|
|
(defun set-workon_home() |
|
|
|
(setenv "WORKON_HOME" (projectile-project-root))) |
|
|
|
:init |
|
|
|
(setq-default projectile-cache-file (concat MY--PATH_USER_LOCAL ".projectile-cache") |
|
|
|
projectile-known-projects-file (concat MY--PATH_USER_LOCAL ".projectile-bookmarks")) |
|
|
|
:config |
|
|
|
(projectile-mode t) |
|
|
|
(setq-default projectile-completion-system 'ivy |
|
|
|
projectile-enable-caching t |
|
|
|
projectile-mode-line '(:eval (projectile-project-name)))) |
|
|
|
#+END_SRC |
|
|
|
|
|
|
|
** smartparens |
|
|
@ -888,21 +887,21 @@ Optional: PATH erweitern unter Windows (so kann exec-path-from-shell den Pfad er |
|
|
|
PATH=P:\path\to\node;%path% |
|
|
|
|
|
|
|
#+BEGIN_SRC emacs-lisp |
|
|
|
(use-package web-mode |
|
|
|
:ensure t |
|
|
|
:defer t |
|
|
|
:mode |
|
|
|
("\\.phtml\\'" |
|
|
|
"\\.tpl\\.php\\'" |
|
|
|
"\\.djhtml\\'" |
|
|
|
"\\.[t]?html?\\'") |
|
|
|
:init |
|
|
|
(if *work_remote* |
|
|
|
(setq exec-path (append exec-path '("P:/Tools/node")))) |
|
|
|
:config |
|
|
|
(setq web-mode-enable-auto-closing t |
|
|
|
web-mode-enable-auto-pairing t) |
|
|
|
(add-hook 'web-mode-hook 'smartparens-mode)) |
|
|
|
(use-package web-mode |
|
|
|
:ensure t |
|
|
|
:defer t |
|
|
|
:mode |
|
|
|
("\\.phtml\\'" |
|
|
|
"\\.tpl\\.php\\'" |
|
|
|
"\\.djhtml\\'" |
|
|
|
"\\.[t]?html?\\'") |
|
|
|
:init |
|
|
|
(if *work_remote* |
|
|
|
(setq exec-path (append exec-path '("P:/Tools/node")))) |
|
|
|
:config |
|
|
|
(setq web-mode-enable-auto-closing t |
|
|
|
web-mode-enable-auto-pairing t) |
|
|
|
(add-hook 'web-mode-hook 'smartparens-mode)) |
|
|
|
#+END_SRC |
|
|
|
|
|
|
|
Emmet offers snippets, similar to yasnippet. |
|
|
@ -1048,8 +1047,8 @@ deactivate |
|
|
|
To support org-babel, check if it can find the symlink to ob-beancount.el |
|
|
|
|
|
|
|
#+BEGIN_SRC shell |
|
|
|
orgpath=`find /home/marc/.emacs.d/elpa/ -type d -name "org-plus*" -print` |
|
|
|
beansym="$orgpath/ob-beancount.el |
|
|
|
orgpath=`find /home/marc/.emacs.d/elpa/ -type d -name "org-plus*" -print` |
|
|
|
beansym="$orgpath/ob-beancount.el |
|
|
|
bean="/home/marc/Archiv/Programmierprojekte/Lisp/beancount-mode/ob-beancount.el" |
|
|
|
|
|
|
|
if [ -h "$beansym" ] |
|
|
|