You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Currently we use the users' default formatter to format the output of an Edit, immediately after it is applied to the document.
This is ok but it's problematic because:
We're relying on another extension here, it needs to work well, fast and be bug-free. Otherwise users' just see that Cody produced some poorly formatted code.
We have also had recent cases where the formatting logic seems to have broken completely, and removed all indentation. This may be due to a bug in VS Code but it still is out of our hands.
How:
Explore if there's any other VS Code APIs available to us to format an portion of text to a users' liking.
Provide our own agnostic formatting logic, it should:
Check the spaces/tabs settings in the editor.
Determine the correct insertionPoint of the edit, and adjust the indentation of all subsequent lines depending on this, and the configured tab/space settings.
Match the existing start, if editing a range of text
Determine the correct indentation of a new line, if inserting new text
The text was updated successfully, but these errors were encountered:
What:
How:
insertionPoint
of the edit, and adjust the indentation of all subsequent lines depending on this, and the configured tab/space settings.The text was updated successfully, but these errors were encountered: