|
|
@ -71,8 +71,22 @@ order issues. This may be patched in the future. |
|
|
|
|
|
|
|
|
|
|
|
### Python |
|
|
|
### Python |
|
|
|
|
|
|
|
|
|
|
|
Pyenv support is added via [vim-pyenv](http://github.com/lambdalisue/vim-pyenv). `:PyenvActivate` can be used to |
|
|
|
Support for python can be achieved through `:MasonInstall pyright`. Additionally, you can install |
|
|
|
activate a given environment. |
|
|
|
[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 |
|
|
|
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. |
|
|
|
wish to adjust this you can do that here, or make modifications on a per-project basis. |
|
|
|