Skip to content

function, if and for in lua does not work as expected #108

@Kaiser-Yang

Description

@Kaiser-Yang

I've add those creation:

            {
                'function',
                'end',
                cmap = false,
                ft = { 'lua', 'typescript', 'javascript' },
                newline = true,
                space = true,
            },
            {
                'if',
                'end',
                cmap = false,
                ft = { 'lua', 'typescript', 'javascript' },
                newline = true,
                space = true,
            },
            {
                'for',
                'end',
                cmap = false,
                ft = { 'lua', 'typescript', 'javascript' },
                newline = true,
                space = true,
            },

For test.lua, the content is:

local function a()
end

Then if I input 'if' at the first line the 'end' will not be inserted automatically, and when I use back space, the 'if' and the 'end' of the funtion is removed ( input if then press back space once) :

Image

nvim version: 0.11.0

ultimate-autopair.nvim version: 0.6

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions