smartparens icon indicating copy to clipboard operation
smartparens copied to clipboard

Lua do keyword is not matched with end

Open andreyorst opened this issue 4 years ago • 0 comments

With the given Lua code:

function f() do
  local res = nil
  do
    -- side-effects
    res = 1 + 2
  end
end

Smartparens matches end of the function incorrectly:

image

This is extremely similar to #707 and can be fixed similarly, but raises the question if Smartparens should have a way to declare some heuristics for possible ambiguity in matches?

andreyorst avatar Jan 11 '21 06:01 andreyorst