2016-05-14 16:28:57 +00:00
|
|
|
;;; packages.el --- Spacemacs Misc. Layer packages File
|
|
|
|
;;
|
2021-03-22 20:11:29 +00:00
|
|
|
;; Copyright (c) 2012-2021 Sylvain Benner & Contributors
|
2016-05-14 16:28:57 +00:00
|
|
|
;;
|
|
|
|
;; Author: Sylvain Benner <sylvain.benner@gmail.com>
|
|
|
|
;; URL: https://github.com/syl20bnr/spacemacs
|
|
|
|
;;
|
|
|
|
;; This file is not part of GNU Emacs.
|
|
|
|
;;
|
2021-03-24 03:31:44 +00:00
|
|
|
;; 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/>.
|
|
|
|
|
2016-05-14 16:28:57 +00:00
|
|
|
|
|
|
|
(setq spacemacs-misc-packages
|
|
|
|
'(
|
2021-06-03 08:01:05 +00:00
|
|
|
(devdocs :location local
|
|
|
|
:toggle (version< emacs-version "27.1"))
|
|
|
|
(devdocs :toggle (not (version< emacs-version "27.1")))
|
2016-08-13 13:43:37 +00:00
|
|
|
dumb-jump
|
2020-12-13 22:16:02 +00:00
|
|
|
request))
|
|
|
|
|
2016-05-14 16:28:57 +00:00
|
|
|
|
2016-08-13 13:43:37 +00:00
|
|
|
(defun spacemacs-misc/init-dumb-jump ()
|
|
|
|
(use-package dumb-jump
|
2018-03-04 04:37:53 +00:00
|
|
|
:defer t
|
2016-08-13 13:43:37 +00:00
|
|
|
:init
|
|
|
|
(progn
|
2016-12-17 22:46:16 +00:00
|
|
|
;; Use Helm or Ivy as the selector for dumb-jump.
|
|
|
|
(cond
|
2017-07-02 13:48:06 +00:00
|
|
|
((configuration-layer/layer-used-p 'ivy)
|
2016-12-17 22:46:16 +00:00
|
|
|
(setq dumb-jump-selector 'ivy))
|
2017-07-02 13:48:06 +00:00
|
|
|
((configuration-layer/layer-used-p 'helm)
|
2016-12-17 22:46:16 +00:00
|
|
|
(setq dumb-jump-selector 'helm)))
|
|
|
|
|
2020-12-13 22:16:02 +00:00
|
|
|
;; 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))))
|
2016-08-13 13:43:37 +00:00
|
|
|
|
2016-05-14 16:28:57 +00:00
|
|
|
(defun spacemacs-misc/init-request ()
|
|
|
|
(setq request-storage-directory
|
|
|
|
(concat spacemacs-cache-directory "request/")))
|
2019-01-29 05:38:06 +00:00
|
|
|
|
|
|
|
(defun spacemacs-misc/init-devdocs ()
|
|
|
|
(use-package devdocs
|
|
|
|
:defer t
|
|
|
|
:init
|
|
|
|
(progn
|
|
|
|
(defalias 'spacemacs/browse-docs-online-at-point 'devdocs-search)
|
2020-04-14 16:32:25 +00:00
|
|
|
(spacemacs/set-leader-keys "hbd" #'spacemacs/browse-docs-online-at-point))))
|