Python Development in Spacemacs

preview_player
Показать описание
Post Editing Notes:

1. `spc spc` and then `workon` to find the command for switching virtualenvs. It's not clear in the video. Apologies for that.

2. the packages I install are flake8 isort yapf python-language-server

In this video I cover the absolute minimum setup for doing Python development in Spacemacs.

- I start off with a discussion of Python virtualenvs and how to get them set up correctly for Spacemacs.

- Then a discussion of code completion.

- Afterwards I show how to explore and fix issues found by a linter (flake8)

- And then go over how to run scripts from inside emacs.

- Finally I demonstrate a language server based completion backend.

#spacemacs #python #development
Рекомендации по теме
Комментарии
Автор

I absolutely love your videos! Looking forward to every single one

baaaaayesian
Автор

Thanks jack, love your content. Please make more videos on spacemacs, also please make a video for ipynb

earltan
Автор

nice and informative, hope you get dap working soon though on your main machine

ananon
Автор

dap-mode works for me out if the box in, like, 70% of time. But those other 30% are hell. It either won't work or simply crash in the middle.

Definitely needs more work :)

xXneorlinXx
Автор

It is so good, thank you very much!!!!

bemotic
Автор

Did you ever figure out how to get dap-mode going? Also, I think this video could use an update, considering how prevalent LSP's have become. I don't think pyls is used much anymore (but I could be wrong)

glennoberlander
Автор

Great video! I also notice your desktop setup, looks like you are using i3 as WM replacement for XFce.
That's my setup too and I find it very convenient.
Do you have a video where you show how to get it?

derkling
Автор

spacemacs works fine with conda backend using the condo layer. I don't know if that was true when this video was made. It only works with the develop branch though.

dlf
Автор

Is this all the configuration I need?
I am on Windows 10, Python 3.9.2 interpreter installed globally and using spacemacs, everything enabled in the layers(python+lsp), I make a virtual env. with python -m venv environment-name, activate it, install the dependencies I need, for example, let's say I use Pyright as a language server(which I currently am trying to do), I install npm and using npm I install the Pyright(as it's instructed in the spacemacs docs), after am done with all the dependency installations, I open up spacemacs, TRY to switch to the virtual environment using pyvenv-workon and it spits out JSON-readtable-error 80, nothing else in the error buffer so alright, what the hell, maybe it still works...
I open up a project, it RECOGNIZES the environment I activated(down there on the modeline, it spells out its name), but it doesn't see a language server?
I assume using built in venv is similar to this, but I don't know what I'm doing wrong...

xStefaKO
Автор

Hey, thanks for these videos! I'm loving to learn about spacemacs. If you could do one video about latex and auctex I would be very happy. Also, what's holding me onto pycharm is its debugging features. How does spacemacs compare in that regard?

PraecorLoth
Автор

Great content, I used the lsp mode when configuring the C++ and it is great. Off-chance, will you do a video about configuring ROS in Spacemacs?

muhammadzulfaqarazmi
Автор

Yes DAP mode setup is pain. After setting a breaking point using dap-breaking point-add I'm not sure how to proceed and run the script so that it gets picked up the the debug environment.

geez
Автор

so how do you deal with data processing scripts that produce a lot of output? write to disk and open file?

picosdrivethru
Автор

do you experience lagging/stuttering with lsp? cz mine does to the point where it's unusable for me ;(

MrMangkokoo
Автор

Do you set your WORKON_HOME environment variable in the user-init section of your .spacemacs file? Because even though I define the variable in my .bash_profile file spacemacs complains - at least on my system where I run the emacsclient at startup with systemd - that WORKON_HOME is not defined. Or do you use a more elegant solution?

dalanicolai
Автор

Thanks for this. Would you list everything that you installed, please? It would be very helpful. Thank you!

RichardThomas
Автор

Hey, maybe im being the biggest noob but i dont have the 'company-complete' command, maybe im doing something wrong?
Im using SPC + SPC to go to M-x and when i write comp... nothing pops up, or nothing relevant or similar to what you proposed, help please :'[


UPDATE:
so i uncommented auto-completion from the dotfile and now the command company-complete appears BUUT if i try to run it, it says that company-complete is not enabled
HALPP


Another UPDATE:
I fixed it, its kinda wonky, it doesnt look as good as yours but ill be workin on how to improve it, anyway, thanks <3

Anyways great video, surely will be subscribing

/Using Windows 10

guiAI
Автор

Not working as when i open work-on it does not show any working env name i created

Sahilbc-wjqk
Автор

hi, when I type M-x: company-complete, it shows-> company not enabled, could anyone help me?

吴鹏-sd
Автор

Everyone says nothing beats emacs. Auto complete is a basic feature for any ide. And you say it will break some times/ may not work in Some scenarios and you need manually enable it. Why would someone take this much effort to install and configure emacs. Why can’t we just use VS code, atom, something. Those are light weight and easy to configure.

GopakumarS
join shbcf.ru