~edwargix/emacs.d

e836b5283ada0c309c2d2ba9b27ee82bfa0557fc — David Florness 7 years ago 810e68b
Reindent with 4 spaces as tabs
5 files changed, 75 insertions(+), 75 deletions(-)

M init.el
M lisp/setup-dev.el
M lisp/setup-helm.el
M lisp/setup-keys.el
M lisp/setup-packages.el
M init.el => init.el +16 -16
@@ 23,8 23,8 @@
  :ensure t
  :commands (markdown-mode gfm-mode)
  :mode (("README\\.md\\'" . gfm-mode)
		 ("\\.md\\'" . markdown-mode)
		 ("\\.markdown\\'" . markdown-mode))
	 ("\\.md\\'" . markdown-mode)
	 ("\\.markdown\\'" . markdown-mode))
  :init (setq markdown-command "multimarkdown"))




@@ 40,9 40,9 @@
  :ensure t
  :init
  (progn
	(global-flycheck-mode)
	(evil-define-key 'normal
	  flycheck-error-list-mode-map (kbd "q") 'quit-window)))
    (global-flycheck-mode)
    (evil-define-key 'normal
      flycheck-error-list-mode-map (kbd "q") 'quit-window)))

;;; Quickhelp (documentation lookup) for company
(use-package company-quickhelp


@@ 50,8 50,8 @@
  :after company
  :config
  (progn
	(setq company-quickhelp-idle-delay 1)
	(company-quickhelp-mode 1)))
    (setq company-quickhelp-idle-delay 1)
    (company-quickhelp-mode 1)))

;;; Yasnippet: yet another snippet extension
(use-package yasnippet


@@ 64,8 64,8 @@
  :ensure t
  :config
  (defengine duckduckgo
	"https://duckduckgo.com/?q=%s"
	:keybinding "d")
    "https://duckduckgo.com/?q=%s"
    :keybinding "d")
  (engine-mode))

;;; Org mode for keeping notes, todo lists, planning, and fast


@@ 73,12 73,12 @@
(use-package org
  :init
  (progn
	(load-file "~/org/setup.el")
	(unless (package-installed-p 'org-plus-contrib)
	  (package-install 'org-plus-contrib))
	(setq org-default-notes-file "~/notes.org"
		  org-return-follows-link t
		  org-read-date-force-compatible-dates nil))
    (load-file "~/org/setup.el")
    (unless (package-installed-p 'org-plus-contrib)
      (package-install 'org-plus-contrib))
    (setq org-default-notes-file "~/notes.org"
	  org-return-follows-link t
	  org-read-date-force-compatible-dates nil))
  :bind
  (("C-c a" . org-agenda)
   ("C-c c" . org-capture)


@@ 91,7 91,7 @@
  :after org
  :config
  (progn
	(add-hook 'org-mode-hook 'org-bullets-mode)))
    (add-hook 'org-mode-hook 'org-bullets-mode)))


;;; Paradox: a modern package menu

M lisp/setup-dev.el => lisp/setup-dev.el +13 -13
@@ 11,18 11,18 @@

;; show unnecessary whitespace that can mess up your diff
(add-hook 'prog-mode-hook
		  (lambda () (interactive)
			(setq show-trailing-whitespace 1)))
	  (lambda () (interactive)
	    (setq show-trailing-whitespace 1)))


;; set appearance of a tab that is represented by 4 spaces
(setq-default tab-width 4)
;; set appearance of a tab that is represented by 8 spaces
(setq-default tab-width 8)


(global-set-key (kbd "<f5>") (lambda ()
							   (interactive)
							   (setq-local compilation-read-command nil)
							   (call-interactively 'compile)))
			       (interactive)
			       (setq-local compilation-read-command nil)
			       (call-interactively 'compile)))


;; setup GDB


@@ 38,16 38,16 @@
(use-package company
  :ensure t
  :bind (:map company-active-map
			  ("M-j" . company-select-next)
			  ("M-k" . company-select-previous)
			  ("C-j" . company-select-next)
			  ("C-k" . company-select-previous))
	      ("M-j" . company-select-next)
	      ("M-k" . company-select-previous)
	      ("C-j" . company-select-next)
	      ("C-k" . company-select-previous))
  :init
  (progn
	(add-hook 'after-init-hook 'global-company-mode))
    (add-hook 'after-init-hook 'global-company-mode))
  :config
  (progn
	(delete 'company-semantic company-backends)))
    (delete 'company-semantic company-backends)))


;;; company backend for C/C++ headers

M lisp/setup-helm.el => lisp/setup-helm.el +33 -33
@@ 36,15 36,15 @@
   ("M-h" . helm-find-files-up-one-level))
  :config
  (progn
	(require 'helm-config)
	(when (executable-find "curl")
	  (setq helm-net-prefer-curl t))
	(add-hook 'helm-after-initialize-hook
			  ;; hide the cursor in helm buffers
			  (lambda ()
				(with-helm-buffer
				  (setq cursor-in-non-selected-windows nil))))
	(helm-mode 1)))
    (require 'helm-config)
    (when (executable-find "curl")
      (setq helm-net-prefer-curl t))
    (add-hook 'helm-after-initialize-hook
	      ;; hide the cursor in helm buffers
	      (lambda ()
		(with-helm-buffer
		  (setq cursor-in-non-selected-windows nil))))
    (helm-mode 1)))


;;; Helm extension for yasnippet


@@ 55,7 55,7 @@
  ("C-c y" . helm-yas-complete)
  :init
  (progn
	(setq helm-yas-space-match-any-greedy t)))
    (setq helm-yas-space-match-any-greedy t)))


;;; Helm extension for gtags


@@ 64,31 64,31 @@
  :commands (helm-gtags-mode)
  :init
  (progn
	(setq helm-gtags-ignore-case t
		  helm-gtags-auto-update t
		  helm-gtags-use-input-at-cursor t
		  helm-gtags-pulse-at-cursor t
		  helm-gtags-prefix-key (kbd "C-c g")
		  helm-gtags-suggested-key-mapping t)
	(add-hook 'dired-mode-hook 'helm-gtags-mode)
	(add-hook 'eshell-mode-hook 'helm-gtags-mode)
	(add-hook 'c-mode-hook 'helm-gtags-mode)
	(add-hook 'c++-mode-hook 'helm-gtags-mode)
	(add-hook 'asm-made-hook 'helm-gtags-mode))
    (setq helm-gtags-ignore-case t
	  helm-gtags-auto-update t
	  helm-gtags-use-input-at-cursor t
	  helm-gtags-pulse-at-cursor t
	  helm-gtags-prefix-key (kbd "C-c g")
	  helm-gtags-suggested-key-mapping t)
    (add-hook 'dired-mode-hook 'helm-gtags-mode)
    (add-hook 'eshell-mode-hook 'helm-gtags-mode)
    (add-hook 'c-mode-hook 'helm-gtags-mode)
    (add-hook 'c++-mode-hook 'helm-gtags-mode)
    (add-hook 'asm-made-hook 'helm-gtags-mode))
  :config
  (progn
	(evil-define-key 'normal helm-gtags-mode-map (kbd "C-c g a")
	  'helm-gtags-tags-in-this-function)
	(evil-define-key 'normal helm-gtags-mode-map (kbd "C-j")
	  'helm-gtags-select)
	(evil-define-key 'normal helm-gtags-mode-map (kbd "M-.")
	  'helm-gtags-dwim)
	(evil-define-key 'normal helm-gtags-mode-map (kbd "M-,")
	  'helm-gtags-pop-stack)
	(evil-define-key 'normal helm-gtags-mode-map (kbd "C-c <")
	  'helm-gtags-previous-history)
	(evil-define-key 'normal helm-gtags-mode-map (kbd "C-c >")
	  'helm-gtags-next-history)))
    (evil-define-key 'normal helm-gtags-mode-map (kbd "C-c g a")
      'helm-gtags-tags-in-this-function)
    (evil-define-key 'normal helm-gtags-mode-map (kbd "C-j")
      'helm-gtags-select)
    (evil-define-key 'normal helm-gtags-mode-map (kbd "M-.")
      'helm-gtags-dwim)
    (evil-define-key 'normal helm-gtags-mode-map (kbd "M-,")
      'helm-gtags-pop-stack)
    (evil-define-key 'normal helm-gtags-mode-map (kbd "C-c <")
      'helm-gtags-previous-history)
    (evil-define-key 'normal helm-gtags-mode-map (kbd "C-c >")
      'helm-gtags-next-history)))

;;; Helm extension for projectile
(use-package helm-projectile

M lisp/setup-keys.el => lisp/setup-keys.el +11 -11
@@ 12,16 12,16 @@
  :ensure t
  :init
  (progn
	(setq evil-want-C-u-scroll t))
    (setq evil-want-C-u-scroll t))
  :config
  (progn
	(require 'evil)
	(evil-define-key 'motion help-mode-map (kbd "<tab>") 'forward-button)
	(evil-define-key 'motion help-mode-map (kbd "S-<tab>") 'backward-button)
	(define-key evil-ex-map "b " 'helm-mini)
	(define-key evil-ex-map "e " 'helm-find-files)
	(add-hook 'with-editor-mode-hook 'evil-insert-state)
	(evil-mode 1)))
    (require 'evil)
    (evil-define-key 'motion help-mode-map (kbd "<tab>") 'forward-button)
    (evil-define-key 'motion help-mode-map (kbd "S-<tab>") 'backward-button)
    (define-key evil-ex-map "b " 'helm-mini)
    (define-key evil-ex-map "e " 'helm-find-files)
    (add-hook 'with-editor-mode-hook 'evil-insert-state)
    (evil-mode 1)))


;;; Easily surround text


@@ 30,7 30,7 @@
  :after evil
  :config
  (progn
	(global-evil-surround-mode 1)))
    (global-evil-surround-mode 1)))


;;; Evil keybindings for magit


@@ 44,9 44,9 @@
  :ensure t
  :after (evil org)
  :hook ((org-mode . evil-org-mode)
		 (evil-org-mode . evil-org-set-key-theme))
	 (evil-org-mode . evil-org-set-key-theme))
  :bind ((:map evil-org-mode-map
			   ("<ret>" . evil-org-return))))
	       ("<ret>" . evil-org-return))))


(provide 'setup-keys)

M lisp/setup-packages.el => lisp/setup-packages.el +2 -2
@@ 11,8 11,8 @@

;;; Add melpa archive
(let* ((no-ssl (and (memq system-type '(windows-nt ms-dos))
					(not (gnutls-available-p))))
	   (url (concat (if no-ssl "http" "https") "://melpa.org/packages/")))
		    (not (gnutls-available-p))))
       (url (concat (if no-ssl "http" "https") "://melpa.org/packages/")))
  (add-to-list 'package-archives (cons "melpa" url) t))

;;; Add org archive