Created
October 25, 2015 11:57
-
-
Save guweigang/bbca1f2dbeb74c421ebd to your computer and use it in GitHub Desktop.
This file contains 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
;; cedet | |
;;(setq integrated-cedet-p (and (>= emacs-major-version 24) | |
;; (>= emacs-minor-version 4))) | |
;;(if integrated-cedet-p | |
;; (progn | |
;; (load-file "~/.emacs.d/cedet/cedet-devel-load.el") | |
;; ;; if you want to enable support for gnu global | |
;; (when (cedet-gnu-global-version-check) | |
;; (semanticdb-enable-gnu-global-databases 'c-mode) | |
;; (semanticdb-enable-gnu-global-databases 'c++-mode)))) | |
(load-file "~/.emacs.d/cedet/cedet-devel-load.el") | |
;; if you want to enable support for gnu global | |
(semanticdb-enable-gnu-global-databases 'c-mode) | |
(semanticdb-enable-gnu-global-databases 'c++-mode) | |
(semantic-mode 1) | |
(if (boundp 'cedet-info-dir) | |
(add-to-list 'Info-default-directory-list cedet-info-dir)) | |
(if (boundp 'cedet-lib) | |
(load-file cedet-lib)) | |
(if (boundp 'semantic-load-enable-excessive-code-helpers) | |
;; add-on cedet | |
(progn | |
(semantic-load-enable-excessive-code-helpers) | |
;; @TODO should already be enabled by previous line | |
(global-semantic-idle-completions-mode) | |
(global-semantic-tag-folding-mode)) | |
;; integrated cedet | |
(setq semantic-default-submodes | |
'(global-semanticdb-minor-mode | |
global-semantic-idle-scheduler-mode | |
global-semantic-idle-summary-mode | |
global-semantic-idle-completions-mode | |
global-semantic-decoration-mode | |
global-semantic-highlight-func-mode | |
global-semantic-stickyfunc-mode))) | |
(if (boundp 'semantic-ia) (require 'semantic-ia)) | |
(if (boundp 'semantic-gcc) (require 'semantic-gcc)) | |
(semantic-add-system-include "~/github/cphalcon/ext/" 'c-mode) | |
(semantic-add-system-include "~/github/php-5.4.24/" 'c-mode) | |
(require 'semantic) | |
(global-semanticdb-minor-mode 1) | |
(global-ede-mode 'nil) | |
(global-semanticdb-minor-mode 1) | |
(defun my-cedet-hook () | |
(local-set-key [(control return)] 'semantic-ia-complete-symbol) | |
(local-set-key "\C-c?" 'semantic-ia-complete-symbol-menu) | |
(local-set-key "\C-c>" 'semantic-complete-analyze-inline) | |
(local-set-key "\C-c=" 'semantic-decoration-include-visit) | |
(local-set-key "\C-cj" 'semantic-ia-fast-jump) | |
(local-set-key "\C-cq" 'semantic-ia-show-doc) | |
(local-set-key "\C-cs" 'semantic-ia-show-summary) | |
(local-set-key "\C-cp" 'semantic-analyze-proto-impl-toggle) | |
(local-set-key "\C-c+" 'semantic-tag-folding-show-block) | |
(local-set-key "\C-c-" 'semantic-tag-folding-fold-block) | |
(local-set-key "\C-c\C-c+" 'semantic-tag-folding-show-all) | |
(local-set-key "\C-c\C-c-" 'semantic-tag-folding-fold-all)) | |
(add-hook 'c-mode-common-hook 'my-cedet-hook) | |
;; enable ctags for some languages: | |
;; Unix Shell, Perl, Pascal, Tcl, Fortran, Asm | |
;;(when (cedet-ectag-version-check) | |
;; (semantic-load-enable-primary-exuberent-ctags-support)) | |
;; ecb | |
(add-to-list 'load-path "~/.emacs.d/ecb") | |
(require 'ecb) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment