srusskih / SublimeJEDI

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

Adds `only_complete_after_regex` setting #286

Closed kylebebak closed 5 years ago

kylebebak commented 5 years ago

Adds a setting, only_complete_after_regex, that makes it easier to get around slowdown issues with JEDI.

This allows the user to only trigger auto-completions immediately after a character that matches a pattern they specify.

For example, they can enter "only_complete_after_regex": "\\." into sublime_jedi.sublime-settings to only enable auto-completion after the . char.

I didn't add info about this setting to the README because I'm not sure where it should go or how it should be formatted.

kylebebak commented 5 years ago

@srusskih

Hey, any thoughts on this PR? Only showing autocomplete options after the . char has handled perf issues quite well for me in the last few weeks.

It seems like these issues have to do with Jedi and not Sublime Jedi, so I have my doubts about whether we can do much about them.

I tried to change the API as little as possible. I also noticed that the build is failing, but it doesn't look like it's related to the code in this PR.

srusskih commented 5 years ago

@kylebebak sorry. had no time look into.

yeah, tests a flaky on TravisCI :( a bit

Nice idea to turnoff ONLY code completion in this way. Could you please add a some instruction how to use it in README?

kylebebak commented 5 years ago

Gladly, will do =)

EDIT: just added section to README called Autocomplete after only certain characters that explains how to use the only_complete_after_regex setting!

kylebebak commented 5 years ago

@srusskih

Hey again! Any chance this can get merged? Or is there anything I need to change before we merge it?

srusskih commented 5 years ago

@kylebebak sorry for that. Thanks for PR and your commitment :)

kylebebak commented 5 years ago

Right on, thanks!