-
Notifications
You must be signed in to change notification settings - Fork 111
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
pylsp never gets configured #655
Comments
This is expected behavior, the spec says
so we should not send this unless we're asked to. pylsp configuration actually works fine, because we send |
Here's how I confirmed it works:
def foo():
if 1:
if 1:
if 1:
if 1:
if 1:
if 1:
if 1:
pass
else:
pass
else:
pass
else:
pass
else:
pass
else:
pass
else:
pass
else:
pass
if 1:
if 1:
if 1:
if 1:
if 1:
if 1:
if 1:
pass
else:
pass
else:
pass
else:
pass
else:
pass
else:
pass
else:
pass
else:
pass
[flake8]
max-complexity = 300
[language.python]
filetypes = ["python"]
roots = ["requirements.txt", "setup.py", ".git", ".hg"]
command = "pylsp"
settings_section = "_"
[language.python.settings._]
# See https://github.com/python-lsp/python-lsp-server#configuration
pylsp.configurationSources = ["flake8"]
Logs should show that we send |
if you see a panic in logs (search for |
So, I saw #654 and thought it was totally separate to my case, but it might be. I thought I looked for errors in the log but this
Will use latest commit and see if that fixes it. Until then, here's the current log I have: .kak-lsp.log Also [language.python]
filetypes = ["python"]
roots = ["pyproject.toml", ".git"]
command = "poetry"
args = ["run", "pylsp", "--verbose", "--check-parent-process"]
settings_section = "pylsp"
[language.python.settings.pylsp.pylsp]
configurationSources = ["flake8"]
[language.python.settings.pylsp.pylsp.plugins]
autopep8.enabled = false
black.enabled = true
flake8.enabled = true
isort.enabled = true
mccabe.enabled = false
preload.enabled = true
pycodestyle.enabled = false
pydocstyle.enabled = true
pyflakes.enabled = false
pylint.enabled = true
rope.enabled = true
yapf.enabled = false
[language.python.settings.pylsp.pylsp.plugins.mypy]
enabled = true
live_mode = true
strict = false |
Okay, the latest commit definitely adds in the |
"Language server error" means pylsp terminated due to an error. Your latest log says it can't find the |
Yeah, I'll close this. Thanks for helping with the debug since I seem to just not be able to read logs. >< |
So, I've read the logs for my own runs of
pylsp
, and I poked around on the issues for both pylsp and kak-lsp, and found this conundrum.pylsp
doesn't want to useinitializationOptions
, since per their comments, it's not very standardized: python-lsp/python-lsp-server#195But from everything I can see, and my own local tests,
kak-lsp
doesn't sendworkspace/configuration
unless requested, whichpylsp
never does. It would be nice to be able to ensure that the configuration is also sent via this, at least maybe via a config option.Essentially, from everything I can see, pylsp isn't loading the configuration from kak-lsp since it ignores the initialization options and kak-lsp doesn't send a separate
workspace/configuration
message.When I check the logs, I see calls for
textDocument/didOpen
,textDocument/codeLens
, andinitialized
sent to the server, but noworkspace/configuration
.The text was updated successfully, but these errors were encountered: