srusskih / SublimeJEDI

awesome Python autocompletion with SublimeText
MIT License
938 stars 109 forks source link

Added support for hanging indentation of args in the signature popup #235

Closed vshotarov closed 6 years ago

vshotarov commented 6 years ago

Hi @srusskih,

Similar to #227 and #229, I noticed the function signature in the markdown popup doesn't behave well with hanging indentation of arguments.

To overcome this, I have used the ''.join(args.split()) method to remove spaces, but instead of using split() I had to use a regular expression (which I got from this answer at StackOverflow), in order to respect spaces inside string default values.

Additionally, I've added a .replace(',', ', ') function to bring back the spaces between the arguments.

This is my first ever PR, so please feel free to flag up issues and/or offer guidance.

Thank you!

Example

sublimejedi_hanging_docstring_fix

srusskih commented 6 years ago

@vshotarov welcome :)

Thanks for PR!