conf-dev-utils.el 1.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445
  1. ;;; Code:
  2. (require 'skewer-mode)
  3. (require 'skewer-repl)
  4. (require 'editorconfig)
  5. (require 'paredit)
  6. (require 'envrc)
  7. ;; Base dev utils
  8. (editorconfig-mode t)
  9. (envrc-global-mode)
  10. ;; Skewer-mode
  11. (add-hook 'js2-mode-hook 'skewer-mode)
  12. (add-hook 'css-mode-hook 'skewer-css-mode)
  13. (add-hook 'html-mode-hook 'skewer-html-mode)
  14. (with-eval-after-load 'paredit
  15. (define-key paredit-mode-map (kbd "M-<up>") nil)
  16. (define-key paredit-mode-map (kbd "M-<down>") nil))
  17. ;; Functions
  18. (defun distopico:skewer-start ()
  19. (interactive)
  20. (let ((httpd-port 8023))
  21. (httpd-start)
  22. (message "Ready to skewer the browser. Now jack in with the bookmarklet.")))
  23. (defun distopico:skewer-demo ()
  24. (interactive)
  25. (let ((httpd-port 8024))
  26. (run-skewer)
  27. (skewer-repl)))
  28. (defun distopico:restclient-mode-hook ()
  29. "Hooks for setup `restclient-mode'."
  30. (add-to-list (make-local-variable 'company-backends) 'company-restclient))
  31. ;; Hooks
  32. (add-hook 'restclient-mode-hook #'distopico:restclient-mode-hook)
  33. (provide 'conf-dev-utils)
  34. ;;; conf-dev-utils.el ends here