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

Workspace folders not initialized properly #48

Closed
rchl opened this issue Jul 1, 2021 · 0 comments · Fixed by #49
Closed

Workspace folders not initialized properly #48

rchl opened this issue Jul 1, 2021 · 0 comments · Fixed by #49
Milestone

Comments

@rchl
Copy link
Contributor

rchl commented Jul 1, 2021

The initialize request can include a list of workspace folders:

	/**
	 * The workspace folders configured in the client when the server starts.
	 * This property is only available if the client supports workspace folders.
	 * It can be `null` if the client supports workspace folders but none are
	 * configured.
	 *
	 * @since 3.6.0
	 */
	workspaceFolders?: WorkspaceFolder[] | null;

pylsp ignores those during initialize and expects the client to send the workspace/didChangeWorkspaceFolders notification to initialize the workspace folders. Expecting that notification is a bug since it only needs to be called when folders change, relative to the ones reported in initialize.

rchl added a commit to rchl/python-lsp-server that referenced this issue Jul 1, 2021
Don't ignore workspace folders provided through the initialize request
expecting that the client calls sends the workspace/didChangeWorkspaceFolders
notification. Expecting that notification is a bug since it only needs
to be sent when folders change, relative to the ones reported in initialize.

Fixes python-lsp#48
rchl added a commit to rchl/python-lsp-server that referenced this issue Jul 1, 2021
Don't ignore workspace folders provided through the initialize request
expecting that the client sends the workspace/didChangeWorkspaceFolders
notification. Expecting that notification is a bug since it only needs
to be sent when folders change, relative to the ones reported in initialize.

Fixes python-lsp#48
andfoy pushed a commit that referenced this issue Jul 13, 2021
* Initialize workspaces from the initialize request

Don't ignore workspace folders provided through the initialize request
expecting that the client sends the workspace/didChangeWorkspaceFolders
notification. Expecting that notification is a bug since it only needs
to be sent when folders change, relative to the ones reported in initialize.

Fixes #48

* fix reporter pylint issues
@ccordoba12 ccordoba12 added this to the v1.2.0 milestone Jul 13, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants