ebe4c60264
This reverts commit 29c78ce841
and all other fixes
that have been made afterwards.
The motivation is that use-package is seen by many as a replacement for
`require`. Is use-package always defer the loading of packages then is breaks
this use case, this does not respect POLA so even if it was making Spacemacs
loading faster (up to 3s faster on some startup on my machine) we just cannot
use it, it would be irresponsible. Spacemacs should be easy to use, loading
performance will come with time but it is not a priority.
62 lines
2.1 KiB
EmacsLisp
62 lines
2.1 KiB
EmacsLisp
;;; packages.el --- Django Layer packages File for Spacemacs
|
|
;;
|
|
;; Copyright (c) 2012-2018 Sylvain Benner & Contributors
|
|
;;
|
|
;; Author: Sylvain Benner <sylvain.benner@gmail.com>
|
|
;; URL: https://github.com/syl20bnr/spacemacs
|
|
;;
|
|
;; This file is not part of GNU Emacs.
|
|
;;
|
|
;;; License: GPLv3
|
|
|
|
(setq django-packages
|
|
'(
|
|
pony-mode
|
|
))
|
|
|
|
(defun django/init-pony-mode ()
|
|
(use-package pony-mode
|
|
:defer t
|
|
:init (progn
|
|
(spacemacs/declare-prefix-for-mode 'python-mode "mj" "django")
|
|
(spacemacs/declare-prefix-for-mode 'python-mode "mja" "fabric")
|
|
(spacemacs/declare-prefix-for-mode 'python-mode "mjf" "files")
|
|
(spacemacs/declare-prefix-for-mode 'python-mode "mji" "interactive")
|
|
(spacemacs/declare-prefix-for-mode 'python-mode "mjr" "runserver")
|
|
(spacemacs/declare-prefix-for-mode 'python-mode "mjs" "south/syncdb")
|
|
(spacemacs/declare-prefix-for-mode 'python-mode "mjt" "test")
|
|
|
|
(spacemacs/set-leader-keys-for-major-mode 'python-mode
|
|
"jaf" 'pony-fabric
|
|
"jad" 'pony-fabric-deploy
|
|
|
|
"jfs" 'pony-goto-settings
|
|
"jfc" 'pony-setting
|
|
"jft" 'pony-goto-template
|
|
"jfr" 'pony-resolve
|
|
|
|
"jid" 'pony-db-shell
|
|
"jis" 'pony-shell
|
|
|
|
; not including one-off management commands like "flush" and
|
|
; "startapp" even though they're implemented in pony-mode,
|
|
; because this is much handier
|
|
"jm" 'pony-manage
|
|
|
|
"jrd" 'pony-stopserver
|
|
"jro" 'pony-browser
|
|
"jrr" 'pony-restart-server
|
|
"jru" 'pony-runserver
|
|
"jrt" 'pony-temp-server
|
|
|
|
"jsc" 'pony-south-convert
|
|
"jsh" 'pony-south-schemamigration
|
|
"jsi" 'pony-south-initial
|
|
"jsm" 'pony-south-migrate
|
|
"jss" 'pony-syncdb
|
|
|
|
"jtd" 'pony-test-down
|
|
"jte" 'pony-test-goto-err
|
|
"jto" 'pony-test-open
|
|
"jtt" 'pony-test
|
|
"jtu" 'pony-test-up))))
|