Clean up
This commit is contained in:
parent
fb71be9a94
commit
20efdb863f
4 changed files with 42 additions and 37 deletions
|
@ -168,8 +168,9 @@
|
||||||
|
|
||||||
;; evil plugins
|
;; evil plugins
|
||||||
(use-package evil-anzu
|
(use-package evil-anzu
|
||||||
:config (setq anzu-cons-mode-line-p nil
|
:config
|
||||||
anzu-minimum-input-length 2))
|
(setq anzu-cons-mode-line-p nil
|
||||||
|
anzu-minimum-input-length 2))
|
||||||
|
|
||||||
(use-package evil-args
|
(use-package evil-args
|
||||||
:commands (evil-inner-arg evil-outer-arg evil-forward-arg evil-backward-arg evil-jump-out-args)
|
:commands (evil-inner-arg evil-outer-arg evil-forward-arg evil-backward-arg evil-jump-out-args)
|
||||||
|
|
|
@ -70,9 +70,9 @@
|
||||||
(defface narf-fixme-face '((t (:inherit font-lock-warning-face))) "Face for FIXMEs")
|
(defface narf-fixme-face '((t (:inherit font-lock-warning-face))) "Face for FIXMEs")
|
||||||
(defface narf-note-face '((t (:inherit font-lock-warning-face))) "Face for NOTEs")
|
(defface narf-note-face '((t (:inherit font-lock-warning-face))) "Face for NOTEs")
|
||||||
(add-hook! (prog-mode emacs-lisp-mode)
|
(add-hook! (prog-mode emacs-lisp-mode)
|
||||||
(font-lock-add-keywords nil '(("\\<\\(TODO\\((.+)\\)?:?\\)" 1 'narf-todo-face prepend)))
|
(font-lock-add-keywords nil '(("\\<\\(TODO\\((.+)\\)?:?\\)" 1 'narf-todo-face prepend)
|
||||||
(font-lock-add-keywords nil '(("\\<\\(FIXME\\((.+)\\)?:?\\)" 1 'narf-fixme-face prepend)))
|
("\\<\\(FIXME\\((.+)\\)?:?\\)" 1 'narf-fixme-face prepend)
|
||||||
(font-lock-add-keywords nil '(("\\<\\(NOTE\\((.+)\\)?:?\\)" 1 'narf-note-face prepend))))
|
("\\<\\(NOTE\\((.+)\\)?:?\\)" 1 'narf-note-face prepend))))
|
||||||
|
|
||||||
;; Prettify code folding in emacs ;;;;;;
|
;; Prettify code folding in emacs ;;;;;;
|
||||||
(define-fringe-bitmap 'hs-marker [16 48 112 240 112 48 16] nil nil 'center)
|
(define-fringe-bitmap 'hs-marker [16 48 112 240 112 48 16] nil nil 'center)
|
||||||
|
@ -97,13 +97,8 @@
|
||||||
(overlay-put ov 'display display-string)))))
|
(overlay-put ov 'display display-string)))))
|
||||||
|
|
||||||
;; Fade out when unfocused ;;;;;;;;;;;;;
|
;; Fade out when unfocused ;;;;;;;;;;;;;
|
||||||
(defun narf|focus-in-alpha ()
|
(add-hook! focus-in (set-frame-parameter nil 'alpha 100))
|
||||||
(set-frame-parameter nil 'alpha 100))
|
(add-hook! focus-out (set-frame-parameter nil 'alpha 80))
|
||||||
(defun narf|focus-out-alpha ()
|
|
||||||
(set-frame-parameter nil 'alpha 80))
|
|
||||||
|
|
||||||
(add-hook! focus-in 'narf|focus-in-alpha)
|
|
||||||
(add-hook! focus-out 'narf|focus-out-alpha)
|
|
||||||
|
|
||||||
;; Plugins ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
;; Plugins ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
||||||
(use-package hideshow
|
(use-package hideshow
|
||||||
|
@ -123,7 +118,10 @@
|
||||||
:config (setq rainbow-delimiters-max-face-count 4))
|
:config (setq rainbow-delimiters-max-face-count 4))
|
||||||
|
|
||||||
(use-package rainbow-mode :defer t
|
(use-package rainbow-mode :defer t
|
||||||
:init (add-hook! rainbow-mode (hl-line-mode (if rainbow-mode -1 1))))
|
:init
|
||||||
|
(add-hook! rainbow-mode
|
||||||
|
(when narf--hl-line-mode
|
||||||
|
(hl-line-mode (if rainbow-mode -1 1)))))
|
||||||
|
|
||||||
(use-package popwin
|
(use-package popwin
|
||||||
:config
|
:config
|
||||||
|
@ -373,7 +371,7 @@ iedit."
|
||||||
;; Right side
|
;; Right side
|
||||||
'((selection-info :face highlight-face :skip-alternate t)
|
'((selection-info :face highlight-face :skip-alternate t)
|
||||||
narf-env-version
|
narf-env-version
|
||||||
narf-buffer-encoding-
|
narf-buffer-encoding-abbrev
|
||||||
(narf-major-mode
|
(narf-major-mode
|
||||||
(minor-modes :separator " " :tight t)
|
(minor-modes :separator " " :tight t)
|
||||||
process :when active)
|
process :when active)
|
||||||
|
|
|
@ -7,34 +7,41 @@
|
||||||
(add-hook! go-mode '(emr-initialize flycheck-mode narf|enable-tabs narf|enable-tab-width-4))
|
(add-hook! go-mode '(emr-initialize flycheck-mode narf|enable-tabs narf|enable-tab-width-4))
|
||||||
:config
|
:config
|
||||||
(define-builder! go-mode "go build")
|
(define-builder! go-mode "go build")
|
||||||
(bind! :map go-mode-map
|
|
||||||
:n "gd" 'godef-jump
|
|
||||||
:n "gD" 'godef-describe
|
|
||||||
(:prefix ","
|
|
||||||
:n "tr" 'narf:go-test-run-all
|
|
||||||
:n "ta" 'narf:go-test-run-all
|
|
||||||
:n "ts" 'narf:go-test-run-package))
|
|
||||||
|
|
||||||
(mapc (lambda (x)
|
;; emr support
|
||||||
(let ((command-name (car x))
|
(after! emr
|
||||||
(title (cadr x))
|
(mapc (lambda (x)
|
||||||
(region-p (caddr x))
|
(let ((command-name (car x))
|
||||||
predicate)
|
(title (cadr x))
|
||||||
(setq predicate (cond ((eq region-p 'both) nil)
|
(region-p (caddr x))
|
||||||
(t (if region-p
|
predicate)
|
||||||
(lambda () (use-region-p))
|
(setq predicate (cond ((eq region-p 'both) nil)
|
||||||
(lambda () (not (use-region-p)))))))
|
(t (if region-p
|
||||||
(emr-declare-command (intern (symbol-name command-name))
|
(lambda () (use-region-p))
|
||||||
:title title :modes 'go-mode :predicate predicate)))
|
(lambda () (not (use-region-p)))))))
|
||||||
'((go-remove-unused-imports "Remove unushed imports" nil)
|
(emr-declare-command (intern (symbol-name command-name))
|
||||||
(gofmt "Format code" nil)))
|
:title title :modes 'go-mode :predicate predicate)))
|
||||||
|
'((go-remove-unused-imports "Remove unushed imports" nil)
|
||||||
|
(gofmt "Format code" nil))))
|
||||||
|
|
||||||
|
(after! helm
|
||||||
|
(use-package helm-go-package :defer t))
|
||||||
|
|
||||||
(use-package go-eldoc
|
(use-package go-eldoc
|
||||||
:config (add-hook! go-mode 'go-eldoc-setup))
|
:config (add-hook! go-mode 'go-eldoc-setup))
|
||||||
|
|
||||||
(use-package company-go
|
(use-package company-go
|
||||||
:config
|
:config
|
||||||
(define-company-backend! go-mode (go yasnippet))))
|
(define-company-backend! go-mode (go yasnippet)))
|
||||||
|
|
||||||
|
(bind!
|
||||||
|
(:map go-mode-map
|
||||||
|
:n "gd" 'godef-jump
|
||||||
|
:n "gD" 'godef-describe
|
||||||
|
:n ",i" 'helm-go-package
|
||||||
|
:n ",tr" 'narf:go-test-run-all
|
||||||
|
:n ",ta" 'narf:go-test-run-all
|
||||||
|
:n ",ts" 'narf:go-test-run-package)))
|
||||||
|
|
||||||
(provide 'module-go)
|
(provide 'module-go)
|
||||||
;;; module-go.el ends here
|
;;; module-go.el ends here
|
||||||
|
|
|
@ -42,8 +42,7 @@
|
||||||
writeroom-restore-window-config t
|
writeroom-restore-window-config t
|
||||||
writeroom-fullscreen-effect nil
|
writeroom-fullscreen-effect nil
|
||||||
writeroom-extra-line-spacing 10
|
writeroom-extra-line-spacing 10
|
||||||
writeroom-width 110))
|
writeroom-width 125))
|
||||||
|
|
||||||
|
|
||||||
;;; LaTeX
|
;;; LaTeX
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue