-
Notifications
You must be signed in to change notification settings - Fork 133
Implement format on type #5
Comments
Reducing cost to actual for this milestone - basically to the PR review. |
Finished in #126. |
Would like to discuss this once again:
The decision was get the extension to do the formatting.
Related to microsoft/vscode-python#481 |
Could you please open separate issue. This one was explicitly about moving code from TS to C# and adding additional functionality. This item was completed. Short answer: TS side does not have AST. I guess you are talking about smart indent as in using AST vs relying on regex? Speaking of Omni, it is not using LSP. They have regular TS extension which then runs their process manually and communicates with it via custom protocol. This is not technically a language server at all. Omni was implemented way before LSP was born. When actual LS/LSP runs the extension TS/editor part is bypassed and requests go directly to the LS process. |
microsoft/PTVS#4694
Implementation can be borrowed from
https://github.com/Microsoft/vscode-python/blob/master/src/client/formatters/lineFormatter.ts
translate to C#
change it to use LS tokenizer
augment with knowledge of the AST where appropriate (such as checking if = is inside function arguments)
See also microsoft/vscode-python#1799
The text was updated successfully, but these errors were encountered: