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

pyright-langserver stops working after lsp-exit #672

Open
ttttcrngyblflpp opened this issue Feb 20, 2023 · 1 comment
Open

pyright-langserver stops working after lsp-exit #672

ttttcrngyblflpp opened this issue Feb 20, 2023 · 1 comment

Comments

@ttttcrngyblflpp
Copy link

I'm observing that when kakoune starts, I can make use of pyright-langserver functionality, but as soon as the LSP server is restarted (I don't really know exactly when this happens, but I can intentionally make this happen using :lsp-exit), nothing works anymore. It looks like the difference is that after :lsp-exit, pyright-langserver is no longer able to find any source files. My workaround for now is doing :lsp-disable and :lsp-enable...

I have reproduced this with the following minimal kak-lsp configuration:

[language.python]
filetypes = ["python"]
roots = ["requirements.txt", "setup.py", ".git", ".hg"]
command = "pyright-langserver"
args = ["--stdio"]

and the following minimal python file:

class Foo(object):
    pass

class Bar(Foo):
    pass

Here is a set of logs I collected, search for XXX to see the markers I inserted after certain steps were taken: kak-lsp.log.

kak-lsp version is kak-lsp 14.2.0-snapshot.

@krobelus
Copy link
Member

krobelus commented Mar 8, 2023

Interesting, I can reproduce. Running pkill node instead of lsp-exit also reproduces.

It looks like the server sends an invalid (empty) URI

"workspace/configuration","params":{"items":[{"scopeUri":"",

even though we did send textDocument/didOpen earlier so it should know about the file URI.
Might be an issue in pyright.

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

No branches or pull requests

2 participants