|
|
@ -202,6 +202,7 @@ Restore it to reasonable value after init. Also stop garbage collection during m |
|
|
|
:PROPERTIES: |
|
|
|
:ID: 3512d679-d111-4ccd-8372-6fc2acbc0374 |
|
|
|
:END: |
|
|
|
** paths |
|
|
|
#+BEGIN_SRC emacs-lisp |
|
|
|
(defconst *sys/gui* |
|
|
|
(display-graphic-p) |
|
|
@ -251,6 +252,10 @@ Restore it to reasonable value after init. Also stop garbage collection during m |
|
|
|
(setq custom-file (concat MY--PATH_USER_LOCAL "custom.el")) ;; don't spam init.e with saved customization settings |
|
|
|
(setq backup-directory-alist `((".*" . ,temporary-file-directory))) |
|
|
|
(setq auto-save-file-name-transforms `((".*" ,temporary-file-directory))) |
|
|
|
#+end_src |
|
|
|
|
|
|
|
** sane defaults |
|
|
|
#+begin_src emacs-lisp |
|
|
|
(setq-default create-lockfiles nil) ;; disable lock files, can cause trouble in e.g. lsp-mode |
|
|
|
(defalias 'yes-or-no-p 'y-or-n-p) ;; answer with y and n |
|
|
|
(setq custom-safe-themes t) ;; don't ask me if I want to load a theme |
|
|
@ -258,8 +263,15 @@ Restore it to reasonable value after init. Also stop garbage collection during m |
|
|
|
(delete-selection-mode t) ;; delete selected region when typing |
|
|
|
(save-place-mode 1) ;; saves position in file when it's closed |
|
|
|
(setq save-place-forget-unreadable-files nil) ;; checks if file is readable before saving position |
|
|
|
|
|
|
|
(global-set-key (kbd "RET") 'newline-and-indent) ;; indent after newline |
|
|
|
(setq save-interprogram-paste-before-kill t) ;; put replaced text into killring |
|
|
|
#+END_SRC |
|
|
|
|
|
|
|
** Browser |
|
|
|
#+begin_src emacs-lisp |
|
|
|
(setq browse-url-function 'browse-url-generic |
|
|
|
browse-url-generic-program "firefox") |
|
|
|
#+end_src |
|
|
|
* Appearance |
|
|
|
** Defaults |
|
|
|
#+begin_src emacs-lisp |
|
|
@ -296,55 +308,6 @@ Restore it to reasonable value after init. Also stop garbage collection during m |
|
|
|
(scroll-bar-mode -1) ;; disable scroll bar |
|
|
|
#+end_src |
|
|
|
|
|
|
|
* Bookmarks |
|
|
|
Usage: |
|
|
|
- C-x r m (bookmark-set): add bookmark |
|
|
|
- C-x r l (list-bookmark): list bookmarks |
|
|
|
- C-x r b (bookmark-jump): open bookmark |
|
|
|
|
|
|
|
Edit bookmarks (while in bookmark file): |
|
|
|
- d: mark current item |
|
|
|
- x: delete marked items |
|
|
|
- r: rename current item |
|
|
|
- s: save changes |
|
|
|
|
|
|
|
#+begin_src emacs-lisp |
|
|
|
(use-package bookmark |
|
|
|
:custom |
|
|
|
(bookmark-default-file (concat MY--PATH_USER_LOCAL "bookmarks"))) |
|
|
|
#+end_src |
|
|
|
|
|
|
|
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))) |
|
|
|
#+END_SRC |
|
|
|
|
|
|
|
* recentf |
|
|
|
Exclude some dirs from spamming recentf |
|
|
|
#+begin_src emacs-lisp |
|
|
|
(use-package recentf |
|
|
|
:config |
|
|
|
(recentf-mode) |
|
|
|
:custom |
|
|
|
(recentf-exclude '(".*-autoloads\\.el\\'" |
|
|
|
"[/\\]\\elpa/" |
|
|
|
"COMMIT_EDITMSG\\'")) |
|
|
|
(recentf-save-file (concat MY--PATH_USER_LOCAL "recentf")) |
|
|
|
(recentf-max-menu-items 600) |
|
|
|
(recentf-max-saved-items 600)) |
|
|
|
#+end_src |
|
|
|
|
|
|
|
* visuals |
|
|
|
** Font |
|
|
|
:PROPERTIES: |
|
|
|
:ID: dc8eb670-e6bb-4bfb-98f0-aae1860234fb |
|
|
@ -392,8 +355,8 @@ Windows Theme: |
|
|
|
(diminish 'visual-line-mode) |
|
|
|
(use-package adaptive-wrap |
|
|
|
:ensure t |
|
|
|
:config |
|
|
|
(add-hook 'visual-line-mode-hook #'adaptive-wrap-prefix-mode)) |
|
|
|
:hook |
|
|
|
(visual-line-mode . adaptive-wrap-prefix-mode)) |
|
|
|
; :init |
|
|
|
; (when (fboundp 'adaptive-wrap-prefix-mode) |
|
|
|
; (defun my/activate-adaptive-wrap-prefix-mode () |
|
|
@ -409,14 +372,14 @@ Windows Theme: |
|
|
|
#+BEGIN_SRC emacs-lisp |
|
|
|
(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) |
|
|
|
:hook |
|
|
|
((prog-mode |
|
|
|
org-src-mode) . 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)) |
|
|
|
; (add-hook 'emacs-lisp-mode-hook 'display-line-numbers-mode) |
|
|
|
#+END_SRC |
|
|
|
|
|
|
|
** misc |
|
|
@ -441,6 +404,54 @@ Windows Theme: |
|
|
|
(prog-mode . rainbow-delimiters-mode)) |
|
|
|
#+END_SRC |
|
|
|
|
|
|
|
* Bookmarks |
|
|
|
Usage: |
|
|
|
- C-x r m (bookmark-set): add bookmark |
|
|
|
- C-x r l (list-bookmark): list bookmarks |
|
|
|
- C-x r b (bookmark-jump): open bookmark |
|
|
|
|
|
|
|
Edit bookmarks (while in bookmark file): |
|
|
|
- d: mark current item |
|
|
|
- x: delete marked items |
|
|
|
- r: rename current item |
|
|
|
- s: save changes |
|
|
|
|
|
|
|
#+begin_src emacs-lisp |
|
|
|
(use-package bookmark |
|
|
|
:custom |
|
|
|
(bookmark-default-file (concat MY--PATH_USER_LOCAL "bookmarks"))) |
|
|
|
#+end_src |
|
|
|
|
|
|
|
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))) |
|
|
|
#+END_SRC |
|
|
|
|
|
|
|
* recentf |
|
|
|
Exclude some dirs from spamming recentf |
|
|
|
#+begin_src emacs-lisp |
|
|
|
(use-package recentf |
|
|
|
:config |
|
|
|
(recentf-mode) |
|
|
|
:custom |
|
|
|
(recentf-exclude '(".*-autoloads\\.el\\'" |
|
|
|
"[/\\]\\elpa/" |
|
|
|
"COMMIT_EDITMSG\\'")) |
|
|
|
(recentf-save-file (concat MY--PATH_USER_LOCAL "recentf")) |
|
|
|
(recentf-max-menu-items 600) |
|
|
|
(recentf-max-saved-items 600)) |
|
|
|
#+end_src |
|
|
|
|
|
|
|
* undo |
|
|
|
:PROPERTIES: |
|
|
|
:ID: d57621b2-5472-4c89-a520-b4133db0b9af |
|
|
@ -1016,10 +1027,11 @@ TODO Unterverzeichnisse wurden noch nicht getestet |
|
|
|
web-mode |
|
|
|
) . lsp) |
|
|
|
(lsp-mode . lsp-enable-which-key-integration) |
|
|
|
(lsp-mode . lsp-diagnostics-modeline-mode)) |
|
|
|
(lsp-mode . lsp-diagnostics-modeline-mode) |
|
|
|
(web-mode . #'lsp-flycheck-enable)) ;; enable flycheck-lsp for web-mode locally |
|
|
|
:config |
|
|
|
(setq lsp-diagnostics-package :none) ; disable flycheck-lsp for most modes |
|
|
|
(add-hook 'web-mode-hook #'lsp-flycheck-enable)) ; enable flycheck-lsp for web-mode locally |
|
|
|
(setq lsp-diagnostics-package :none)) ; disable flycheck-lsp for most modes |
|
|
|
;; (add-hook 'web-mode-hook #'lsp-flycheck-enable)) ; enable flycheck-lsp for web-mode locally |
|
|
|
|
|
|
|
(use-package lsp-ui |
|
|
|
:after lsp-mode |
|
|
@ -1206,13 +1218,14 @@ PATH=P:\path\to\node;%path% |
|
|
|
"\\.tpl\\.php\\'" |
|
|
|
"\\.djhtml\\'" |
|
|
|
"\\.[t]?html?\\'") |
|
|
|
:hook |
|
|
|
(web-mode . smartparens-mode) |
|
|
|
: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)) |
|
|
|
web-mode-enable-auto-pairing t)) |
|
|
|
#+END_SRC |
|
|
|
|
|
|
|
Emmet offers snippets, similar to yasnippet. |
|
|
|