Open malinthar opened 2 years ago
+1
Sample use case,
function getJsonProperty(json|error data) returns json|error? => <cursor>
or
function getJsonProperty(json|error data) returns json|error? => <cursor> data is error ? data.message() : data.'worker;
When we press enter at the cursor position above,
current behavior,
function getJsonProperty(json|error data) returns json|error? =>
data is error ? data.message() : data.'worker;
expected behavior,
function getJsonProperty(json|error data) returns json|error? =>
data is error ? data.message() : data.'worker;
In coding styles, we encourage using expression-bodied functions over block-function-body whenever possible. Therefore, I expect this to be a quite frequent scenario.
Description
Format code when typing. The format request
textDocument/onTypeFormatting
is trigger by special characters like{
,}
,;
Refer https://microsoft.github.io/language-server-protocol/specifications/lsp/3.17/specification/#textDocument_onTypeFormatting