-
-
Notifications
You must be signed in to change notification settings - Fork 101
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
Adding format selection for VSCode plugin #933
Conversation
…over indenting a line if only part of it is selected
Do you want to merge this as-is (behind an experimental config and a warning that depending on the selection, things will behave weirdly? |
@shocklateboy92 I think this can be merged as-is currently. However it should be noted that I'm going to be implementing the options we talked about into the process for mapping AST nodes to their place pre and post formatting. The reason I bring this up is because I'll probably have to revisit this at a later date in an issue to update the format selection. For the future:
|
I've taken a different approach to formatting sections of code with #1376 |
Implemented by #1376 |
Aims to resolve #659
Replaces the old languages registerDocumentFormattingEditProvider for registerDocumentRangeFormattingEditProvider to add range formatting support. Note: registerDocumentRangeFormattingEditProvider still acts as a document formatter so the old one is not needed.
Potential issues: Currently only accepts valid AST code, so selecting an entire local function doesn't work, however selecting the contents of the function should work the same since that makes a valid AST.