0.4 bump; refactor + new plugins + level up emacsfu
This commit is contained in:
parent
d073d61531
commit
c7db4e0096
12 changed files with 259 additions and 208 deletions
13
Cask
13
Cask
|
@ -8,7 +8,6 @@
|
|||
(depends-on "s")
|
||||
(depends-on "f")
|
||||
(depends-on "use-package")
|
||||
(depends-on "popwin")
|
||||
(depends-on "help-fns+")
|
||||
(depends-on "esup")
|
||||
|
||||
|
@ -18,14 +17,19 @@
|
|||
(depends-on "applescript-mode")
|
||||
|
||||
;; UI --- core/core-ui.el
|
||||
(depends-on "nlinum")
|
||||
(depends-on "hl-todo" :git "https://github.com/tarsius/hl-todo")
|
||||
(depends-on "rainbow-delimiters")
|
||||
(depends-on "rainbow-mode")
|
||||
(depends-on "popwin")
|
||||
(depends-on "fill-column-indicator")
|
||||
(depends-on "volatile-highlights")
|
||||
(depends-on "nlinum")
|
||||
(depends-on "spaceline" :git "https://github.com/TheBB/spaceline")
|
||||
(depends-on "yascroll")
|
||||
|
||||
;; Evil --- core/core-evil.el
|
||||
(depends-on "evil")
|
||||
(depends-on "evil-anzu")
|
||||
(depends-on "evil-args")
|
||||
(depends-on "evil-commentary")
|
||||
(depends-on "evil-exchange")
|
||||
(depends-on "evil-iedit-state")
|
||||
|
@ -48,9 +52,6 @@
|
|||
(depends-on "expand-region")
|
||||
(depends-on "fancy-narrow")
|
||||
(depends-on "goto-last-change")
|
||||
(depends-on "hl-todo" :git "https://github.com/tarsius/hl-todo")
|
||||
(depends-on "rainbow-delimiters")
|
||||
(depends-on "rainbow-mode")
|
||||
(depends-on "rotate-text" :git "https://github.com/debug-ito/rotate-text.el")
|
||||
(depends-on "smart-forward")
|
||||
(depends-on "smartparens")
|
||||
|
|
|
@ -107,6 +107,8 @@ enable multiple minor modes for the same regexp.")
|
|||
:defer t
|
||||
:diminish undo-tree-mode
|
||||
:config
|
||||
(defalias 'redo #'undo-tree-redo)
|
||||
(defalias 'undo #'undo-tree-undo)
|
||||
;; Shut up undo-tree's constant complaining: http://youtu.be/Z6woIRLnbmE
|
||||
;; (defadvice undo-tree-load-history-hook (around undo-tree-load-history-shut-up activate)
|
||||
;; (shut-up! ad-do-it))
|
||||
|
@ -138,32 +140,6 @@ enable multiple minor modes for the same regexp.")
|
|||
(use-package goto-last-change
|
||||
:commands goto-last-change)
|
||||
|
||||
(use-package hl-todo
|
||||
:commands hl-todo-mode
|
||||
:init
|
||||
(add-hook! prog-mode 'hl-todo-mode)
|
||||
(defvar hl-todo-keyword-faces
|
||||
'(("TODO" . "#cc9393")
|
||||
("NOTE" . "#d0bf8f")
|
||||
("FIXME" . "#cc9393"))))
|
||||
|
||||
(use-package hideshow
|
||||
:commands (hs-minor-mode hs-toggle-hiding hs-already-hidden-p)
|
||||
:diminish hs-minor-mode
|
||||
:init
|
||||
(after! evil
|
||||
(defun narf-load-hs-minor-mode ()
|
||||
(advice-remove 'evil-toggle-fold 'narf-load-hs-minor-mode)
|
||||
(hs-minor-mode 1))
|
||||
(advice-add 'evil-toggle-fold :before 'narf-load-hs-minor-mode)))
|
||||
|
||||
(use-package rainbow-delimiters
|
||||
:commands rainbow-delimiters-mode
|
||||
:init (add-hook! (emacs-lisp-mode js2-mode scss-mode) 'rainbow-delimiters-mode)
|
||||
:config (setq rainbow-delimiters-outermost-only-face-count 1))
|
||||
|
||||
(use-package rainbow-mode :defer t)
|
||||
|
||||
(use-package rotate-text :commands (rotate-word-at-point rotate-region))
|
||||
|
||||
(use-package smart-forward :commands (smart-up smart-down smart-left smart-right))
|
||||
|
|
|
@ -3,16 +3,22 @@
|
|||
|
||||
(use-package evil
|
||||
:init
|
||||
;; Speed up show-paren outside of normal mode (where my motions are minimal)
|
||||
(add-hook! evil-normal-state-entry (setq show-paren-delay 0.075))
|
||||
(add-hook! evil-normal-state-exit (setq show-paren-delay 0))
|
||||
;; Disable highlights on insert-mode
|
||||
(add-hook! evil-insert-state-entry 'evil-ex-nohighlight)
|
||||
;; Prevents "matches )" messages in minibuffer
|
||||
(add-hook! evil-insert-state-entry (setq-default blink-matching-paren t))
|
||||
(add-hook! evil-insert-state-exit (setq-default blink-matching-paren nil))
|
||||
;; highlight matching delimiters where it's important
|
||||
(defun show-paren-mode-off () (show-paren-mode -1))
|
||||
(add-hook! evil-insert-state-entry 'show-paren-mode)
|
||||
(add-hook! evil-insert-state-exit 'show-paren-mode-off)
|
||||
(add-hook! evil-visual-state-entry 'show-paren-mode)
|
||||
(add-hook! evil-visual-state-exit 'show-paren-mode-off)
|
||||
(add-hook! evil-motion-state-entry 'show-paren-mode)
|
||||
(add-hook! evil-motion-state-exit 'show-paren-mode-off)
|
||||
(add-hook! evil-operator-state-entry 'show-paren-mode)
|
||||
(add-hook! evil-operator-state-exit 'show-paren-mode-off)
|
||||
|
||||
;; Always ensure evil-shift-width is consistent with tab-width
|
||||
(add-hook! evil-local-mode (setq evil-shift-width tab-width))
|
||||
;; Disable highlights on insert-mode
|
||||
(add-hook! evil-insert-state-entry 'evil-ex-nohighlight)
|
||||
|
||||
:config
|
||||
(setq evil-magic t
|
||||
evil-want-C-u-scroll t ; enable C-u for scrolling
|
||||
|
@ -67,7 +73,15 @@
|
|||
"C-u" 'evil-delete-whole-line)))
|
||||
|
||||
;; evil plugins
|
||||
(use-package evil-anzu)
|
||||
(use-package evil-anzu
|
||||
:config (setq anzu-cons-mode-line-p nil))
|
||||
|
||||
(use-package evil-args
|
||||
:commands (evil-inner-arg evil-outer-arg evil-forward-arg evil-backward-arg evil-jump-out-args)
|
||||
:init
|
||||
(define-key evil-inner-text-objects-map "a" #'evil-inner-arg)
|
||||
(define-key evil-outer-text-objects-map "a" #'evil-outer-arg)
|
||||
(define-key evil-normal-state-map "K" #'evil-jump-out-args))
|
||||
|
||||
(use-package evil-commentary
|
||||
:diminish evil-commentary-mode
|
||||
|
@ -115,9 +129,12 @@
|
|||
evil-jumper-auto-save-interval 3600))
|
||||
|
||||
(use-package evil-matchit
|
||||
:defer 1
|
||||
:commands (evilmi-jump-items global-evil-matchit-mode)
|
||||
:config (global-evil-matchit-mode 1))
|
||||
:commands (evilmi-jump-items evilmi-text-object global-evil-matchit-mode)
|
||||
:config (global-evil-matchit-mode 1)
|
||||
:init
|
||||
(define-key evil-normal-state-map "%" #'evilmi-jump-items)
|
||||
(define-key evil-inner-text-objects-map "%" #'evilmi-text-object)
|
||||
(define-key evil-outer-text-objects-map "%" #'evilmi-text-object))
|
||||
|
||||
(use-package evil-easymotion
|
||||
:defer 1
|
||||
|
@ -153,15 +170,24 @@
|
|||
|
||||
(use-package evil-snipe
|
||||
:diminish evil-snipe-mode
|
||||
:commands (evil-snipe-f evil-snipe-F evil-snipe-t evil-snipe-T evil-snipe-s evil-snipe-S evil-snipe-x evil-snipe-X)
|
||||
:init
|
||||
(setq-default
|
||||
evil-snipe-smart-case t
|
||||
evil-snipe-repeat-keys nil ; using evil-space to repeat
|
||||
evil-snipe-scope 'line
|
||||
evil-snipe-repeat-scope 'buffer
|
||||
evil-snipe-repeat-scope 'visible
|
||||
evil-snipe-override-evil-repeat-keys nil ; causes problems with remapped ;
|
||||
evil-snipe-symbol-groups '((?\[ "[[{(]")
|
||||
(?\] "[]})]")))
|
||||
(bind! :m "f" 'evil-snipe-f
|
||||
:m "F" 'evil-snipe-F
|
||||
:m "t" 'evil-snipe-t
|
||||
:m "T" 'evil-snipe-T
|
||||
:m "s" 'evil-snipe-s
|
||||
:m "S" 'evil-snipe-S
|
||||
:o "x" 'evil-snipe-x
|
||||
:o "X" 'evil-snipe-X)
|
||||
:config
|
||||
(evil-snipe-mode 1)
|
||||
(evil-snipe-override-mode 1))
|
||||
|
|
|
@ -2,8 +2,7 @@
|
|||
;; Related to: lib/defuns-flycheck.el
|
||||
|
||||
(use-package flycheck
|
||||
:functions (flycheck-buffer)
|
||||
:commands (flycheck-mode flycheck-list-errors)
|
||||
:commands (flycheck-mode flycheck-list-errors flycheck-buffer)
|
||||
:init
|
||||
(setq flycheck-indication-mode nil
|
||||
;; Removed checks on idle/change for snappiness
|
||||
|
|
162
core/core-ui.el
162
core/core-ui.el
|
@ -2,13 +2,12 @@
|
|||
;; see lib/ui-defuns.el
|
||||
|
||||
(when window-system
|
||||
(fringe-mode '(2 . 3))
|
||||
(set-frame-font narf-default-font)
|
||||
(setq frame-title-format '(buffer-file-name "%f" ("%b"))))
|
||||
(setq frame-title-format '(buffer-file-name "%f" ("%b")))
|
||||
(fringe-mode '(2 . 3)))
|
||||
|
||||
;; Highlight matching parens
|
||||
(setq show-paren-delay 0.075)
|
||||
(show-paren-mode 1)
|
||||
|
||||
(global-hl-line-mode 1) ; do highlight line
|
||||
(blink-cursor-mode 1) ; do blink cursor
|
||||
|
@ -20,7 +19,6 @@
|
|||
|
||||
(setq-default
|
||||
blink-matching-paren nil
|
||||
line-spacing 1
|
||||
;; Multiple cursors across buffers cause a strange redraw delay for
|
||||
;; some things, like auto-complete or evil-mode's cursor color
|
||||
;; switching.
|
||||
|
@ -33,56 +31,62 @@
|
|||
redisplay-dont-pause t
|
||||
indicate-buffer-boundaries nil
|
||||
indicate-empty-lines nil
|
||||
fringes-outside-margins t) ; fringes on the other side of line numbers
|
||||
fringes-outside-margins t ; fringes on the other side of line numbers
|
||||
|
||||
resize-mini-windows t)
|
||||
|
||||
;; hl-line-mode breaks minibuffer in TTY
|
||||
(add-hook! minibuffer-setup
|
||||
(make-variable-buffer-local 'global-hl-line-mode)
|
||||
(setq global-hl-line-mode nil))
|
||||
|
||||
;; Hide modeline in help windows
|
||||
(add-hook! help-mode (setq-local mode-line-format nil))
|
||||
|
||||
|
||||
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
||||
|
||||
(use-package hl-todo
|
||||
:commands hl-todo-mode
|
||||
:init
|
||||
(add-hook! prog-mode 'hl-todo-mode)
|
||||
(defvar hl-todo-keyword-faces
|
||||
'(("TODO" . "#cc9393")
|
||||
("NOTE" . "#d0bf8f")
|
||||
("FIXME" . "#cc9393"))))
|
||||
|
||||
(use-package hideshow
|
||||
:commands (hs-minor-mode hs-toggle-hiding hs-already-hidden-p)
|
||||
:diminish hs-minor-mode
|
||||
:init
|
||||
(after! evil
|
||||
(defun narf-load-hs-minor-mode ()
|
||||
(advice-remove 'evil-toggle-fold 'narf-load-hs-minor-mode)
|
||||
(hs-minor-mode 1))
|
||||
(advice-add 'evil-toggle-fold :before 'narf-load-hs-minor-mode)))
|
||||
|
||||
(use-package rainbow-delimiters
|
||||
:commands rainbow-delimiters-mode
|
||||
:when (display-graphic-p)
|
||||
:init (add-hook! (emacs-lisp-mode js2-mode scss-mode) 'rainbow-delimiters-mode)
|
||||
:config (setq rainbow-delimiters-outermost-only-face-count 1))
|
||||
|
||||
(use-package rainbow-mode :defer t)
|
||||
|
||||
(use-package popwin
|
||||
:config
|
||||
(setq popwin:popup-window-height 25)
|
||||
(mapc (lambda (rule) (push rule popwin:special-display-config))
|
||||
'(("*quickrun*" :position bottom :height 15)
|
||||
("*scratch*" :position bottom :height 20 :stick t :dedicated t)
|
||||
("*helm-ag-edit*" :position bottom :height 20 :stick t)
|
||||
(help-mode :position bottom :height 15 :stick t)
|
||||
("^\\*[Hh]elm.*?\\*\\'" :regexp t :position bottom :height 15)
|
||||
("*eshell*" :position left :width 80 :stick t :dedicated t)
|
||||
("*Apropos*" :position bottom :height 40 :stick t :dedicated t)
|
||||
("*Backtrace*" :position bottom :height 15 :stick t)))
|
||||
(popwin-mode 1))
|
||||
|
||||
(use-package yascroll
|
||||
:config
|
||||
(add-hook! evil-insert-state-exit 'yascroll:update-scroll-bar)
|
||||
|
||||
(defun yascroll:show-scroll-bar ()
|
||||
"Show scroll bar in BUFFER."
|
||||
(interactive)
|
||||
(yascroll:hide-scroll-bar)
|
||||
(let ((window-lines (window-height))
|
||||
(buffer-lines (count-lines (point-min) (point-max))))
|
||||
(when (< window-lines buffer-lines)
|
||||
(let* ((scroll-top (count-lines (point-min) (window-start)))
|
||||
(thumb-window-line (yascroll:compute-thumb-window-line window-lines buffer-lines scroll-top))
|
||||
(thumb-buffer-line (+ scroll-top thumb-window-line))
|
||||
(thumb-size (yascroll:compute-thumb-size window-lines buffer-lines))
|
||||
(make-thumb-overlay 'yascroll:make-thumb-overlay-right-fringe))
|
||||
(when (<= thumb-buffer-line buffer-lines)
|
||||
(yascroll:make-thumb-overlays make-thumb-overlay
|
||||
thumb-window-line
|
||||
thumb-size))))))
|
||||
|
||||
(defun yascroll:compute-thumb-size (window-lines buffer-lines)
|
||||
"Return the proper size (height) of scroll bar thumb."
|
||||
(let ((window-lines (* window-lines 0.93)))
|
||||
(if (zerop buffer-lines)
|
||||
1
|
||||
(max 1 (floor (* (/ window-lines buffer-lines) window-lines))))))
|
||||
|
||||
(setq yascroll:scroll-bar 'right-fringe
|
||||
yascroll:delay-to-hide nil)
|
||||
(add-to-list 'yascroll:enabled-window-systems 'mac)
|
||||
(defun yascroll:before-change (beg end))
|
||||
(global-yascroll-bar-mode 1))
|
||||
|
||||
(use-package fill-column-indicator
|
||||
:commands fci-mode
|
||||
:init
|
||||
|
@ -91,6 +95,23 @@
|
|||
:config
|
||||
(setq fci-rule-color "#2b303f"))
|
||||
|
||||
(use-package volatile-highlights
|
||||
:diminish volatile-highlights-mode
|
||||
:config
|
||||
(vhl/define-extension 'my-evil-highlights
|
||||
'evil-yank
|
||||
'evil-paste-pop-proxy
|
||||
'evil-paste-pop-next
|
||||
'evil-paste-after
|
||||
'evil-paste-before)
|
||||
(vhl/install-extension 'my-evil-highlights)
|
||||
|
||||
(vhl/define-extension 'my-undo-tree-highlights
|
||||
'undo-tree-undo
|
||||
'undo-tree-redo)
|
||||
(vhl/install-extension 'my-undo-tree-highlights)
|
||||
(volatile-highlights-mode t))
|
||||
|
||||
(use-package nlinum ; line numbers
|
||||
:preface
|
||||
(defvar narf--hl-nlinum-overlay nil)
|
||||
|
@ -152,7 +173,7 @@
|
|||
(use-package spaceline-segments
|
||||
:config
|
||||
(setq-default
|
||||
powerline-default-separator 'wave
|
||||
powerline-default-separator nil
|
||||
powerline-height 18)
|
||||
|
||||
;; Modeline cache
|
||||
|
@ -171,8 +192,10 @@
|
|||
(if (powerline-selected-window-active)
|
||||
'mode-line-buffer-file
|
||||
'mode-line-inactive))))
|
||||
(concat (if buffer-file-name
|
||||
(if buffer-file-name
|
||||
(concat (propertize
|
||||
(or narf--spaceline-file-path
|
||||
(setq narf--spaceline-file-path
|
||||
(let* ((max-length (/ (window-width) 2))
|
||||
(project-path (let ((p (narf/project-root)))
|
||||
(if (string-match "/+\\'" p)
|
||||
|
@ -184,19 +207,19 @@
|
|||
(concat "…" (replace-regexp-in-string
|
||||
"^.*?/" "/"
|
||||
(substring path (- path-len max-length) path-len)))
|
||||
path))
|
||||
path))))
|
||||
'face (if (powerline-selected-window-active)
|
||||
'mode-line-buffer-dir
|
||||
'mode-line-inactive)
|
||||
)
|
||||
'mode-line-inactive))
|
||||
buffer
|
||||
(if (and buffer-file-name (buffer-modified-p))
|
||||
(propertize "%+" 'face 'mode-line-is-modified)))
|
||||
buffer)
|
||||
" "))
|
||||
;; Causes right side of this segment to be square
|
||||
:face line-face
|
||||
:tight-right t)
|
||||
(when buffer-file-name
|
||||
(propertize
|
||||
(concat
|
||||
(when (buffer-modified-p) "[+]")
|
||||
(when buffer-read-only "[RO]")
|
||||
(unless (file-exists-p buffer-file-name) "[!]"))
|
||||
'face (if active 'mode-line-is-modified 'mode-line-inactive))))
|
||||
buffer)))
|
||||
|
||||
(spaceline-define-segment narf-buffer-project-name
|
||||
"The project name."
|
||||
|
@ -210,7 +233,8 @@
|
|||
(if (string-match "\\(dos\\|unix\\|mac\\)" buf-coding)
|
||||
(match-string 1 buf-coding)
|
||||
buf-coding))
|
||||
:when (not (string-match-p "unix" (symbol-name buffer-file-coding-system))))
|
||||
:when (and buffer-file-name
|
||||
(not (string-match-p "unix" (symbol-name buffer-file-coding-system)))))
|
||||
|
||||
(spaceline-define-segment narf-buffer-position
|
||||
"A more vim-like buffer position."
|
||||
|
@ -226,7 +250,6 @@
|
|||
(format " %s %s%s " (char-to-string #xe0a0) vc
|
||||
(case (vc-state buffer-file-name) ('edited "+") ('conflict "!!!") (t "")))))
|
||||
:when (and active vc-mode)
|
||||
:face other-face
|
||||
:tight t)
|
||||
|
||||
;; Display version string
|
||||
|
@ -247,33 +270,38 @@
|
|||
(powerline-hud highlight-face default-face 1)
|
||||
:tight t)
|
||||
|
||||
(spaceline-define-segment narf-line-column
|
||||
"The current line and column numbers."
|
||||
"%l/%c")
|
||||
|
||||
(spaceline-define-segment narf-evil-state
|
||||
"The current evil state. Requires `evil-mode' to be enabled."
|
||||
(concat (substring (evil-state-property evil-state :tag t) 2 3) " ")
|
||||
:when (and active (bound-and-true-p evil-local-mode))
|
||||
:tight-right t)
|
||||
(spaceline-define-segment narf-anzu
|
||||
"Show the current match number and the total number of matches. Requires anzu
|
||||
to be enabled."
|
||||
(let ((here anzu--current-position)
|
||||
(total anzu--total-matched))
|
||||
(when anzu--state
|
||||
(cl-case anzu--state
|
||||
(search (format "%s/%d%s"
|
||||
(anzu--format-here-position here total)
|
||||
total (if anzu--overflow-p "+" "")))
|
||||
(replace-query (format "%d replace" total))
|
||||
(replace (format "%d/%d" here total)))))
|
||||
:when (and active (bound-and-true-p anzu--state)))
|
||||
|
||||
;; Initialize modeline
|
||||
(spaceline-install
|
||||
;; Left side
|
||||
'((narf-buffer-path remote-host)
|
||||
'((narf-anzu :face highlight-face)
|
||||
(narf-buffer-path remote-host)
|
||||
narf-vc
|
||||
narf-buffer-project-name
|
||||
((flycheck-error flycheck-warning flycheck-info) :when active))
|
||||
;; Right side
|
||||
'(selection-info
|
||||
anzu
|
||||
'((selection-info :face highlight-face)
|
||||
narf-env-version
|
||||
narf-buffer-encoding-abbrev
|
||||
((" " :tight t)
|
||||
major-mode (minor-modes :separator " ")
|
||||
major-mode (minor-modes :tight t :separator " ")
|
||||
process :when active)
|
||||
(global :when active)
|
||||
(narf-line-column narf-buffer-position)
|
||||
("%l/%c" narf-buffer-position)
|
||||
narf-hud
|
||||
)))
|
||||
|
||||
(provide 'core-ui)
|
||||
|
|
|
@ -43,8 +43,5 @@ gets killed.")
|
|||
"A list of files that count as 'project files', which determine whether a
|
||||
folder is the root of a project or not.")
|
||||
|
||||
(defcustom narf-big-font (font-spec :family "Ubuntu Mono" :size 18 :antialias t)
|
||||
"Font to switch to in big mode")
|
||||
|
||||
(provide 'core-vars)
|
||||
;;; core-vars.el ends here
|
||||
|
|
28
core/core.el
28
core/core.el
|
@ -86,13 +86,33 @@
|
|||
(make-directory path t)))))
|
||||
|
||||
;; Save history across sessions
|
||||
(require 'savehist)
|
||||
(use-package savehist
|
||||
:config
|
||||
(setq savehist-file (concat narf-temp-dir "savehist")
|
||||
savehist-save-minibuffer-history t
|
||||
savehist-additional-variables
|
||||
'(kill-ring global-mark-ring search-ring regexp-search-ring extended-command-history))
|
||||
'(kill-ring search-ring regexp-search-ring))
|
||||
(savehist-mode 1)
|
||||
|
||||
(require 'recentf)
|
||||
;; text properties severely bloat the history so delete them (courtesy of PythonNut)
|
||||
(defun unpropertize-savehist ()
|
||||
(mapc (lambda (list)
|
||||
(with-demoted-errors
|
||||
(when (boundp list)
|
||||
(set list (mapcar #'substring-no-properties (eval list))))))
|
||||
'(kill-ring
|
||||
minibuffer-history
|
||||
helm-grep-history
|
||||
helm-ff-history
|
||||
file-name-history
|
||||
read-expression-history
|
||||
extended-command-history
|
||||
evil-ex-history)))
|
||||
(add-hook 'kill-emacs-hook #'unpropertize-savehist)
|
||||
(add-hook 'savehist-save-hook #'unpropertize-savehist))
|
||||
|
||||
(use-package recentf
|
||||
:config
|
||||
(setq recentf-save-file (concat narf-temp-dir "recentf")
|
||||
recentf-exclude '("/tmp/" "/ssh:" "\\.?ido\\.last$" "\\.revive$" "/TAGS$"
|
||||
"emacs\\.d/private/cache/.+" "emacs\\.d/workgroups/.+$" "wg-default"
|
||||
|
@ -100,7 +120,7 @@
|
|||
recentf-max-menu-items 0
|
||||
recentf-max-saved-items 250
|
||||
recentf-auto-cleanup 600)
|
||||
(recentf-mode 1)
|
||||
(recentf-mode 1))
|
||||
|
||||
(use-package saveplace
|
||||
:defer t
|
||||
|
|
|
@ -20,7 +20,7 @@
|
|||
;;;###autoload
|
||||
(defun narf:toggle-big-mode ()
|
||||
(interactive)
|
||||
(if narf--big-mode narf/default-font (narf/big-font))
|
||||
(set-frame-font (if narf--big-mode narf-default-font narf-big-font))
|
||||
(setq narf--big-mode (not narf--big-mode)))
|
||||
|
||||
;;;###autoload
|
||||
|
|
10
init.el
10
init.el
|
@ -2,7 +2,7 @@
|
|||
;;
|
||||
;; Author: Henrik Lissner <henrik@lissner.net>
|
||||
;; URL: https://github.com/hlissner/emacs.d
|
||||
;; Version: 0.3.0
|
||||
;; Version: 0.4.0
|
||||
;;
|
||||
;;; Are you pondering what I'm pondering, Pinky?
|
||||
;;
|
||||
|
@ -42,8 +42,8 @@
|
|||
|
||||
(defconst narf-debug-mode nil)
|
||||
(setq gc-cons-threshold 84857600) ; avoid garbage collection
|
||||
(setq file-name-handler-alist nil) ; premature optimization weee!
|
||||
|
||||
(let (file-name-handler-alist) ; premature optimization weee!
|
||||
(scroll-bar-mode -1) ; no scrollbar
|
||||
(tool-bar-mode -1) ; no toolbar
|
||||
(menu-bar-mode -1) ; no menubar
|
||||
|
@ -52,7 +52,9 @@
|
|||
(defconst narf-big-font (font-spec :family "Ubuntu Mono" :size 18 :antialias t))
|
||||
(load (concat user-emacs-directory "init-load-path.el"))
|
||||
(load-theme (if window-system 'narf-dark 'wombat) t)
|
||||
|
||||
(set-frame-parameter nil 'fullscreen 'fullboth)
|
||||
|
||||
(mapc 'require
|
||||
`(core ; core/core.el
|
||||
,(cond (IS-MAC 'core-os-osx)
|
||||
|
@ -77,7 +79,7 @@
|
|||
module-csharp ; unity, .NET, and mono shenanigans
|
||||
module-data ; dbs 'n data formats
|
||||
module-elisp ; drowning in parentheses
|
||||
;; module-eshell ; eshell (on windows)
|
||||
module-eshell ; eshell (on windows)
|
||||
module-go ; a hipster dialect
|
||||
module-java ; the poster child for carpal tunnel syndome
|
||||
module-js ; alert("not java, javascript!")
|
||||
|
@ -99,6 +101,6 @@
|
|||
my-commands
|
||||
))
|
||||
|
||||
(narf-init))
|
||||
(narf-init)
|
||||
|
||||
;;; I think so Brain...
|
||||
|
|
|
@ -31,7 +31,11 @@
|
|||
(when IS-MAC
|
||||
(after! flycheck
|
||||
(setq-default flycheck-c/c++-clang-executable "clang++"
|
||||
flycheck-clang-include-path '("/usr/local/include"))))
|
||||
flycheck-clang-include-path '("/usr/local/include"))
|
||||
|
||||
(add-hook! c-mode (setq flycheck-clang-language-standard "C11"))
|
||||
(add-hook! c++-mode (setq flycheck-clang-language-standard "c++11"
|
||||
flycheck-clang-standard-library "libc++"))))
|
||||
|
||||
(after! company
|
||||
;; TODO Clang is *really* slow in larger projects, maybe replace it with
|
||||
|
@ -41,8 +45,6 @@
|
|||
(define-company-backend! objc-mode (c-headers xcode)))
|
||||
|
||||
(add-hook! c++-mode 'narf|init-c++-C11-highlights)
|
||||
(add-hook! c++-mode (setq flycheck-clang-language-standard "c++11"
|
||||
flycheck-clang-standard-library "libc++"))
|
||||
|
||||
;; Fix enum and C++11 lambda indentation
|
||||
(defadvice c-lineup-arglist (around c-lineup-arglist-indent-fix activate)
|
||||
|
|
|
@ -65,7 +65,7 @@
|
|||
(setq mode-name "JS2"))
|
||||
|
||||
(define-minor-mode nodejs-mode
|
||||
:lighter " Node" :keymap (make-sparse-keymap)
|
||||
:lighter " node" :keymap (make-sparse-keymap)
|
||||
(add-yas-minor-mode! 'nodejs-mode))
|
||||
(associate! nodejs-mode :files ("package.json") :in (js2-mode)))
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue