Browse Source

Clean up files, fix CC-mode, add eclim to java mode

Taylor Bockman 7 years ago
parent
commit
1cee697048
  1. 44
      dotfiles/emacs.d/init.el
  2. 68
      dotfiles/emacs.d/package.el

44
dotfiles/emacs.d/init.el

@ -49,7 +49,7 @@
(setq Inhibit-Splash-Screen t) (setq Inhibit-Splash-Screen t)
;;-------------------------------------------------------------------------------------- ;;--------------------------------------------------------------------------------------
;; Prefer Utf-8 For Buffers ;; Prefer UTF-8 For Buffers
;;-------------------------------------------------------------------------------------- ;;--------------------------------------------------------------------------------------
(prefer-coding-system 'utf-8) (prefer-coding-system 'utf-8)
@ -241,17 +241,6 @@ setq org-log-done t)
(require 'expand-region) (require 'expand-region)
(pending-delete-mode t) ; Selected region contents are replaced on typing (pending-delete-mode t) ; Selected region contents are replaced on typing
;;--------------------------------------------------------------------------------------
;; CC-Mode Settings
;;-------------------------------------------------------------------------------------
;; Keep character limit to 80
(eval-after-load "c"
'(progn
(setq fci-rule-column 80)))
(setq-default c-basic-offset 4) ;; NASA Style Guide says 4 spaces is optimal
(setq-default c-default-style "linux") ;; Use Linux code style
;;-------------------------------------------------------------------------------------- ;;--------------------------------------------------------------------------------------
;; Line Numbering - Note: Might not look good with files with 10,000 or more lines ;; Line Numbering - Note: Might not look good with files with 10,000 or more lines
@ -320,6 +309,12 @@ setq org-log-done t)
(sh-set-shell "zsh")))) (sh-set-shell "zsh"))))
;;------------------------------------------------------------------------------------- ;;-------------------------------------------------------------------------------------
;; Enable and Configure `company-mode`
;;------------------------------------------------------------------------------------
(add-hook 'after-init-hook 'global-company-mode)
;;-------------------------------------------------------------------------------------
;; Alignment ;; Alignment
;;------------------------------------------------------------------------------------- ;;-------------------------------------------------------------------------------------
@ -374,6 +369,31 @@ setq org-log-done t)
(setq deactivate-mark nil)) (setq deactivate-mark nil))
(self-insert-command N))) (self-insert-command N)))
;;--------------------------------------------------------------------------------------
;; CC-Mode Settings
;;-------------------------------------------------------------------------------------
;; Keep character limit to 80
(eval-after-load "c-mode"
'(progn
(setq fci-rule-column 80)))
(setq-default c-basic-offset 4) ;; NASA Style Guide says 4 spaces is optimal
(setq-default c-default-style "linux") ;; Use Linux code style
;;--------------------------------------------------------------------------------------
;; Java Mode Setup
;;-------------------------------------------------------------------------------------
(defun my-java-mode-hook ()
(require 'eclim)
(eclim-mode t)
(require 'company-emacs-eclim)
(company-emacs-eclim-setup)
)
(add-hook 'java-mode-hook 'my-java-mode-hook)
;;------------------------------------------------------------------------------------- ;;-------------------------------------------------------------------------------------
;; Key Bindings ;; Key Bindings
;;------------------------------------------------------------------------------------- ;;-------------------------------------------------------------------------------------

68
dotfiles/emacs.d/package.el

@ -1,29 +1,49 @@
(require 'cl) (require 'cl)
(defvar my-packages '(ag auto-complete (defvar my-packages '(ag
cc-mode ;; Completion Frameworks
yaml-mode company
markdown-mode eclim
counsel irony
expand-region counsel
flycheck swiper
grizzl ;;;;;;;;;;;;;;;;;;;;;;;;
fill-column-indicator
feature-mode ;; Programming modes
flycheck-pos-tip cc-mode
gitignore-mode yaml-mode
golden-ratio markdown-mode
swiper gitignore-mode
linum-relative feature-mode
magit paredit
neotree magit
paredit ;;;;;;;;;;;;;;;;;;;;
smex
powerline ;; Navigation
projectile neotree
wrap-region ;;;;;;;;;;;;;
rainbow-delimiters
zenburn-theme) ;; UI
fill-column-indicator
golden-ratio
linum-relative
powerline
rainbow-delimiters
zenburn-theme
wrap-region
expand-region
wrap-region
;;;;;
;; Project Interaction/Search/Syntax
flycheck
flycheck-pos-tip
grizzl
smex
projectile
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
)
"Packages to make sure are installed") "Packages to make sure are installed")
(defun my-packages-installed-p () (defun my-packages-installed-p ()

Loading…
Cancel
Save