-
Notifications
You must be signed in to change notification settings - Fork 94
Add support for file and folder operations (create, rename, move) to workspace edits #267
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
Conversation
Hi @banacorn, thanks for this PR! Looks like there's a bit of a chicken and the egg situation with lap-types and lsp-test. You can create a branch on lsp-test for now and reference that commit in |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks, this is great! Just some minor nitpicks about the string literal tag. Out of curiosity, are you using this for your own language server?
Yes, I'm building a language server for my toy language. I'm planning on building a language server for Agda next. |
Whoops, looks like fix keyword in the PR message closes PRs across GitHub accounts |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM now. Let me know when you're happy/referencing the new lsp-test commit and I'll merge
Looks like its passing now. Want me to merge @banacorn ? |
Yes, please! Thank you! |
Instead of having
TextDocumentEdit
inWorkspaceEdit
It is now replaced by a new type called
DocumentChange
Which is just a synonym of union of
WorkspaceEdit
and other operationsSo that it complies with the spec as suggested by @EggBaconAndSpam in #134 (comment)
Here's how to construct a
DocumentChange
that creates a file for example:But it's a bit wordy and unsafe because of the
FileResoureChangeKind
.I'm considering hiding these constructors and export only smart constructors.