Open thewchan opened 1 year ago
You need python installed. Its mentioned in the readme.
@rchl I have python installed?
Then it appears that it's not in your PATH. Please read https://lsp.sublimetext.io/troubleshooting/#updating-the-path-used-by-lsp-servers
@rchl here some my project config that's relevant to pylsp:
"LSP-pylsp": {
"python_binary": "C:\\Users\\mchan811\\.conda\\envs\\streamlit\\python.exe",
"disabled_capabilities": {
"completionProvider": true,
"definitionProvider": true,
"documentHighlightProvider": true,
"documentSymbolProvider": true,
"hoverProvider": true,
"referencesProvider": true,
"renameProvider": true,
"signatureHelpProvider": true,
},
I'm using lsp-pyright as well and I don't have any problems
@rchl I'm pretty sure it's in my PATH, because it works with lsp-pyright. I'm just having trouble with pylsp
lsp-pyright doesn't use python binary - it's built in javascript.
That "python_binary" setting should in theory work, as long that path is correct. Does it work to run that path on the command line?
Got it re: pyright, that make sense.
Here's on the CLI/terminal:
@rchl I'm trying to do both env
and python_binary
now but still no go
@rchl maybe it's something to do with virtual envs? I'm using conda envs
env
shouldn't be relevant at this point. It's not used for that functionality.
It feels like your custom python_binary
is not used but not sure why. Would need to try to reproduce on Windows at some point.
And even if not relevant for this issue, the PATH is supposed to point at a directory, not a file.
@rchl should I try to point PATH in the config to a directory?
I've realized now that python_binary
is not supported in project settings. Only in LSP-pylsp settings. There is no easy way of fixing that.
I'm seeing this message in ST4 console that's somewhat mysterious:
I tried reinstalling both LSP-pylsp and the LSP package to no avail. Any suggestions?