Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Indentation Problems #15

Closed
devidasjadhav opened this issue May 2, 2017 · 5 comments
Closed

Indentation Problems #15

devidasjadhav opened this issue May 2, 2017 · 5 comments

Comments

@devidasjadhav
Copy link

I have used re-indent on previously written lua file it did failed to indent properly elseif blocks and braces at times
So I used solution mentioned in this
it seems issue is in "Indent.tmPreferences" file I fixed it and working fine now.

@viluon viluon self-assigned this May 2, 2017
@viluon viluon added the bug label May 2, 2017
@viluon
Copy link
Owner

viluon commented May 2, 2017

Thank you very much for the bug report, @devidasjadhav, especially then for the linked solution. I will look into this issue as soon as possible.

@devidasjadhav
Copy link
Author

I forgot to thank you for time saving solution made thanks a lot for this project.
Also for showing concern to looking into it.

@InternetUnexplorer
Copy link
Collaborator

Thanks for the bug report! I was wondering if you could include steps to reproduce the issue, as the indentation seems to be working fine for me:

Could you perhaps include an example of where it is not working?

@viluon
Copy link
Owner

viluon commented May 4, 2017

@InternetUnexplorer @devidasjadhav said (s)he used (probably) the Reindent Lines command. It seems that any text after an indent-changing keyword breaks the settings:

This could be a really simple fix, I'll mess with the regex right now.

@viluon
Copy link
Owner

viluon commented May 4, 2017

Huh, this could be a problem with ST3 itself: regular expressions 101 seem to match the increaseIndentPattern correctly

Likewise, the decreaseIndentPattern is matched as it should be

The relevant patterns can be found here.
Test string:

if a then
b()
elseif c then
d()
else -- damn you, ST3
e()
if x then -- woop
do
foo()
end -- of everything
y()
elseif z then -- tricky comment
_()
--[[ the ]] end -- is near
end

@viluon viluon changed the title Issue while indenting elseif Indentation Problems May 4, 2017
@viluon viluon added the wontfix label Jun 1, 2018
@viluon viluon closed this as completed Jun 1, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants