r/spacemacs • u/NequoFrost • Dec 20 '18
Trying to get python layer working
I'm trying to get the python layer to work on spacemacs. I have activated the python and autocompletion layers. I have also tried adding several settings including setting the backend to anaconda and installing jedi, however I cannot get autocomplete nor documentation help (, h h) to work. Could anyone point me in the right direction for this? I have tried the auto-completion layer and python layer documentation but cant seem to figure out what I'm doing wrong..
1
u/detvardet Dec 20 '18
For develop branch of Spacemacs:
python-language-server is a little buggy these days so I use anaconda now.
In .spacemacs layers:
(auto-completion :variables auto-completion-enable-snippets-in-popup nil auto-completion-enable-help-tooltip t auto-completion-enable-sort-by-usage t)
(python :variables
python-backend 'anaconda
python-fill-column 99
python-enable-yapf-format-on-save t
python-auto-set-local-pyvenv-virtualenv 'on-visit)
Create a new project:
mkdir myproject && cd myproject
pipenv --python 3.7
Install dependencies:
pipenv install autoflake flake8 epc importmagic yapf
1
u/[deleted] Dec 20 '18
Have you pip installed the python language server?