Autocomplete and indentation problem


#1

Hello guys,
i’m writing a custom package which contains a custom grammar for a DSL used for robotic appliances.
All went well so far, but now i have a problem with indentation.

What’s happening is this:
if i close a structure definition by writing the keyword end_struct manually the indentation behaviour is correct (when i write the last character, in this case the t , atom shift to left the entire line).
But if i write the same keyword but using the autocomplete suggestion (so that when it show the end_struct i push the enter button on the keyboard) it doesn’t trigger the indentation.

On the settings.cson of my package i have this to make the indentation working:

  'increaseIndentPattern':'(?x)
    (?i:
      ^\\s*(struct|struct_p|_if|if|tabstr)\\s*\\S*$
    )'
    'decreaseIndentPattern':'(?x)
    (?i:
      ^\\s*(end_struct|else|endtab)\\s*$
    )'

Any clues?
I upload a gif to show better the problem. (first i use the autocomplete which don’t indent correctly, then i write manually the entire keyword and the indentation will trigger correctly)


#2

For me it looks like an issue with the autocomplete-plus package, you should problably report the issue there, if it was not reported yet.


#3

Thanks , i reported the issue: