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

Do you have any idea for auto-completion feature of ruff-lsp? #47

Closed
tsugumi-sys opened this issue Dec 30, 2022 · 7 comments
Closed

Do you have any idea for auto-completion feature of ruff-lsp? #47

tsugumi-sys opened this issue Dec 30, 2022 · 7 comments
Labels
question Further information is requested

Comments

@tsugumi-sys
Copy link

tsugumi-sys commented Dec 30, 2022

I want to use auto-completion with ruff-lsp.
I'm trying to implement this feature while watching python-lsp-server implementaions. python-lsp-server uses jedi for auto-completion.

It works now but sometimes very slow compared to vscode IntelliSense (pylance) (My editor is helix-editor).

@charliermarsh charliermarsh added the question Further information is requested label Dec 30, 2022
@ahirner
Copy link

ahirner commented Feb 20, 2023

Specifically for helix, multiple LSP support may also fulfil this need: helix-editor/helix#2507
Although, that would inherit the overhead of python-lsp-server.

@tsugumi-sys
Copy link
Author

tsugumi-sys commented Feb 20, 2023

Yes, and that also would be because of jedi performance.
davidhalter/jedi#1059

I wish there is a rust implementation of jedi.

@jfcherng
Copy link

jfcherng commented Feb 20, 2023

Presumming you off load linting jobs to ruff. Then for autocompletion, you may use pyright, which is much faster than python-lsp-server.

@ristillu
Copy link

I guess my comment belongs on this topic - I am using neovim with coq. My previous other Python LSP tools provided auto-completion with coq. Those are pyre, pyright and python-lsp-server. ruff-lsp does not integrate with coq out of the box. I'm happy to make some effort to do the integration but have no idea where to start.

@rchl
Copy link
Contributor

rchl commented Feb 22, 2023

This server handles linting (at least currently). Why would you expect it to also handle code intelligence including completions? You can always use additional servers for that.

@tsugumi-sys
Copy link
Author

tsugumi-sys commented Feb 22, 2023

@rchl

This server handles linting (at least currently). Why would you expect it to also handle code intelligence including completions? You can always use additional servers for that.

I agree with you.
I'm helix user and I did not know about multiple LSP settings, but I just found this PR .

And I added auto-completion with jedi to ruff-lsp in my forked repo, but now I think it's not a good way for the reasons above.

@ristillu
Copy link

@rchl oh, OK. I guess it's because I stumbled across ruff-lsp via Mason and it's categorised as the same type of tool as the old ones I was using (i.e. LSP), which all plug in to coq and trigger the LSP completions. So I assumed ruff-lsp not only did linting but also some value-adds such as LSP hints to coq. Thanks for the correction.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Further information is requested
Projects
None yet
Development

No branches or pull requests

6 participants