Browse Source

minor fixes, added diminishes, preparations for emacs26 etc.

master
Marc Pohling 6 years ago
parent
commit
75866c9fd5
1 changed files with 62 additions and 23 deletions
  1. 85
      config.org

85
config.org

@ -38,6 +38,11 @@ customize settings in [[file:init.el][init.el]].
(load custom-file)
#+end_src
Keep the .emacs.d clean by moving user files into a separate dir
#+BEGIN_SRC emacs-lisp
(setq bookmark-default-file "~/.emacs.d/user-dir/bookmarks")
#+END_SRC
* Theme
** Font
@ -456,6 +461,19 @@ begin_src emacs-lisp
end_src
* Recentf
Requires counsel
#+begin_src emacs-lisp
(use-package recentf
; :bind ("C-x C-r" . counsel-recentf)
:config
(recentf-mode t)
(setq recentf-max-saved-items 200)
)
#+end_src
* ivy / counsel / swiper
Flx is required for fuzzy-matching
@ -484,13 +502,6 @@ Ivy displays a window with suggestions for hotkeys and M-x
)
#+end_src
Counsel replaces:
- M-x
- C-x C-f find-file
- C-c h f describe-function
- C-c h v describe-variable
- M-i imenu
The find-file replacement is nicer to navigate
#+begin_src emacs-lisp
@ -499,6 +510,8 @@ The find-file replacement is nicer to navigate
:bind* ;; load counsel when pressed
(("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)
@ -517,19 +530,6 @@ Swiper ivy-enhances isearch
)
)
#+end_src
* Recentf
Requires counsel
#+begin_src emacs-lisp
(use-package recentf
:bind ("C-x C-r" . counsel-recentf)
:config
(recentf-mode t)
(setq recentf-max-saved-items 200)
)
#+end_src
* Latex
Requirements for Linux:
@ -680,6 +680,7 @@ Highlight whitespaces, tabs, empty lines.
(use-package whitespace
:demand t
:ensure nil
:diminish whitespace-mode;;mode shall be active, but not shown in mode line
:init
(dolist (hook '(prog-mode-hook
text-mode-hook
@ -709,6 +710,7 @@ Colorize colors as text with their value
:ensure t
:init
(add-hook 'prog-mode-hook 'rainbow-mode t)
:diminish rainbow-mode
;; :hook prog-mode ;; not working in use-package 2.3
:config
(setq-default rainbow-x-colors-major-mode-list '())
@ -804,6 +806,17 @@ Activate company and make it react nearly instantly
)
#+end_src
For a nicer suggestion box: company-box ([[https://github.com/sebastiencs/company-box][Source]])
It is only available for emacs 26 and higher.
#+begin_src emacs-lisp
(when (> emacs-major-version 25)
(use-package company-box
:ensure t
:init
(add-hook 'company-mode-hook 'company-box-mode)))
#+end_src
*** Company backend hooks
Backend configuration for python-mode
@ -869,6 +882,8 @@ Addon to sort suggestions by usage
(use-package company-statistics
:ensure t
:after company
:init
(setq company-statistics-file "~/.emacs.d/user-dir/company-statistics-cache.el")
:config
(company-statistics-mode 1)
)
@ -920,11 +935,13 @@ Maybe add [[https://github.com/hlissner/emacs-company-dict][company-dict]]? It's
#+begin_src emacs-lisp
(use-package yasnippet
:ensure t
:diminish yas-minor-mode
:init
(yas-global-mode)
(setq yas-snippet-dirs (concat user-emacs-directory "user-dir/snippets"))
(yas-global-mode t)
:mode ("\\.yasnippet" . snippet-mode)
:config
(setq yas-snippet-dirs (concat user-emacs-directory "snippets"))
; :config
; (yas-reload-all) ;; ensure snippets are updated and available, necessary when not using global-mode
)
#+end_src
** Lisp
@ -1200,6 +1217,28 @@ _v_ verify setup _f_ check _s_ select
- treemacs-find-tag
* Evil
So... Evil Mode might be worth a try
#+BEGIN_SRC emacs-lisp
(use-package evil
:ensure t
:defer .1 ;; don't block emacs when starting, load evil immediately after startup
:init
(setq evil-want-integration nil) ;; required by evil-collection
:config
(evil-mode 0)) ;; for now deactivate per default
#+END_SRC
Evil-collection is a bundle of configs for different modes
#+BEGIN_SRC emacs-lisp
(use-package evil-collection
:after evil
:ensure t
:config
(evil-collection-init))
#+END_SRC
* Window Handling
Some tools to easen the navigation, creation and deletion of windows

Loading…
Cancel
Save