diff --git a/layers/+lang/python/README.org b/layers/+lang/python/README.org index d4d896ec7..2b0493ea4 100644 --- a/layers/+lang/python/README.org +++ b/layers/+lang/python/README.org @@ -11,6 +11,7 @@ - [[#anaconda-dependencies][Anaconda dependencies]] - [[#automatic-buffer-formatting-on-save][Automatic buffer formatting on save]] - [[#autoflake][autoflake]] + - [[#pylookup][pylookup]] - [[#key-bindings][Key Bindings]] - [[#inferior-repl-process][Inferior REPL process]] - [[#running-python-script-in-shell][Running Python Script in shell]] @@ -19,7 +20,6 @@ - [[#other-python-commands][Other Python commands]] * Description - This layer adds support for the Python language. ** Features: @@ -42,7 +42,6 @@ To use this contribution add it to your =~/.spacemacs= #+END_SRC ** Test runner - Both =nose= and =pytest= are supported. By default =nose= is used. To choose your test runner set the layer variable =python-test-runner= to either =nose= or =pytest=. @@ -75,7 +74,6 @@ setting your ~PYTHONPATH~ as explained at https://github.com/proofit404/anaconda-mode#pythonpath ** Automatic buffer formatting on save - To enable automatic buffer formatting on save with [[https://github.com/google/yapf][YAPF]] set the variable =python-enable-yapf-format-on-save= to =t=. @@ -91,6 +89,10 @@ To be able to suppress unused imports easily, install [[https://github.com/myint pip install autoflake #+END_SRC +** pylookup +To use =pylookup= on ~SPC m h H~, make sure you update the database first, using +~SPC : pylookup-update~. + * Key Bindings ** Inferior REPL process diff --git a/layers/+lang/python/extensions.el b/layers/+lang/python/extensions.el index dcd2e1283..d907fd9db 100644 --- a/layers/+lang/python/extensions.el +++ b/layers/+lang/python/extensions.el @@ -54,7 +54,7 @@ (defun python/init-pylookup () (use-package pylookup - :commands pylookup-lookup + :commands (pylookup-lookup pylookup-update pylookup-update-all) :init (progn (evilify pylookup-mode pylookup-mode-map) @@ -62,10 +62,10 @@ "mhH" 'pylookup-lookup)) :config (progn - (let ((dir (configuration-layer/get-layer-property 'python))) - (setq pylookup-dir (concat dir "/pylookup") - pylookup-program (concat pylookup-dir "/pylookup.py") - pylookup-db-file (concat pylookup-dir "/pylookup.db")))))) + (let ((dir (configuration-layer/get-layer-local-dir 'python))) + (setq pylookup-dir (concat dir "pylookup/") + pylookup-program (concat pylookup-dir "pylookup.py") + pylookup-db-file (concat pylookup-dir "pylookup.db")))))) (defun python/init-py-yapf () (use-package py-yapf diff --git a/layers/+lang/python/local/pylookup/pylookup.py b/layers/+lang/python/local/pylookup/pylookup.py old mode 100644 new mode 100755