8000 GitHub - mjtorn/python-support.nvim: use a single command :PythonSupportInit to initialize python support for neovim.
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

mjtorn/python-support.nvim

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

29 Commits
 
 
 
 
 
 
 
 

Repository files navigation

python-support.nvim

Use :PythonSupportInitPython2 and :PythonSupportInitPython3 to initialize Python support for Neovim.

If you like setup Python for Neovim manually, you may refer to this wiki

Requirements

  • For python2 support, you need python2 in your $PATH, with virtualenv installed
  • For python3 support, you need python3 in your $PATH
  • If Neovim is started in an active virtualenv, the Python version (and its requirements list, see below) are resolved dynamically, and the requirements installed.

Usage

Execute :PythonSupportInitPython2 and :PythonSupportInitPython3 after you have installed this plugin.

This plugin automatically checks if a python2 and/or python3 env is set up for Neovim. It uses a custom path for this under your Neovim configuration directory. If you don't need python2 or python3, use this to disable checking:

let g:python_support_python2_require = 0
let g:python_support_python3_require = 0

If you have extra need for Python modules, let's say you need flake8 installed, put this into your vimrc file. This plugin will check the requirements automatically. If requirements are not satisfied, a warning message will be fired by this plugin. It should be fixed after you execute PythonSupportInitPython2 or PythonSupportInitPython3.

let g:python_support_python3_requirements = add(get(g:,'python_support_python3_requirements',[]),'flake8')
let g:python_support_python2_requirements = add(get(g:,'python_support_python2_requirements',[]),'flake8')

Alternatively

let s:py_reqs = ['jedi', 'flake8', 'isort', 'flake8-isort']
let g:python_support_python3_requirements = extend(get(g:, 'python_support_python3_requirements', []), s:py_reqs)

Notice

I'm working on linux. I haven't test it on other systems. Feel free to send a PR for other systems support.

About

use a single command :PythonSupportInit to initialize python support for neovim.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Vim Script 67.8%
  • Python 24.5%
  • Shell 7.7%
0