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

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

Open
ratijas opened this issue Aug 28, 2022 · 7 comments
Open

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

ratijas opened this issue Aug 28, 2022 · 7 comments
Labels
question Asking questions

Comments

@ratijas
Copy link

ratijas commented Aug 28, 2022

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?

@jfcherng
Copy link
Collaborator

jfcherng commented Aug 28, 2022

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

@ratijas
Copy link
Author

ratijas commented Aug 28, 2022

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

@jfcherng
Copy link
Collaborator

res: is ST thing.

@ratijas
Copy link
Author

ratijas commented Aug 28, 2022

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

@jfcherng
Copy link
Collaborator

jfcherng commented Aug 28, 2022

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.

@jfcherng
Copy link
Collaborator

Original discussion #71

@jfcherng jfcherng added the question Asking questions label Aug 28, 2022
@jfcherng jfcherng changed the title Can't find imports in LSP.plugin Is it possible to load libs from .sublime-package files? Aug 28, 2022
@rchl
Copy link
Member

rchl commented Aug 28, 2022

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.

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

No branches or pull requests

3 participants