sublimelsp / LSP-pyright

Python support for Sublime's LSP plugin provided through microsoft/pyright.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Is it possible to load libs from .sublime-package files?

ratijas opened this issue · comments

Installed LSP-pyright, cloned this repo, opened directory in Sublime Text, saved project, edited project, set "pyright.dev_environment": "sublime_text", opened file LSP-pyright/plugin.py. LSP can't find imports from ST packages like from LSP.plugin import DottedDict.

image

I expected pyright.dev_environment option to take care of that. Is it possible to pass those modules from inside a package to an LSP without cloning the repo or manually unarchiving the package?

I expected pyright.dev_environment option to take care of that. Is it possible to pass those modules from inside a package to an LSP without cloning the repo or manually unarchiving the package?

It was discussed kind of like LSP-pyright was born. The conclusion at that moment was pyright can't take a zip. I use git submodule for that https://github.com/jfcherng-sublime/ST-my-settings/tree/master/typings

Huh, I was hoping that "res" in schemes would mean something like that.

res: is ST thing.

So, an LSP plugin can't act like a proxy, fetching those things as needed?

yes, decompress them somewhere on your filesystem auto for you. just no one implements. I am not sure decompress them when every time ST starts is a good idea.

Or maybe there is a way to pretend those files exist by sending requests to the server.

Original discussion #71

Would be good to figure out what is the .zip support in pyright about and how it's supposed to work. If it works then we could get away with just copying packages somewhere and renaming to *.zip. Would be a lot more efficient.