Skip to main content

Neovim pynvim python executable wrapper

Project description

pynvim-python-interpreter

Introduction

pynvim-python-interpreter is a thin wrapper designed to expose the Python interpreter associated with Neovim's pynvim library. When placed on the executable PATH, pynvim-python-interpreter chains to the Python interpreter associated with pynvim, essentially providing a renamed Python interpreter that won't collide with other Python interpreters on PATH.

NOTE: Ideally, pynvim and Neovim would adopt this idea to make a zero-configuration solution. For that reason, this project leaves the shorter name pynvim-python available in case the Neovim project would like to implement this idea in some form.

Installation

Typical installation uses uv^1 or pipx^2 to install pynvim-python-interpreter on the PATH, e.g.:

  • For uv:

    uv tool install pynvim-python-interpreter
    
  • For pipx:

    pipx install pynvim-python-interpreter
    

Post-installation Neovim configuration

After installing pynvim-python-interpreter, configure Neovim to use it by setting the global variable python3_host_prog to be the string pynvim-python-interpreter:

  • Via Vimscript in init.vim:

    let g:python3_host_prog = 'pynvim-python-interpreter'
    
  • Via Lua in init.lua:

    vim.g.python3_host_prog = 'pynvim-python-interpreter'
    

References

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

pynvim_python_interpreter-1.0.0.tar.gz (14.4 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

pynvim_python_interpreter-1.0.0-py3-none-any.whl (2.1 kB view details)

Uploaded Python 3

File details

Details for the file pynvim_python_interpreter-1.0.0.tar.gz.

File metadata

File hashes

Hashes for pynvim_python_interpreter-1.0.0.tar.gz
Algorithm Hash digest
SHA256 22961cca81e39e45bc372e39011e6b8db8cf536c6af4f6c2ce8e02884423d5ed
MD5 143c338ae1e1b99bb9dc1889bceca9b0
BLAKE2b-256 272d5a18becea968795bf942bf4fcd8ce0bb27f5639fc2628581c71ebe7106b6

See more details on using hashes here.

File details

Details for the file pynvim_python_interpreter-1.0.0-py3-none-any.whl.

File metadata

File hashes

Hashes for pynvim_python_interpreter-1.0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 f395f3fbcc9989cf858bb056e25369d96ad2169bcab441ff9002a91fd1428b97
MD5 4f92dacde8a70d09f2945898977ac081
BLAKE2b-256 1e0b49410d98e012b67b67c26ba4f22495391dfa81592526eb9e40c94a3df3af

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page