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

Implement workspace/willCreateFiles notification #44

Open
Tracked by #26
retailcoder opened this issue Mar 12, 2023 · 0 comments
Open
Tracked by #26

Implement workspace/willCreateFiles notification #44

retailcoder opened this issue Mar 12, 2023 · 0 comments
Labels
component: Server.LSP Issue involves the LSP server process

Comments

@retailcoder
Copy link
Member

retailcoder commented Mar 12, 2023

Specifications (LSP)

The will create files request is sent from the client to the server before files are actually created as long as the creation is triggered from within the client either by a user action or by applying a workspace edit. The request can return a WorkspaceEdit which will be applied to workspace before the files are created. Hence the WorkspaceEdit can not manipulate the content of the files to be created. Please note that clients might drop results if computing the edit took too long or if a server constantly fails on this request. This is done to keep creates fast and reliable.

The handler for this request should evaluate whether workspace edits should be applied before the files are created, and promptly return them if that is the case. The cancellation token should be checked regularly to throw if cancellation was requested.

A first iteration is probably perfectly fine with simply returning null.

NOTE: in LSP "files" refers to both files and folders.

@retailcoder retailcoder added the component: Server.LSP Issue involves the LSP server process label Mar 12, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
component: Server.LSP Issue involves the LSP server process
Projects
None yet
Development

No branches or pull requests

1 participant