sourcegraph / jetbrains

Apache License 2.0
64 stars 19 forks source link

JetBrains Inline Edits: Indent/format the rewritten code #1112

Open steveyegge opened 6 months ago

steveyegge commented 6 months ago

Description:

The rewritten code (from an Edit Code request) is not properly indented. The VS Code extension does format it for you.

I have a hunch this might be a recently-introduced bug in the FixupController and/or Agent protocol.

Objectives:

Acceptance Criteria:

Design Tasks:

### Design Tasks
- [ ] Add a draft title or issue reference here

Engineering Tasks:

### Engineering Tasks
- [ ] Add a draft title or issue reference here

Related Docs:

steveyegge commented 6 months ago

The behavior is more random-seeming than I initially thought. Sometimes I do get the code returned as formatted/indented properly, but if there is a selection active, then the formatting is sometimes wrong on the first line.

In general this feature needs to be thoroughly tested.

kalanchan commented 4 months ago

https://github.com/sourcegraph/jetbrains/pull/1454

odisseus commented 4 months ago

If we still want to format the inline edits, we should apply the formatter only after the stream of edits has ended.