This repository has been archived on 2024-10-22. You can view files and clone it, but cannot push or open issues or pull requests.
spacemacs/layers/+spacemacs/spacemacs-misc/packages.el
Lucius Hu 7740fea4e1 dumb-jump: Replace obsolete interface with xref-backend
- Add `dumb-jump-xref-activate` hook to `xref-backend-functions`, which
  add a fallback option, i.e. `dumb-jump`, when no better alternatives
  is availabe
- Removed the obsolte interface `dumb-jump-go` from the following layers:
  - clojure
  - latex
  - vue
- The global binding `SPC j q` requires the obsolte function
  `dumb-jump-quick-look` and is therfore removed
2021-03-31 18:50:44 +02:00

57 lines
1.9 KiB
EmacsLisp

;;; packages.el --- Spacemacs Misc. Layer packages File
;;
;; Copyright (c) 2012-2021 Sylvain Benner & Contributors
;;
;; Author: Sylvain Benner <sylvain.benner@gmail.com>
;; URL: https://github.com/syl20bnr/spacemacs
;;
;; This file is not part of GNU Emacs.
;;
;; This program is free software; you can redistribute it and/or modify
;; it under the terms of the GNU General Public License as published by
;; the Free Software Foundation, either version 3 of the License, or
;; (at your option) any later version.
;;
;; This program is distributed in the hope that it will be useful,
;; but WITHOUT ANY WARRANTY; without even the implied warranty of
;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
;; GNU General Public License for more details.
;;
;; You should have received a copy of the GNU General Public License
;; along with this program. If not, see <http://www.gnu.org/licenses/>.
(setq spacemacs-misc-packages
'(
devdocs
dumb-jump
request))
(defun spacemacs-misc/init-dumb-jump ()
(use-package dumb-jump
:defer t
:init
(progn
;; Use Helm or Ivy as the selector for dumb-jump.
(cond
((configuration-layer/layer-used-p 'ivy)
(setq dumb-jump-selector 'ivy))
((configuration-layer/layer-used-p 'helm)
(setq dumb-jump-selector 'helm)))
;; Enable xref-backend of dumb-jump. It's chosen only when no better
;; options is available
(add-hook 'xref-backend-functions #'dumb-jump-xref-activate))))
(defun spacemacs-misc/init-request ()
(setq request-storage-directory
(concat spacemacs-cache-directory "request/")))
(defun spacemacs-misc/init-devdocs ()
(use-package devdocs
:defer t
:init
(progn
(defalias 'spacemacs/browse-docs-online-at-point 'devdocs-search)
(spacemacs/set-leader-keys "hbd" #'spacemacs/browse-docs-online-at-point))))