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. 52
      dotfiles/emacs.d/package.el

44
dotfiles/emacs.d/init.el

@ -49,7 +49,7 @@
(setq Inhibit-Splash-Screen t)
;;--------------------------------------------------------------------------------------
;; Prefer Utf-8 For Buffers
;; Prefer UTF-8 For Buffers
;;--------------------------------------------------------------------------------------
(prefer-coding-system 'utf-8)
@ -241,17 +241,6 @@ setq org-log-done t)
(require 'expand-region)
(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
@ -320,6 +309,12 @@ setq org-log-done t)
(sh-set-shell "zsh"))))
;;-------------------------------------------------------------------------------------
;; Enable and Configure `company-mode`
;;------------------------------------------------------------------------------------
(add-hook 'after-init-hook 'global-company-mode)
;;-------------------------------------------------------------------------------------
;; Alignment
;;-------------------------------------------------------------------------------------
@ -374,6 +369,31 @@ setq org-log-done t)
(setq deactivate-mark nil))
(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
;;-------------------------------------------------------------------------------------

52
dotfiles/emacs.d/package.el

@ -1,29 +1,49 @@
(require 'cl)
(defvar my-packages '(ag auto-complete
(defvar my-packages '(ag
;; Completion Frameworks
company
eclim
irony
counsel
swiper
;;;;;;;;;;;;;;;;;;;;;;;;
;; Programming modes
cc-mode
yaml-mode
markdown-mode
counsel
expand-region
flycheck
grizzl
fill-column-indicator
feature-mode
flycheck-pos-tip
gitignore-mode
golden-ratio
swiper
linum-relative
feature-mode
paredit
magit
;;;;;;;;;;;;;;;;;;;;
;; Navigation
neotree
paredit
smex
;;;;;;;;;;;;;
;; UI
fill-column-indicator
golden-ratio
linum-relative
powerline
projectile
wrap-region
rainbow-delimiters
zenburn-theme)
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")
(defun my-packages-installed-p ()

Loading…
Cancel
Save