Skip to content

Multiple lines in insert node should have indentation of first line #1378

@oiiiiiiii

Description

@oiiiiiiii

This problem is best described with an example: Say I have this snippet:

s("example", fmta([[
    if <> {
        <>
    }
    ]], { i(1), i(2, { "first line", "second line" }) }
))

When I expand it, I get

if | {
   first line
second line
} 

(where "|" is the cursor) but I would instead expect

if | {
   first line
   second line
} 

I know I could change "second line" to "\tsecond line", but the lines are not fixed but come from vim.split(parent.snippet.env.LS_SELECT_DEDENT, "\n"). I don't find it very intuitiv, that following lines have an indentation different from the first and would propose to change that.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions