You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 

1.4 KiB

Dev - REST

Package

Define REST dev package.

  (use-package emacs
    :after uno-dev
    :config
    (provide 'uno-dev-rest))

Restclient

  (use-package restclient
    :after uno-dev-rest
    :general
    (uno-mode-leader-define
      :keymaps 'restclient-mode-map
      "n" '(restclient-jump-next :which-key "Next")
      "p" '(restclient-jump-prev :which-key "Previous")
      "s" '(restclient-http-send-current-stay-in-window :which-key "Send")
      "S" '(restclient-http-send-current :which-key "Send and focus")
      "r" '(uno/dev/rest/raw-no-focus :which-key "Send raw")
      "R" '(restclient-http-send-current-raw :which-key "Send raw and focus")
      "y" '(restclient-copy-curl-command :which-key "Copy curl command"))
    :init
    (defun uno/dev/rest/raw-no-focus ()
      "Send HTTP request raw for restclient without losing focus."
      (interactive)
      (restclient-http-send-current t t))
    (push '("\\.http\\'" . restclient-mode) auto-mode-alist))

  (use-package company-restclient
    :after (uno-dev-rest restclient)
    :config
    (add-to-list 'company-backends 'company-restclient))

  (use-package ob-restclient
    :after (uno-dev-rest org restclient)
    :config
    (org-babel-do-load-languages 'org-babel-load-languages '((restclient . t))))