language-lua icon indicating copy to clipboard operation
language-lua copied to clipboard

Auto-end code blocks

Open karai17 opened this issue 10 years ago • 2 comments

I am not sure if this is an Atom feature or a language grammar feature (or both?) but Atom seems to enjoy adding closing syntax such as brackets, braces, and quotations when you type the opening equivalent. It would be pretty nice if this grammar could auto close code blocks that use "end" such as:

function name()
end

name = function()
end

for i=1, 10 do
end

for i, v in ipairs(t) do
end

for k, v in pairs(t) do
end

while true do
end

do
end

if true then
end

karai17 avatar Sep 01 '15 17:09 karai17

@karai17 As far as I know this is all handled by https://github.com/atom/bracket-matcher. Would be interesting to know if the language-lua package could be extended in a way that it uses the bracket-matcher.

rm-code avatar Dec 07 '15 11:12 rm-code

I think we should wait for https://github.com/atom/bracket-matcher/issues/6

pablomayobre avatar Apr 08 '17 21:04 pablomayobre