-
-
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
use pyright instead of pylsp in helix #5479
Comments
There is only one default but you can always use a custom languages.toml configuration to switch to pyright. |
If pyright is the preferred LSP by the community then you can open a PR to switch the default. |
how to do that #languages.toml hx --health python however it does not work |
It should work since it's detected. Try running with |
There's this: #5369 (reply in thread) |
Should be fixed now with #5471 |
Maybe, according to the documentation we need to turn on |
Did you read this helix-docs? I haven't tried it, but I think you need to pass additional arguments to the |
Specifying any config in the
works as expected: |
@carrascomj, is this still working for you? On the latest Helix version (23.03), it doesn't work. This is the configuration:
[[language]]
name = "python"
auto-format = true
language-server = { command = "pyright-langserver", args = ["--stdio"] }
config = {}
{
"typeCheckingMode": "off"
} I still get type errors in Helix, but running |
@oyarsa I installed from community/helix (arch) version 23.03 and still works for me™, in the sense that the type checks are removed when I put that configuration in the root of my project. Maybe your project root is not properly determined by helix? I tried removing the |
@carrascomj, here's what I learned: With no Defining Having multiple This could work if we had workspace Helix configurations that override LSP settings. For that to work, we need |
I've trying pyright for a while, but found it's slow for larger project, here is more information: microsoft/pyright#1997 |
@archseer and all other Helix contributors . It is a humble request please do not make pyright the default lsp. I have used pyright for long time and recently switched to and used pylsp and believe me that pyslp is better than pyright. Please keep pylsp as the default lsp for python in helix. We don't care about it's popularity, pylsp works well and that's what we want. Thanks! |
[language-server]
pyright = { command = "pyright-langserver", args = ["--stdio"], config = {} }
[[language]]
name = "python"
roots = ["pyproject.toml"]
language-servers = [ "pyright" ] Seems to work great (with latest master) and I can add a |
There is something buggy and weird going on with pyright! I have found after a lot of messing around you can't really set anything in the Helix settings, you need the external config file AND an empty config setting in Helix. Please correct me if I am wrong, but this is my final working setup: [language-server.pyright]
command = "pyright-langserver"
args = ["--stdio"]
config = {} # buggy behaviour, you need a pyproject.toml and pyrightconfig.json
[[language]]
name = "python"
formatter = { command = "black", args = ["--quiet", "-"] }
auto-format = true
roots = ["pyproject.toml"]
language-servers = [ "pyright" ]
{
"typeCheckingMode": "strict",
"reportMissingImports": true
} |
* Add csharp-ls for possible c-sharp LSP See https://github.com/razzmatazz/csharp-language-server for more info about it. * Add pyright for possible python LSP It may be prefered than pylsp by someone. According to #5479, I don't make it default for everyone. Just for people who need this. * Update roots of python Using some known filenames to detect correct project root. * Add pylyzer for possible python LSP Co-authored-by: zetashift <[email protected]> --------- Co-authored-by: zetashift <[email protected]>
I always add my library paths to the LSP for highlighting and The config field in config = { extraPaths = ["./test"] } But, creating a [tool.pyright]
extraPaths = ["./test"] |
I think all actionable issuse are fixed here #5479 (comment) |
This issue was moved to a discussion.
You can continue the conversation there. Go to discussion →
#834
pyright is more powerful in syntax analysis and linter
and more popular
The text was updated successfully, but these errors were encountered: