Add flycheck and highlights

This commit is contained in:
Wojciech Kozlowski 2017-09-02 08:00:45 +01:00
parent ef4d72d151
commit 980bee8e14

View File

@ -19,6 +19,10 @@
(setq init-packages/programming-packages
'(company
flycheck
flycheck-pos-tip
highlight-numbers
highlight-symbol
racer
rust-mode
yasnippet)
@ -39,6 +43,39 @@
:config
(setq company-backends (delete 'company-clang company-backends)))
;; --------------------------------------------------------------------------
;; Flycheck mode.
;; --------------------------------------------------------------------------
(use-package flycheck
:defer t
:init
(add-hook 'after-init-hook #'global-flycheck-mode)
:config
(require 'flycheck-pos-tip)
(flycheck-pos-tip-mode))
;; --------------------------------------------------------------------------
;; Highlights.
;; --------------------------------------------------------------------------
(use-package highlight-numbers
:init
(add-hook 'prog-mode-hook 'highlight-numbers-mode))
(use-package highlight-symbol
:init
(highlight-symbol-nav-mode)
(add-hook 'prog-mode-hook (lambda () (highlight-symbol-mode)))
(add-hook 'org-mode-hook (lambda () (highlight-symbol-mode)))
:bind
(("M-n" . highlight-symbol-next)
("M-p" . highlight-symbol-prev))
:config
(setq highlight-symbol-idle-delay 0.2
highlight-symbol-on-navigation-p t))
;; --------------------------------------------------------------------------
;; Configure Rust environment.
;; --------------------------------------------------------------------------
@ -112,14 +149,6 @@
(add-hook 'makefile-mode-hook 'makefile-mode-tabs)
;; --------------------------------------------------------------------------
;; Ediff.
;; --------------------------------------------------------------------------
(setq ediff-diff-options "-w"
ediff-split-window-function 'split-window-horizontally
ediff-window-setup-function 'ediff-setup-windows-plain)
;; --------------------------------------------------------------------------
;; Line numbers.
;;