dotnet / fsharp

The F# compiler, F# core library, F# language service, and F# tooling integration for Visual Studio
https://dotnet.microsoft.com/languages/fsharp
MIT License
3.87k stars 781 forks source link

Copilot indentation #15676

Open charlesroddie opened 1 year ago

charlesroddie commented 1 year ago

I have been enjoying using copilot with F#. It writes routine code really well.

Copilot fails to indent code properly when starting on an empty line with the cursor indented.

A typical case is:

This gif shows copilot correctly writing a serializer line, but 1. with incorrect spacing in normal use, 2. with incorrect spacing after manually moving the cursor to the start of the line, 3. with correct spacing after manually typing in spaces before accepting.

CopilotTabsFsharpIssue

vzarytovskii commented 12 months ago

@0101 Did we get any asnwer from the copilot/editor team on why does it behave the way it does?

0101 commented 12 months ago

No. They know about it but didn't look into it or give us access to the source so we could investigate ourselves, so at the moment it's stuck.

charlesroddie commented 12 months ago

A workaround is to type space, backspace, tab instead of just tab.

kevmal commented 11 months ago

Might be worth noting this originally worked perfectly fine, somewhere along the way an update messed things up.

xperiandri commented 11 months ago

JSON and YAML have the same issue

0101 commented 10 months ago

FYI this bug has been assigned to someone on the Copilot team.

kevmal commented 7 months ago

Seems to be working with VS Version 17.9.0 Preview 3.0