You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I love your plugin -- it gets better with every release.
I have found a few issues with the "smart enter" completion behaviour.
As far as I can tell, if you hit <enter> two things happen w.r.t completion behaviour/"smart enter":
If the cursor is in a block with a missing end then an end is inserted on the next line (same withuntil, etc)
Some code is reformatted
First, please, please, please remove (2), or add an option to turn off automatic code formatting. Not only do I hate it when my code is reformatted by the IDE, but the current logic has some bugs which makes the reformatting 'broken' in certain situations.
Bugs:
In the simple case, the cursor is not properly positioned.
E.g. (for this, and all further examples, | represents the position of the cursor)
If you have
if someCondition then|
and hit <enter>, you get
if someCondition then|
end
instead of
if someCondition then
|
end
If there is no space between the current keyword and the missing end (etc) from an outer block, the end is not recognized. And things get weird.
e.g. Just say this is your original code
if a then doSomething() end
nextLine
anotherLine
thirdline
then you replace doSomething() with another (incomplete) condition, (notice, no space between then and end)
if a then if b then|end
nextLine
anotherLine
thirdline
and hit <enter> (notice how then end keyword is inserted, but incorrectly, how the end following the cursor is not recognized, and how everything gets indented when it shouldn't be)
if a then if b then|
endend
nextLine
anotherLine
thirdline
and hit <enter> a second time (this is just the first bug showing up again)
if a then if b then
end
endend
nextLine
anotherLine
thirdline
The behaviour seems to depend on what follows the cursor. For example:
Initial code:
if a then return end
nextLine
anotherLine
thirdline
Add a new, incomplete condition (again, no space between then and return)
if a then if b then|return end
nextLine
anotherLine
thirdline
hit <enter>
if a then if b then|
endreturn end
nextLine
anotherLine
thirdline
hit <enter> again
if a then if b then|
end
endreturn end
nextLine
anotherLine
thirdline
The text was updated successfully, but these errors were encountered:
I love your plugin -- it gets better with every release.
I have found a few issues with the "smart enter" completion behaviour.
As far as I can tell, if you hit <enter> two things happen w.r.t completion behaviour/"smart enter":
end
then anend
is inserted on the next line (same withuntil
, etc)First, please, please, please remove (2), or add an option to turn off automatic code formatting. Not only do I hate it when my code is reformatted by the IDE, but the current logic has some bugs which makes the reformatting 'broken' in certain situations.
Bugs:
E.g. (for this, and all further examples, | represents the position of the cursor)
If you have
and hit <enter>, you get
instead of
end
(etc) from an outer block, theend
is not recognized. And things get weird.e.g. Just say this is your original code
then you replace
doSomething()
with another (incomplete) condition, (notice, no space betweenthen
andend
)and hit <enter> (notice how then
end
keyword is inserted, but incorrectly, how theend
following the cursor is not recognized, and how everything gets indented when it shouldn't be)and hit <enter> a second time (this is just the first bug showing up again)
The behaviour seems to depend on what follows the cursor. For example:
Initial code:
Add a new, incomplete condition (again, no space between
then
andreturn
)hit <enter>
hit <enter> again
The text was updated successfully, but these errors were encountered: