Replies: 9 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"] } |
Beta Was this translation helpful? Give feedback.
-
@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"] } |
Beta Was this translation helpful? Give feedback.
-
Not sure why it can't find the binary but you can try |
Beta Was this translation helpful? Give feedback.
-
@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/"}} |
Beta Was this translation helpful? Give feedback.
-
I believe the |
Beta Was this translation helpful? Give feedback.
-
@the-mikedavis you were right. However, didn't work as expected I'm having this problem now from the lsp: using
using
|
Beta Was this translation helpful? Give feedback.
-
Probably comes from this part when you run the shim, might need some way to make it quite
|
Beta Was this translation helpful? Give feedback.
-
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. |
Beta Was this translation helpful? Give feedback.
-
Ok I will give it a try. Results after running
|
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
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
Beta Was this translation helpful? Give feedback.
All reactions