Last active
          December 12, 2015 07:49 
        
      - 
      
 - 
        
Save Sarcasm/4739896 to your computer and use it in GitHub Desktop.  
    Irony mode test configuration
  
        
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
  | ;; ----------------- 8< ----- BEGIN EDIT ZONE ----------------- | |
| ;; auto-complete path | |
| ;; if you use el-get it should look like this: | |
| (add-to-list 'load-path "/home/USERNAME/.emacs.d/el-get/auto-complete/") | |
| (add-to-list 'load-path "/home/USERNAME/.emacs.d/el-get/popup/") | |
| ;; OR with my fork of auto-complete or an older version of auto-complete | |
| ;; (add-to-list 'load-path "/path/to/my/fork/of/auto-complete/") | |
| ;; yasnippet path (assuming el-get) | |
| (add-to-list 'load-path "/home/USERNAME/.emacs.d/el-get/yasnippet/") | |
| ;; irony path | |
| (add-to-list 'load-path "/home/USERNAME/whatever/irony-mode/elisp/") | |
| ;; NOTE: You can take a look in /tmp/ for the log file to check | |
| ;; errors: /tmp/ironyXXX.log | |
| ;; The Clang installation missed the system include directory | |
| ;; "/usr/lib/clang/3.2/include/" | |
| (when (file-exists-p "/usr/lib/clang/3.2/include/") | |
| (setq irony-libclang-additional-flags | |
| '("-isystem" "/usr/lib/clang/3.2/include/"))) | |
| ;; ----------------- 8< ----- END EDIT ZONE ----------------- | |
| ;; simple config to test irony ac plugin | |
| (setq-default inhibit-startup-screen t) | |
| (global-auto-revert-mode t) | |
| (setq debug-on-error t) | |
| (require 'auto-complete) | |
| (require 'yasnippet) | |
| (require 'irony) | |
| (irony-enable 'ac) | |
| ;; it's in the process of being rewritten but it should work out of | |
| ;; the box with CMake hopefully | |
| (irony-enable 'compilation-db) | |
| (setq-default ac-sources nil) ;get rid of the other ac-sources for testing | |
| (defun sarcasm-enable-ac-and-yas () | |
| ;; if not set before (auto-complete-mode 1), overlays persist after | |
| ;; an expansion | |
| (yas/minor-mode-on) | |
| (auto-complete-mode 1)) | |
| (add-hook 'c++-mode-hook 'sarcasm-enable-ac-and-yas) | |
| (add-hook 'c++-mode-hook 'irony-mode) | |
| (add-hook 'c-mode-hook 'sarcasm-enable-ac-and-yas) | |
| (add-hook 'c-mode-hook 'irony-mode) | 
  
    Sign up for free
    to join this conversation on GitHub.
    Already have an account?
    Sign in to comment