Update semantic config

- simplify modes
- inhibit outside cc and java modes
- bind M-. to semantic-ia-fast-jump in cc-mode
This commit is contained in:
Adam Goldsmith 2017-04-21 15:48:02 -04:00
parent 9ff3263104
commit 73ecbcd2c3
1 changed files with 17 additions and 8 deletions

View File

@ -115,15 +115,24 @@
(use-package semantic
:defer
:init
(add-hook 'c-mode-hook (lambda ()
(semantic-mode 1)))
(add-hook 'c-mode-hook 'semantic-mode)
:config
(global-semantic-decoration-mode 1)
(global-semantic-highlight-func-mode 1)
(global-semantic-show-unmatched-syntax-mode 1)
(global-semantic-idle-summary-mode 1)
(global-semantic-stickyfunc-mode 1)
(setq semantic-idle-scheduler-idle-time 0.1))
(setq semantic-default-submodes '(global-semantic-idle-scheduler-mode
global-semanticdb-minor-mode
global-semantic-decoration-mode
global-semantic-highlight-func-mode
global-semantic-show-unmatched-syntax-mode
global-semantic-idle-summary-mode
global-semantic-stickyfunc-mode
global-semantic-idle-local-symbol-highlight-mode)
semantic-idle-scheduler-idle-time 0.2)
; inhibit semantic outside of specific modes
(add-to-list 'semantic-inhibit-functions
#'(lambda () (not (member major-mode '(cc-mode java-mode)))))
(eval-after-load "cc-mode"
'(define-key c-mode-map (kbd "M-.") 'semantic-ia-fast-jump)))
(use-package term
:config