Browse Source

Remove `vim-pyenv` in favor of new LSP/pyright approach.

master
Taylor Bockman 10 months ago
parent
commit
c95cb28d4b
  1. 18
      README.md
  2. 5
      lua/conf/plugins.lua

18
README.md

@ -71,8 +71,22 @@ order issues. This may be patched in the future.
### Python
Pyenv support is added via [vim-pyenv](http://github.com/lambdalisue/vim-pyenv). `:PyenvActivate` can be used to
activate a given environment.
Support for python can be achieved through `:MasonInstall pyright`. Additionally, you can install
[this](https://github.com/alefpereira/pyenv-pyright) plugin into pyenv to help.
Generally, you need to create a `pyrightconfig.json` local to your project pointing at your pyenv. It looks like
this:
```json
{
"venvPath": "$HOME/.pyenv/versions/",
"venv": "YOUR_PYENV_NAME_HERE"
}
```
If you install the plugin you can open a terminal in your project directory and run `pyenv pyright YOUR_PYENV_NAME_HERE`
and it will create the file for you. After this, you may need to reload vim and the LSP and autocompletion will
work as expected.
The file `conf/langs/python.lua` contains formatting code typical of a Python project (4 space indents, etc). If you
wish to adjust this you can do that here, or make modifications on a per-project basis.

5
lua/conf/plugins.lua

@ -79,11 +79,6 @@ Plug 'sheerun/vim-polyglot'
-- Python
-------------------------
-- Pyenv Support
if vim.fn.executable('pyenv') == 1 then
Plug 'lambdalisue/vim-pyenv'
end
-- Rust
Plug 'simrat39/rust-tools.nvim'

Loading…
Cancel
Save