Whitespaces, Treemacs, Company und Projectile
This commit is contained in:
80
config.org
80
config.org
@@ -1,5 +1,6 @@
|
||||
#+TODO: | DISABLED(d)
|
||||
#+STARTUP: overview
|
||||
#+OPTIONS: \n:t
|
||||
#+TITLE: Meine Emacs-Konfiguration
|
||||
|
||||
* Benutzerangaben
|
||||
@@ -142,7 +143,14 @@ size. This function also handles icons and modeline font sizes."
|
||||
(set-face-attribute 'default nil :height new-height)
|
||||
(set-face-attribute 'mode-line nil :height new-height)
|
||||
(set-face-attribute 'mode-line-inactive nil :height new-height)
|
||||
(message "Font size: %s" new-height)))
|
||||
(message "Font size: %s" new-height))
|
||||
(let ((new-size (if (zerop height)
|
||||
artr/default-icon-size
|
||||
(+ (/ height 5) treemacs--icon-size))))
|
||||
(when (fboundp 'treemacs-resize-icons)
|
||||
(treemacs-resize-icons new-size))
|
||||
(when (fboundp 'company-box-icons-resize)
|
||||
(company-box-icons-resize new-size))))
|
||||
#+END_SRC
|
||||
|
||||
** Schrift vergrößern
|
||||
@@ -351,6 +359,20 @@ size. This function also handles icons and modeline font sizes."
|
||||
("M-y" . helm-show-kill-ring)
|
||||
:preface (require 'helm-config)
|
||||
:config (helm-mode 1))
|
||||
|
||||
(use-package helm-icons
|
||||
:after helm
|
||||
:config
|
||||
(treemacs-resize-icons artr/default-icon-size)
|
||||
(helm-icons-enable))
|
||||
|
||||
(use-package helm-swoop
|
||||
:after helm
|
||||
:chords
|
||||
("js" . helm-swoop)
|
||||
("jp" . helm-swoop-back-to-last-point)
|
||||
:init
|
||||
(bind-key "M-m" 'helm-swoop-from-isearch isearch-mode-map))
|
||||
#+END_SRC
|
||||
|
||||
* Dateien und Buffer
|
||||
@@ -403,9 +425,65 @@ size. This function also handles icons and modeline font sizes."
|
||||
|
||||
* Text
|
||||
** Textbreite
|
||||
Der Text wird nach 90 Zeichen umgebrochen. Jedoch nur in der Ansicht!
|
||||
[[https://github.com/luisgerhorst/virtual-auto-fill][virtual-auto-fill]] - display unfilled text in a readable way
|
||||
#+BEGIN_SRC emacs-lisp
|
||||
(setq-default fill-column 90)
|
||||
(setq column-number-mode t)
|
||||
(use-package virtual-auto-fill
|
||||
:hook (text-mode . virtual-auto-fill-mode))
|
||||
#+END_SRC
|
||||
* Snippets
|
||||
Mit Yasnippet lassen sich Templates definieren und mit einer Tastenkombination belegen.
|
||||
Die Templates werden im Ordner /snippets/ jeweils unter einem Mode-spezifischen Ordner gespeichert.
|
||||
|
||||
Das Paket /yasnippet-snippets/ stellt eine Auswahl an Templates zur Verfügung. Mit /helm-c-yasnippet/ lassen sich die Snippets mit Helm durchsuchen und filtern.
|
||||
|
||||
| Key | Aktion |
|
||||
|-----------+------------------------|
|
||||
| C-c & C-n | neues Template anlegen |
|
||||
| C-c & C-s | Template einfügen |
|
||||
| C-c & C-v | Template öffnen |
|
||||
|-----------+------------------------|
|
||||
| C-c y | Templates auswählen |
|
||||
|
||||
#+BEGIN_SRC emacs-lisp
|
||||
(use-package yasnippet
|
||||
:diminish yas-minor-mode
|
||||
:hook (after-init . yas-global-mode))
|
||||
|
||||
(use-package yasnippet-snippets
|
||||
:after yasnippet)
|
||||
|
||||
(use-package helm-c-yasnippet
|
||||
:bind (("C-c y" . helm-yas-complete)))
|
||||
#+END_SRC
|
||||
* Completion
|
||||
#+BEGIN_SRC emacs-lisp
|
||||
(use-package company
|
||||
:bind ("M-/" . company-complete)
|
||||
:hook (after-init . global-company-mode)
|
||||
:init (setq company-idle-delay 0))
|
||||
|
||||
(use-package helm-company
|
||||
:after company helm
|
||||
:bind (:map company-mode-map
|
||||
("C-:" . helm-company)
|
||||
:map company-active-map
|
||||
("C-:" . helm-company)))
|
||||
#+END_SRC
|
||||
* Projectile
|
||||
#+BEGIN_SRC emacs-lisp
|
||||
(use-package projectile
|
||||
:config
|
||||
(define-key projectile-mode-map (kbd "s-p") 'projectile-command-map)
|
||||
(define-key projectile-mode-map (kbd "C-c p") 'projectile-command-map)
|
||||
(projectile-mode 1)
|
||||
:init
|
||||
(setq projectile-completion-system 'helm))
|
||||
#+END_SRC
|
||||
* Whitespace
|
||||
#+BEGIN_SRC emacs-lisp
|
||||
(use-package whitespace
|
||||
:hook (before-save . whitespace-cleanup))
|
||||
#+END_SRC
|
||||
|
||||
Reference in New Issue
Block a user