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

Test workspace edit API improvements #161809

Closed
2 tasks done
jrieken opened this issue Sep 26, 2022 · 0 comments
Closed
2 tasks done

Test workspace edit API improvements #161809

jrieken opened this issue Sep 26, 2022 · 0 comments

Comments

@jrieken
Copy link
Member

jrieken commented Sep 26, 2022

Refs: #148667, #145374

Complexity: 4

Create Issue


We made improvements to the WorkspaceEdit-API. It now allows to create files with content (binary or text) and now allows to make snippet text edits. The latter requires an editor but falls back to a normal text edits. To test, do the following

  • Create an extension (guide)
  • Use latest stable API npx vscode-dts main
  • use the vscode.workspace.applyEdit-API
  • test that WorkspaceEdit#createFile allows to pass content and that the file will be created with that content
  • test that there is SnippetTextEdit which can used with the WorkspaceEdit#set-method.
  • test that both APIs work and that both are properly documented
  • for the snippet text edit:
    • when no editor is open/active the edit will be applied without snippet behaviour - just the default text is inserted
    • only snippet edits for the active editor are putting the editor into snippet mode, others are inserted as text
    • you can mix snippet edits and normal edits as you like
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

4 participants