semantic: make it possible to exclude stickyfunc
This commit is contained in:
parent
026964d3c5
commit
2c16d19ab7
|
@ -0,0 +1,23 @@
|
|||
;;; funcs.el --- Semantic Layer functions File for Spacemacs
|
||||
;;
|
||||
;; Copyright (c) 2012-2018 Sylvain Benner & Contributors
|
||||
;;
|
||||
;; Author: Sylvain Benner <sylvain.benner@gmail.com>
|
||||
;; URL: https://github.com/syl20bnr/spacemacs
|
||||
;;
|
||||
;; This file is not part of GNU Emacs.
|
||||
;;
|
||||
;;; License: GPLv3
|
||||
|
||||
(defun spacemacs/load-srefactor ()
|
||||
"Hook to load the `srefactor' library."
|
||||
(require 'srefactor)
|
||||
;; currently, evil-mode overrides key mapping of srefactor menu
|
||||
;; must expplicity enable evil-emacs-state. This is ok since
|
||||
;; srefactor supports j,k,/ and ? commands when Evil is
|
||||
;; available
|
||||
(add-hook 'srefactor-ui-menu-mode-hook 'evil-emacs-state))
|
||||
|
||||
(defun spacemacs/load-stickyfunc-enhance ()
|
||||
"Hook to load the `stickyfunc-enhance' library."
|
||||
(require 'stickyfunc-enhance))
|
|
@ -19,31 +19,15 @@
|
|||
(defun semantic/init-semantic ()
|
||||
(use-package semantic
|
||||
:defer t
|
||||
:config
|
||||
(progn
|
||||
(add-to-list 'semantic-default-submodes
|
||||
'global-semantic-stickyfunc-mode)
|
||||
(add-to-list 'semantic-default-submodes
|
||||
'global-semantic-idle-summary-mode))))
|
||||
:config (add-to-list 'semantic-default-submodes
|
||||
'global-semantic-idle-summary-mode)))
|
||||
|
||||
(defun semantic/init-srefactor ()
|
||||
(use-package srefactor
|
||||
:defer t
|
||||
:init
|
||||
(progn
|
||||
(defun spacemacs/lazy-load-srefactor ()
|
||||
"Lazy load the package."
|
||||
(require 'srefactor)
|
||||
;; currently, evil-mode overrides key mapping of srefactor menu
|
||||
;; must expplicity enable evil-emacs-state. This is ok since
|
||||
;; srefactor supports j,k,/ and ? commands when Evil is
|
||||
;; available
|
||||
(add-hook 'srefactor-ui-menu-mode-hook 'evil-emacs-state)))))
|
||||
(use-package srefactor :defer t))
|
||||
|
||||
(defun semantic/pre-init-stickyfunc-enhance ()
|
||||
(spacemacs|use-package-add-hook semantic
|
||||
:post-init (add-to-list 'semantic-default-submodes
|
||||
'global-semantic-stickyfunc-mode)))
|
||||
(defun semantic/init-stickyfunc-enhance ()
|
||||
(use-package stickyfunc-enhance
|
||||
:defer t
|
||||
:init
|
||||
(defun spacemacs/lazy-load-stickyfunc-enhance ()
|
||||
"Lazy load the package."
|
||||
(require 'stickyfunc-enhance))))
|
||||
(use-package stickyfunc-enhance :defer t))
|
||||
|
|
|
@ -262,10 +262,10 @@
|
|||
(defun c-c++/post-init-srefactor ()
|
||||
(dolist (mode c-c++-modes)
|
||||
(spacemacs/set-leader-keys-for-major-mode mode "r" 'srefactor-refactor-at-point))
|
||||
(spacemacs/add-to-hooks 'spacemacs/lazy-load-srefactor c-c++-mode-hooks))
|
||||
(spacemacs/add-to-hooks 'spacemacs/load-srefactor c-c++-mode-hooks))
|
||||
|
||||
(defun c-c++/post-init-stickyfunc-enhance ()
|
||||
(spacemacs/add-to-hooks 'spacemacs/lazy-load-stickyfunc-enhance c-c++-mode-hooks))
|
||||
(spacemacs/add-to-hooks 'spacemacs/load-stickyfunc-enhance c-c++-mode-hooks))
|
||||
|
||||
(defun c-c++/post-init-ycmd ()
|
||||
(spacemacs/add-to-hooks 'ycmd-mode c-c++-mode-hooks)
|
||||
|
|
|
@ -261,7 +261,7 @@
|
|||
(semantic-default-elisp-setup)))
|
||||
|
||||
(defun emacs-lisp/post-init-srefactor ()
|
||||
(add-hook 'emacs-lisp-mode-hook 'spacemacs/lazy-load-srefactor)
|
||||
(add-hook 'emacs-lisp-mode-hook 'spacemacs/load-srefactor)
|
||||
(use-package srefactor-lisp
|
||||
:commands (srefactor-lisp-format-buffer
|
||||
srefactor-lisp-format-defun
|
||||
|
|
|
@ -370,7 +370,7 @@ fix this issue."
|
|||
(call-interactively 'sp-backward-delete-char)))))
|
||||
|
||||
(defun python/post-init-stickyfunc-enhance ()
|
||||
(add-hook 'python-mode-hook 'spacemacs/lazy-load-stickyfunc-enhance))
|
||||
(add-hook 'python-mode-hook 'spacemacs/load-stickyfunc-enhance))
|
||||
|
||||
(defun python/pre-init-xcscope ()
|
||||
(spacemacs|use-package-add-hook xcscope
|
||||
|
|
Loading…
Reference in New Issue