sublimelsp / LSP-pyright

Python support for Sublime's LSP plugin provided through microsoft/pyright.
MIT License
131 stars 13 forks source link

Do Relative Paths Work in .sublime-project Files? #243

Closed munkybutt closed 1 year ago

munkybutt commented 1 year ago

Hey - In an attempt to work around https://github.com/sublimelsp/LSP-pyright/issues/241 I am trying to move all my LSP-pyright settings to my .sublime-project file. Relative paths don't seem to work though, is this intentional? It might not be a LSP-pyright issue, but relative paths work in other areas of .sublime-project files and they work in VSCode .workspace files.

This is the behaviour I am experiencing:

relative_paths

Any insight is appreciated.

jfcherng commented 1 year ago

I don't think we resolve any relative path in settings. Not even we treat it as a path but just a string. So pyright just receives the string as is. VSCode behaves like this too.

Both of ST and VSCode work in my test. image image

Since you didn't show the folders in your project settings, I don't know what .. means.

munkybutt commented 1 year ago

Cool ok - so it should work in Sublime. I will investigate further, likely it is another plugin preventing this from working as expected.

munkybutt commented 1 year ago

So it looks like the paths are resolved relative to each folder in the project, rather than the .sublime-project file itself - which makes perfect sense.

Thanks for your help!