-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathinit.el.before_ecb_2.40__1
115 lines (89 loc) · 3.94 KB
/
init.el.before_ecb_2.40__1
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
(load-theme 'deeper-blue)
;;;;;;;;CEDET;;;;;;;;
;; minimial-cedet-config.el --- Working configuration for CEDET from bzr
;; Copyright (C) Alex Ott
;;
;; Author: Alex Ott <[email protected]>
;; Keywords: cedet, C++, Java
;; Requirements: CEDET from bzr (http://cedet.sourceforge.net/bzr-repo.shtml)
;; Do checkout of fresh CEDET, and use this config (don't forget to change path below)
(setq cedet-root-path (file-name-as-directory "~/.emacs.d/plugins/cedet-bzr/trunk/"))
(load-file (concat cedet-root-path "cedet-devel-load.el"))
(add-to-list 'load-path (concat cedet-root-path "contrib"))
;; select which submodes we want to activate
(add-to-list 'semantic-default-submodes 'global-semantic-mru-bookmark-mode)
(add-to-list 'semantic-default-submodes 'global-semanticdb-minor-mode)
(add-to-list 'semantic-default-submodes 'global-semantic-idle-scheduler-mode)
(add-to-list 'semantic-default-submodes 'global-semantic-idle-completions-mode)
(add-to-list 'semantic-default-submodes 'global-semantic-idle-summary-mode)
(add-to-list 'semantic-default-submodes 'global-semantic-stickyfunc-mode)
(add-to-list 'semantic-default-submodes 'global-cedet-m3-minor-mode)
(add-to-list 'semantic-default-submodes 'global-semantic-highlight-func-mode)
(add-to-list 'semantic-default-submodes 'global-semanticdb-minor-mode)
;; Activate semantic
(semantic-mode 1)
;; load contrib library
(require 'eassist)
;;NK: suppose to enable more advanced name copledtion functionality (haven't noticed a difference yet)
(require 'semantic/ia)
;;NK : suppose to include standard libraries when working with GCC compiler
(require 'semantic/bovine/gcc)
;;NK : how to add system files to look for
(semantic-add-system-include "/usr/lib" 'c++-mode)
;; customisation of modes
(defun alexott/cedet-hook ()
(local-set-key [(control return)] 'semantic-ia-complete-symbol-menu)
(local-set-key "\C-c?" 'semantic-ia-complete-symbol)
;;
(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)
)
(add-hook 'c-mode-common-hook 'alexott/cedet-hook)
(add-hook 'lisp-mode-hook 'alexott/cedet-hook)
(add-hook 'scheme-mode-hook 'alexott/cedet-hook)
(add-hook 'emacs-lisp-mode-hook 'alexott/cedet-hook)
(add-hook 'erlang-mode-hook 'alexott/cedet-hook)
(defun alexott/c-mode-cedet-hook ()
(local-set-key "\C-ct" 'eassist-switch-h-cpp)
(local-set-key "\C-xt" 'eassist-switch-h-cpp)
(local-set-key "\C-ce" 'eassist-list-methods)
(local-set-key "\C-c\C-r" 'semantic-symref)
)
(add-hook 'c-mode-common-hook 'alexott/c-mode-cedet-hook)
(semanticdb-enable-gnu-global-databases 'c-mode t)
(semanticdb-enable-gnu-global-databases 'c++-mode t)
(when (cedet-ectag-version-check t)
(semantic-load-enable-primary-ectags-support))
;; SRecode
(global-srecode-minor-mode 1)
;; EDE
(global-ede-mode 1)
(ede-enable-generic-projects)
;;; minimial-cedet-config.el ends here
;;;;;;;;CEDET end;;;;;;;;
;;;;;;;;ECB;;;;;;;;
;;http://stackoverflow.com/questions/3134026/emacs-23-2-with-ecb-2-40-file-error-cannot-open-load-file-semantic-ctxt
;;(require 'semantic/analyze)
;;(provide 'semantic-analyze)
;;(provide 'semantic-ctxt)
;;(provide 'semanticdb)
;;(provide 'semanticdb-find)
;;(provide 'semanticdb-mode)
;;(provide 'semantic-load)
(add-to-list 'load-path "~/.emacs.d/plugins/ecb-master/")
;;(require 'ecb)
;;If you want to load the complete ECB at (X)Emacs-loadtime
;;(Advantage: All ECB-options available after loading ECB. Disadvantage: Increasing loadtime2):
(require 'ecb)
;;;;;;;;ECB end;;;;;;;;
;;;;;;;;auto-complete;;;;;;;;
;;Enable default auto complete
(add-to-list 'load-path "~/.emacs.d/plugins/auto_complete/")
(require 'auto-complete-config)
(add-to-list 'ac-dictionary-directories "~/.emacs.d/plugins/auto_complete//ac-dict")
(ac-config-default)
;;;;;;;;auto-complete end;;;;;;;;