A launch point for your nvim config for python.
Similar to kickstart.nvim, but specifically for python.
While there are quite a few great nvim distros and nvim starter configs out there, one thing I somewhat missed was a base config for specific languages. I recently started to learn python and was missing a minimal example what the state-of-the-art nvim setup specifically for python is.
After figuring most of it out, I decided to publish this config for others to use. It is intended as a launch point for python devs switching to nvim, or as a reference for nvim users who want to start doing python development.
pyright
ruff
black
& isort
debugpy
ipython
(if not installed, falls back to python3
)Go through the kickstart-python.lua, it is commented in detail.
You can copypaste the config into you current init.lua
to use it as a starting
point for your regular config, or you can copypaste parts of it into your
existing config.
kickstart-python
requires at least nvim 0.10.
Download the kickstart-python.lua file and run Neovim with it:
# download the config
curl --remote-name "https://raw.githubusercontent.com/chrisgrieser/nvim-kickstart-python/main/kickstart-python.lua"
# start neovim with the config, opening a file `foobar.py`
# (any existing config you are using remains untouched)
nvim -u kickstart-python.lua foobar.py
The config automatically installs all the plugins and tooling needed.
Is provided by the nvim-treesitter
plugin and/or the semshi plugin. The latter
requires pynvim
(python3 -m pip install pynvim
) to be installed.
Both provide better highlighting, treesitter is considered the more "modern"
approach. Treesitter covers some cases semshi
does not and vice versa. Have a
look at the comparison to decide for yourself which
one to use. The config uses treesitter as the more modern approach.
These plugins are not included in the config, but they are worth mentioning, as some people might be interested in them:
ropify
integrationconda
environment selectorpyright
.You can cite this software project as:
Grieser, C. (2023). nvim-kickstart-python [Computer software].
https://github.com/chrisgrieser/nvim-kickstart-python
kickstart.nvim as an example how to do this.
In my day job, I am a sociologist studying the social mechanisms underlying the digital economy. For my PhD project, I investigate the governance of the app economy and how software ecosystems manage the tension between innovation and compatibility. If you are interested in this subject, feel free to get in touch.
I also occasionally blog about vim: Nano Tips for Vim