-
-
Notifications
You must be signed in to change notification settings - Fork 2.6k
This issue was moved to a discussion.
You can continue the conversation there. Go to discussion →
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
Helix not using pyenv python version #6108
Comments
The pyright issue looks like #5958 from the log. You may be able to fix that by downgrading pyright to 1.1.292. Helix doesn't integrate with pyenv at all - I'm not sure where the [[language]]
name = "python"
language-server = { command = "/path/to/.pyenv/bin/pyright-langserver", args = ["--stdio"] } |
@the-mikedavis thank you for your clarifications. The #!/usr/bin/env bash
set -e
[ -n "$PYENV_DEBUG" ] && set -x
program="${0##*/}"
export PYENV_ROOT="~/.pyenv"
exec "~/.pyenv/libexec/pyenv" exec "$program" "$@" Setting hilex language server path to
By the way this is the [[language]]
name = "python"
language-server = { command = "~/.pyenv/shims/pyright-langserver", args = ["--stdio"] } |
Not sure why it can't find the binary but you can try |
@gabydd tried it with language-server = { command = "bash", args = ["~/.pyenv/shims/pyright-langserver", "--stdio"] }
I made sure that it does work when using the command line directly Mouradost in ~ took 4s
fsh ❯ bash ~/.pyenv/shims/pyright-langserver --stdio
added 1 package, and audited 2 packages in 1s
found 0 vulnerabilities
Content-Length: 119
{"jsonrpc":"2.0","method":"window/logMessage","params":{"type":3,"message":"Pyright language server 1.1.295 starting"}}Content-Length: 180
{"jsonrpc":"2.0","method":"window/logMessage","params":{"type":3,"message":"Server root directory: /tmp/pyright-python-langserver.-6590457998793883031/node_modules/pyright/dist/"}} |
I believe the |
@the-mikedavis you were right. However, didn't work as expected I'm having this problem now from the lsp: using
using
|
Probably comes from this part when you run the shim, might need some way to make it quite
|
You can see the full communication between Helix and pyright in the log by running in verbose mode ( The line in the log:
looks like #5958 (comment). You can try downgrading your pyright version to 1.1.292. Compatibility with 1.1.293+ is waiting on a PR in Helix and one in pyright. |
Ok I will give it a try. Results after running
|
This issue was moved to a discussion.
You can continue the conversation there. Go to discussion →
Summary
Hi,
As the title point out, Helix seems to not use the pyenv python version, but instead defaults to system python version.
I have found a file in
~/.config/helix/.python-version
which contains system. Changing this file to3.11.0
(the pyenv current system-wide version instead of 3.11.2) nothing seems to happen and helix still uses the version3.11.2
.Additionally, there seems to be a bug with
pyright
, I use it with neovim. However, it seems to be related to the python version used by helix.Reproduction Steps
This is the output of
echo $PATH
:This is the output of
hx --health python
:zsh ❯ hx --health python Configured language server: pyright-langserver Binary for language server: /usr/local/bin/pyright-langserver Configured debug adapter: None Highlight queries: ✓ Textobject queries: ✓ Indent queries: ✓
This is my python config in
~/.config/helix/languages.toml
:This is my
pyenv versions
output:zsh ❯ pyenv versions system 3.10.8 * 3.11.0 (set by /home/Mouradost/.pyenv/version)
This is the content of
~/.config/helix/.python-version
:Helix log
~/.cache/helix/helix.log
Platform
Linux
Terminal Emulator
Alacritty
Helix Version
helix 22.12
The text was updated successfully, but these errors were encountered: