Skip to content

OnTypeFormattingCommand enhancements #20

@rmzs0711

Description

@rmzs0711
  1. In onTypeFormatting request we don't have possibility to change caret position. So when Idea reformat code, she is also moving caret to more comfortable position for user, but we are not doing this on client. Maybe we can edit our text edits in some way, in order to place caret in correct position, but it seems we need some analyze algorithms and tests for it, to be sure in correctness
  2. By default, vscode on typing ( also adds ), so in case, where we want to write method declaration in Python, we have extra ')', that idea doesn't know about how to deal with. Some other problems like this happens in other "open" things, etc. {, [, ". It's all OK, if we turn off auto bracket insertion, so maybe there is a way to turn off this settings using server capabilities, or extension settings

Expected behaviour after typing (

class test:
    def foo(self):

Actual behaviour after typing (

class test:
    def foo(self):)

Metadata

Metadata

Assignees

Labels

enhancementNew feature or request

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions