Skip to content
New issue

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

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

Already on GitHub? # to your account

breaking line indenting error #19

Open
changnet opened this issue Jun 26, 2015 · 1 comment
Open

breaking line indenting error #19

changnet opened this issue Jun 26, 2015 · 1 comment

Comments

@changnet
Copy link

if age > config:get_max_age( id,
CONFIG.AGE ) then
end

should be

if age > config:get_max_age( id,
CONFIG.AGE ) then
end

solved:edit language-lua.cson
'.source.lua':
'editor':
'commentStart': '-- '
'increaseIndentPattern': '^\s_(else|elseif|for|(local\s+)?function|if|repeat|until|while)\b((?!end).)$|{\s$|([\s\S]$'
'decreaseIndentPattern': '^\s
(elseif|else|end|until,?|})?)._$|^)$'

@rm-code
Copy link
Contributor

rm-code commented Dec 7, 2015

@changnet I tried out your solution in my fork, but it produces an error:

At /Applications/Atom Beta.app/Contents/Resources/app.asar/node_modules/text-buffer/lib/text-buffer.js:803

Error: end pattern with unmatched parenthesis
    at Error (native)
    at new OnigRegExp (/Applications/Atom Beta.app/Contents/Resources/app.asar/node_modules/oniguruma/lib/onig-reg-exp.js:9:22)
    at LanguageMode.module.exports.LanguageMode.getRegexForProperty (/Applications/Atom Beta.app/Contents/Resources/app.asar/src/language-mode.js:410:16)
    at LanguageMode.module.exports.LanguageMode.increaseIndentRegexForScopeDescriptor (/Applications/Atom Beta.app/Contents/Resources/app.asar/src/language-mode.js:415:19)
    at LanguageMode.module.exports.LanguageMode.suggestedIndentForTokenizedLineAtBufferRow (/Applications/Atom Beta.app/Contents/Resources/app.asar/src/language-mode.js:304:34)
    at LanguageMode.module.exports.LanguageMode.suggestedIndentForBufferRow (/Applications/Atom Beta.app/Contents/Resources/app.asar/src/language-mode.js:288:19)
    at LanguageMode.module.exports.LanguageMode.autoIndentBufferRow (/Applications/Atom Beta.app/Contents/Resources/app.asar/src/language-mode.js:366:26)
    at TextEditor.module.exports.TextEditor.autoIndentBufferRow (/Applications/Atom Beta.app/Contents/Resources/app.asar/src/text-editor.js:3054:32)
    at Selection.module.exports.Selection.insertText (/Applications/Atom Beta.app/Contents/Resources/app.asar/src/selection.js:498:21)
    at /Applications/Atom Beta.app/Contents/Resources/app.asar/src/text-editor.js:763:29

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants