sublimelsp / LSP-pyright

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

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Files outside project folders can't be diagnostics.

milkpuff opened this issue · comments

If folders added to sublime_text side bar(add folders to project), a .py file out of those folders can't be diagnosed, and the output shows “No diagnostics. Well done!”. And files in those folders can be diagnosed.
If side bar is empty(no folder in project), any file can be diagnosed.

So, how can I add some folder to project and diagnose files outside project at the same time.

Settings as follow:

{
	"settings": {
		"python.pythonPath": "G:/miniconda3/envs/py310/python.exe"
	}
}

env: win10, sublime_text 4, lsp-pyright 1.1.190

Not sure whether this is expected since I've seen single file mode works weird in several severs.

Since LSP's session is window-based, I think it's hard to "fix" this in LSP's side or even here.

Just tested in VSCode and it behaves so as well. Thus I would call this works as "expected". Or at least, an issue for pyright.

It does not always make sense to ignore diagnostics outside of the project so there is related issue in LSP: sublimelsp/LSP#1835

@rchl @jfcherng
Thanks very much.

It does not always make sense to ignore diagnostics outside of the project so there is related issue in LSP: sublimelsp/LSP#1835

Yes, this is the same problem.
It seems easy to handle in the code. But the work does not appear to be proceeding?

Such is life. Or open source at least.
Watch the issue for development or contribute with discussion or PR.