This repository was archived by the owner on Apr 14, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 133
On type formatting #126
Merged
Merged
On type formatting #126
Changes from all commits
Commits
Show all changes
45 commits
Select commit
Hold shift + click to select a range
4f3434b
Working line formatter based on VS Code implementation, without tests
jakebailey c52b83d
fix namespace change, rename file
jakebailey d8d1a74
move LineFormatter, add basic OnTypeFormatting tests, add LineFormatt…
jakebailey 410b13f
mostly complete line formatter
jakebailey 1a4c2db
rewrite formatter from scratch, fully passes existing tests with slig…
jakebailey cdbc45a
cleanup argument/lambda inside logic, remove leftover debugging state…
jakebailey 32bae79
fix various formatting issues from vscode-python
jakebailey 659075b
fix half-comment
jakebailey 5ad26bc
add a few more unary operator tests for slicing
jakebailey 17656b9
tweak test names, ellipsis test
jakebailey ca86bd3
test cleanups
jakebailey a506a8c
test unary ops inside function args
jakebailey c3ce7b9
test a few edge cases
jakebailey b956846
test against PEP448 unpacking, cleanup testing helpers, naming tweaks
jakebailey e5989df
remove stray comment
jakebailey ab1798d
simplify checking token kinds
jakebailey 770aa4e
catch bad trigger character for OnTypeFormatting call
jakebailey b19ad65
instead of reading one extra line arbitrarily, tokenize ahead to the …
jakebailey eab9e6a
more consistent ArgumentNullException usage
jakebailey 65842a2
remove async stuff from test cases
jakebailey a9f82ba
remove _reader member, document LineFormatter class/constructor
jakebailey a9d219b
documentation fixes
jakebailey 9027d4b
check lines first, as most tokens won't span multiple lines
jakebailey 5c00a04
fix multiline string assignment and function defaults/named args
jakebailey 6630e87
simplify multiline string logic
jakebailey 1fab534
directly test line continuations, fix commas inside brackets
jakebailey cae62a5
a few code analyzer fixes
jakebailey 54556e3
simplify multiline string logic
jakebailey 0892c5b
re-add soft space after multiline string
jakebailey 73c6ff9
remove exception for unknown tokens, handle older python 2 features (…
jakebailey 3c6a024
shuffle token get, fix AddToken typo
jakebailey e182904
explain non-comprehensive language server formatting tests
jakebailey 37d1348
add context, dispose of server
jakebailey ee32c09
accessor formatting
jakebailey edaca3f
use Check class
jakebailey 4df670f
fix failing test
jakebailey 2e604ae
use DataRow/DataTestMethod style tests to show results for each
jakebailey 4177069
fix missing DataTestMethod
jakebailey d2a6423
add a single string of whitespace instead of many single spaces
jakebailey 96f3652
remove string specialization
jakebailey 87d3392
move filtering into TokenizeLine
jakebailey 94c18a0
simplify grammar file unchanged line checks
jakebailey f1cec62
remove test helpers, use server extension
jakebailey 874a620
remove TextBuilder in favor of StringBuilder extension
jakebailey 699b130
Merge remote-tracking branch 'upstream/master' into on-type-formatting
jakebailey File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
This file is getting huge. Can we create LanguageServer folder and then separate FormattingTests file?
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.
Would you like me to do that in this PR, or a subsequent one? It might be more straightforward to make a PR to move all of the tests at once, since a lot of the "CreateServer" logic is shared between the tests.