Skip to content

Commit

Permalink
Fix invalid tag in lsp breadcrumbs by removing stickyfunc-enhance
Browse files Browse the repository at this point in the history
for its unmaintained for 9 years now and is causing
malfunctions in other packages.

Its features are superseded with lsp-breadcrumb mode
anyway so if this feature is missing please switch
to lsp.

See #14313
  • Loading branch information
smile13241324 committed Sep 3, 2024
1 parent edbd690 commit afa5326
Show file tree
Hide file tree
Showing 6 changed files with 16 additions and 53 deletions.
4 changes: 0 additions & 4 deletions layers/+emacs/semantic/README.org
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,6 @@ language, instead of plain text structure. Semantic is the core of CEDET.

** Features:
- Display function or variable definition at the bottom.
- Display current function cursor is in at the top. See
[[https://github.com/tuhdo/semantic-stickyfunc-enhance][this page]] for demos in some programming languages.
- Support common C/C++ refactoring with [[https://github.com/tuhdo/semantic-refactor][semantic-refactor]]. See
[[https://github.com/tuhdo/semantic-refactor/blob/master/srefactor-demos/demos.org][this page]] for demonstration of refactoring features.
- Support Lisp source code formatting with [[https://github.com/tuhdo/semantic-refactor][semantic-refactor]]. See
Expand All @@ -42,5 +40,3 @@ file.
| Key binding | Description |
|-------------+------------------------------------------|
| ~SPC m r~ | srefactor: refactor thing at point. |
| ~SPC T S~ | toggle =semantic-stickyfunc-mode= |
| ~SPC T C-S~ | toggle =global-semantic-stickyfunc-mode= |
4 changes: 0 additions & 4 deletions layers/+emacs/semantic/funcs.el
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,3 @@
;; 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 changes: 0 additions & 19 deletions layers/+emacs/semantic/packages.el
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,6 @@
'(
(semantic :location built-in)
srefactor
stickyfunc-enhance
))

(defun semantic/init-semantic ()
Expand All @@ -37,23 +36,5 @@
(defun semantic/init-srefactor ()
(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
(spacemacs|add-toggle semantic-stickyfunc
:mode semantic-stickyfunc-mode
:documentation "Enable semantic-stickyfunc."
:evil-leader "TS")
(spacemacs|add-toggle semantic-stickyfunc-globally
:mode global-semantic-stickyfunc-mode
:documentation "Enable semantic-stickyfunc globally."
:evil-leader "T C-S")))

(defun spacemacs//disable-semantic-idle-summary-mode ()
(semantic-idle-summary-mode 0))
2 changes: 0 additions & 2 deletions layers/+lang/c-c++/README.org
Original file line number Diff line number Diff line change
Expand Up @@ -70,8 +70,6 @@ This layer adds configuration for C/C++ language.
- [[https://www.doxygen.nl][Doxygen]] code documentation comment generation (using [[https://github.com/mp81ss/gendoxy][gendoxy]]).
- =semantic= layer integration:
- Function or variable definition at the bottom
- Current function cursor is at the top. See [[https://github.com/tuhdo/semantic-stickyfunc-enhance][stickyfunc-demos]] for
demos in some programming languages.
- Support common refactoring with [[https://github.com/tuhdo/semantic-refactor][semantic-refactor]]. See [[https://github.com/tuhdo/semantic-refactor/blob/master/srefactor-demos/demos.org][srefactor-demos]] for
demonstration of refactoring features.
- =cscope= layer integration:
Expand Down
22 changes: 9 additions & 13 deletions layers/+lang/c-c++/packages.el
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,6 @@
realgud
semantic
srefactor
stickyfunc-enhance
xcscope
;; lsp
(ccls :requires lsp-mode)
Expand All @@ -66,15 +65,15 @@
(use-package gendoxy
:defer t
:init (dolist (mode c-c++-modes)
(spacemacs/declare-prefix-for-mode mode "mi" "insert")
(spacemacs/set-leader-keys-for-major-mode mode
"ih" 'gendoxy-header
"id" 'gendoxy-tag
"iD" 'gendoxy-tag-header
"ig" 'gendoxy-group
"iG" 'gendoxy-group-header
"is" 'gendoxy-group-start
"ie" 'gendoxy-group-end))))
(spacemacs/declare-prefix-for-mode mode "mi" "insert")
(spacemacs/set-leader-keys-for-major-mode mode
"ih" 'gendoxy-header
"id" 'gendoxy-tag
"iD" 'gendoxy-tag-header
"ig" 'gendoxy-group
"iG" 'gendoxy-group-header
"is" 'gendoxy-group-start
"ie" 'gendoxy-group-end))))

(defun c-c++/init-cc-mode ()
(use-package cc-mode
Expand Down Expand Up @@ -246,9 +245,6 @@
(spacemacs/set-leader-keys-for-major-mode mode "r." 'srefactor-refactor-at-point))
(spacemacs/add-to-hooks 'spacemacs/load-srefactor c-c++-mode-hooks))

(defun c-c++/post-init-stickyfunc-enhance ()
(spacemacs/add-to-hooks 'spacemacs/load-stickyfunc-enhance c-c++-mode-hooks))

(defun c-c++/pre-init-xcscope ()
(spacemacs|use-package-add-hook xcscope
:post-init
Expand Down
18 changes: 7 additions & 11 deletions layers/+lang/python/packages.el
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,6 @@
semantic
sphinx-doc
smartparens
stickyfunc-enhance
xcscope
window-purpose
yapfify
Expand Down Expand Up @@ -99,10 +98,10 @@
:commands (code-cells-mode)
:init (add-hook 'python-mode-hook 'code-cells-mode)
:config (spacemacs/set-leader-keys-for-minor-mode 'code-cells-mode
"gB" 'code-cells-backward-cell
"gF" 'code-cells-forward-cell
"sc" 'code-cells-eval
"sa" 'code-cells-eval-above)))
"gB" 'code-cells-backward-cell
"gF" 'code-cells-forward-cell
"sc" 'code-cells-eval
"sa" 'code-cells-eval-above)))

(defun python/post-init-company ()
;; backend specific
Expand Down Expand Up @@ -429,16 +428,16 @@
;; the default in Emacs is M-r; C-r to search backward old output
;; and should not be changed
(define-key inferior-python-mode-map
(kbd "C-r") 'comint-history-isearch-backward)
(kbd "C-r") 'comint-history-isearch-backward)
;; this key binding is for recentering buffer in Emacs
;; it would be troublesome if Emacs user
;; Vim users can use this key since they have other key
(define-key inferior-python-mode-map
(kbd "C-l") 'spacemacs/comint-clear-buffer))
(kbd "C-l") 'spacemacs/comint-clear-buffer))

;; add this optional key binding for Emacs user, since it is unbound
(define-key inferior-python-mode-map
(kbd "C-c M-l") 'spacemacs/comint-clear-buffer)
(kbd "C-c M-l") 'spacemacs/comint-clear-buffer)

(setq spacemacs--python-shell-interpreter-origin
(eval (car (get 'python-shell-interpreter 'standard-value))))
Expand Down Expand Up @@ -479,9 +478,6 @@ fix this issue."
(defun python/post-init-smartparens ()
(add-hook 'inferior-python-mode-hook #'spacemacs//activate-smartparens))

(defun python/post-init-stickyfunc-enhance ()
(add-hook 'python-mode-hook 'spacemacs/load-stickyfunc-enhance))

(defun python/pre-init-xcscope ()
(spacemacs|use-package-add-hook xcscope
:post-init
Expand Down

0 comments on commit afa5326

Please sign in to comment.