diff --git a/.gitignore b/.gitignore index d4363db..0e415e3 100644 --- a/.gitignore +++ b/.gitignore @@ -29,6 +29,8 @@ helm-adaptive-history /smex-save-file /recentf +*/emacs.d/irony/* + # nvim specific plugged bundle/** @@ -36,16 +38,17 @@ autoload/ npm-debug.log -dotfiles/config/configstore/update-notifier-nodemon.json +/dotfiles/config/configstore/update-notifier-nodemon.json -dotfiles/config/yarn +/dotfiles/config/yarn -dotfiles/emacs.d/network-security.data +/dotfiles/emacs.d/network-security.data -dotfiles/emacs.d/recentf +/dotfiles/emacs.d/recentf # Wireshark temporary files -dotfiles/config/wireshark/recent -dotfiles/config/wireshark/dfilters -dotfiles/config/wireshark/recent_common +*/dotfiles/config/wireshark/recent +*/dotfiles/config/wireshark/dfilters +*/dotfiles/config/wireshark/recent_common + diff --git a/README.md b/README.md index 8feed5c..44b9f1b 100644 --- a/README.md +++ b/README.md @@ -14,3 +14,10 @@ The directory structure is as follows: 5. *scripts/diagnostics/* - This directory contains scripts for helping to diagnose problems 3. *installation_instructions* - This file contains a series of command you copy and paste during install of Arch 4. *nix/* - This contains all the stuff needed to get up and running with my nix configuration + +## Emacs Specific Things + +Before programming C, install `global` and `libclang` in your distro. After doing that, run `M-x irony-install-server` to install the server in the emacs directory. +Finally, `cd` to the root of your project and run `gtags`. You now have functioning irony C completion. + +Before programming Java, install `eclim`, and `eclipse`. diff --git a/dotfiles/emacs.d/init.el b/dotfiles/emacs.d/init.el index ef6a3a9..9e2ef7c 100644 --- a/dotfiles/emacs.d/init.el +++ b/dotfiles/emacs.d/init.el @@ -363,6 +363,15 @@ setq org-log-done t) (setq-default c-basic-offset 4) ;; NASA Style Guide says 4 spaces is optimal (setq-default c-default-style "linux") ;; Use Linux code style +(add-hook 'c-mode-hook 'irony-mode) + +;; Backend for Company +(defun my-c-mode-hook () + (eval-after-load 'company + '(add-to-list 'company-backends 'company-irony))) + +(add-hook 'c-mode-hook 'my-c-mode-hook) + ;;-------------------------------------------------------------------------------------- ;; Java Mode Setup ;;------------------------------------------------------------------------------------- diff --git a/dotfiles/emacs.d/package.el b/dotfiles/emacs.d/package.el index 4c960ee..f5b5b29 100644 --- a/dotfiles/emacs.d/package.el +++ b/dotfiles/emacs.d/package.el @@ -3,6 +3,7 @@ (defvar my-packages '(ag ;; Completion Frameworks company + company-irony eclim irony counsel @@ -58,3 +59,9 @@ (dolist (p my-packages) (when (not (package-installed-p p)) (package-install p)))) + + + + + +