-
Notifications
You must be signed in to change notification settings - Fork 299
Snippets don't auto indent #2242
Comments
Hello and welcome to the Oni repository! Thanks for opening your first issue here. To help us out, please make sure to include as much detail as possible - including screenshots and logs, if possible. |
I can confirm from a quick test in VSCode that it should be auto-indenting the subsequent lines. The code looks to take the first lines character position into consideration, but then after that just fits the rest of the snippet in with no formatting. oni/browser/src/Services/Snippets/SnippetSession.ts Lines 146 to 158 in 38566d9
We'd instead want to use the start of the prefix position as the starting point for the rest of the lines. |
@CrossR we use a package called |
Added a PR for this now (#2394 ), using It looks like |
Inserting a snippet on anything but col 1 doesn't preserve indentation beyond first line.

Example:
Snippet code:
From col 1:

From col 5:

The text was updated successfully, but these errors were encountered: