2016-03-23 14:17:46 +00:00
|
|
|
;;; packages.el --- restclient Layer Packages File
|
|
|
|
;;
|
2021-03-22 20:11:29 +00:00
|
|
|
;; Copyright (c) 2012-2021 Sylvain Benner & Contributors
|
2016-03-23 14:17:46 +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/>.
|
|
|
|
|
2015-04-19 03:40:24 +00:00
|
|
|
(setq restclient-packages
|
2016-06-08 14:06:02 +00:00
|
|
|
'(
|
2017-07-03 07:52:54 +00:00
|
|
|
(company-restclient :requires company)
|
2016-06-11 00:52:47 +00:00
|
|
|
golden-ratio
|
2016-06-08 14:06:02 +00:00
|
|
|
ob-http
|
2016-11-07 15:00:07 +00:00
|
|
|
ob-restclient
|
2016-06-08 14:06:02 +00:00
|
|
|
restclient
|
2017-07-03 07:52:54 +00:00
|
|
|
(restclient-helm :requires helm)
|
2016-06-08 14:06:02 +00:00
|
|
|
))
|
|
|
|
|
|
|
|
(defun restclient/pre-init-golden-ratio ()
|
|
|
|
(spacemacs|use-package-add-hook golden-ratio
|
|
|
|
:post-config (add-to-list 'golden-ratio-exclude-modes "restclient-mode")))
|
2016-03-23 14:17:46 +00:00
|
|
|
|
2018-01-11 04:57:18 +00:00
|
|
|
(defun restclient/pre-init-ob-http ()
|
2016-04-03 04:35:15 +00:00
|
|
|
(spacemacs|use-package-add-hook org
|
|
|
|
:post-config
|
|
|
|
(use-package ob-http
|
2016-04-04 14:57:25 +00:00
|
|
|
:init (add-to-list 'org-babel-load-languages '(http . t)))))
|
2014-11-27 19:59:24 +00:00
|
|
|
|
2018-01-11 04:57:18 +00:00
|
|
|
(defun restclient/init-ob-http ()
|
|
|
|
(when restclient-use-org
|
|
|
|
(add-to-list 'auto-mode-alist '("\\.http\\'" . org-mode))))
|
|
|
|
|
|
|
|
(defun restclient/pre-init-ob-restclient ()
|
2016-11-07 15:00:07 +00:00
|
|
|
(spacemacs|use-package-add-hook org
|
|
|
|
:post-config
|
|
|
|
(use-package ob-restclient
|
|
|
|
:init (add-to-list 'org-babel-load-languages '(restclient . t)))))
|
2018-01-11 04:57:18 +00:00
|
|
|
(defun restclient/init-ob-restclient ())
|
2016-11-07 15:00:07 +00:00
|
|
|
|
2014-11-27 19:59:24 +00:00
|
|
|
(defun restclient/init-restclient ()
|
|
|
|
(use-package restclient
|
2018-03-04 04:37:53 +00:00
|
|
|
:defer t
|
2016-03-23 21:11:55 +00:00
|
|
|
:init
|
|
|
|
(progn
|
|
|
|
(unless restclient-use-org
|
|
|
|
(add-to-list 'auto-mode-alist '("\\.http\\'" . restclient-mode)))
|
|
|
|
(spacemacs/set-leader-keys-for-major-mode 'restclient-mode
|
2016-06-13 20:43:38 +00:00
|
|
|
"n" 'restclient-jump-next
|
|
|
|
"p" 'restclient-jump-prev
|
2016-03-23 21:11:55 +00:00
|
|
|
"s" 'restclient-http-send-current-stay-in-window
|
|
|
|
"S" 'restclient-http-send-current
|
2016-12-16 13:56:44 +00:00
|
|
|
"r" 'spacemacs/restclient-http-send-current-raw-stay-in-window
|
2016-03-23 21:11:55 +00:00
|
|
|
"R" 'restclient-http-send-current-raw
|
2016-11-07 14:40:04 +00:00
|
|
|
"y" 'restclient-copy-curl-command))))
|
2016-06-13 20:47:14 +00:00
|
|
|
|
|
|
|
(defun restclient/init-company-restclient ()
|
|
|
|
(use-package company-restclient
|
2018-03-04 04:37:53 +00:00
|
|
|
:defer t
|
2017-01-02 05:39:04 +00:00
|
|
|
:init (spacemacs|add-company-backends
|
|
|
|
:backends company-restclient
|
|
|
|
:modes restclient-mode)))
|
2016-06-13 20:45:55 +00:00
|
|
|
|
|
|
|
(defun restclient/init-restclient-helm ()
|
|
|
|
(use-package restclient-helm
|
2018-03-04 04:37:53 +00:00
|
|
|
:defer t
|
2016-12-16 13:56:44 +00:00
|
|
|
:init (spacemacs/set-leader-keys-for-major-mode 'restclient-mode
|
2019-07-24 05:31:59 +00:00
|
|
|
"j" 'helm-restclient)))
|