Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Can we have a CocComman python.setInterpreter like coc-python does? #99

Closed
Congee opened this issue Sep 30, 2020 · 2 comments
Closed

Can we have a CocComman python.setInterpreter like coc-python does? #99

Congee opened this issue Sep 30, 2020 · 2 comments
Labels
enhancement New feature or request

Comments

@Congee
Copy link

Congee commented Sep 30, 2020

coc-pyright is faaaaaaaaaar better than coc-python speaking of the language server pyright. I really miss the python.setInterpreter feature from coc-python. Without it, I have to currently set an absolute python path to the config "python.pythonPath".

@fannheyward fannheyward added the enhancement New feature or request label Oct 4, 2020
@fannheyward
Copy link
Owner

python.setInterpreter is ported from vscode-python, it's quit complex, neoclide/coc-python#55, I wouldn't like to add python.setInterpreter to coc-pyright.

Instead, coc-pyright will pick the first python interpreter found by which python, you can also custom it by python.pythonPath.

@oblitum
Copy link
Contributor

oblitum commented Oct 13, 2020

You can use coc#config() to set coc conf dynamically, for example, for coc-pyright I have set this as I use pyenv:

  if !empty($PYENV_VIRTUAL_ENV)
    call coc#config('python', {
    \   'pythonPath': $PYENV_VIRTUAL_ENV . '/bin/python'
    \ })
  endif

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

3 participants