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

Update completion behavior #244

Merged
merged 7 commits into from
Jun 21, 2018
Merged

Update completion behavior #244

merged 7 commits into from
Jun 21, 2018

Conversation

srusskih
Copy link
Owner

  • used sync call to Jedi for completion to rid of blinking
  • sync call to jedi has a timeout to keep editor from restart in case completion are sloooow
  • replaced sublime.EventListerner -> sublime.ViewEventListener
  • jedi requestor (Daemon) moved from utils.py to daemon.py
  • jedi api interface (JediFacade) moved from daemon.py to facade.py
  • improved argument completion behavior

@edelvalle
Copy link
Collaborator

I will try this, and give you some feedback

@srusskih
Copy link
Owner Author

@edelvalle thanks

@srusskih
Copy link
Owner Author

@edelvalle due to I did lots of changes in utils.py and daemon.py i had to re-apply your's changes from #246. could you please review if I did it right?


parameters = get_function_parameters(in_call)
logger.info(
Copy link
Owner Author

@srusskih srusskih Jun 11, 2018

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

should the message be error-level like? do we mean this is an error or "JFYI" message?

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

well it would happen in weird occasions and does not break stuff... so a warning should do.

Copy link
Collaborator

@edelvalle edelvalle left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

All this looks good to me but, I will pull it into my sublime and use it the rest of the week to see how it behaves.

I will tell you on Saturday if something went weird...


parameters = get_function_parameters(in_call)
logger.info(
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

well it would happen in weird occasions and does not break stuff... so a warning should do.

@edelvalle
Copy link
Collaborator

Using goto definition fails...

Traceback (most recent call last):
  File "/home/xigurat/.config/sublime-text-3/Packages/Jedi - Python autocompletion/sublime_jedi/daemon.py", line 93, in _async_summon
    run_in_active_view(window_id)(callback)(answer)
  File "/home/xigurat/.config/sublime-text-3/Packages/Jedi - Python autocompletion/sublime_jedi/daemon.py", line 109, in _wrapper
    return func(window.active_view(), *args, **kwargs)
  File "/home/xigurat/.config/sublime-text-3/Packages/Jedi - Python autocompletion/sublime_jedi/go_to.py", line 143, in handle_definitions
    self._jump_to_in_window(*defn)
  File "/home/xigurat/.config/sublime-text-3/Packages/Jedi - Python autocompletion/sublime_jedi/go_to.py", line 42, in _jump_to_in_window
    flags = self.prepare_layout(active_window, transient, filename)
  File "/home/xigurat/.config/sublime-text-3/Packages/Jedi - Python autocompletion/sublime_jedi/go_to.py", line 58, in prepare_layout
    goto_layout = get_settings_param(self.view, 'sublime_goto_layout')
NameError: global name 'get_settings_param' is not defined

@edelvalle
Copy link
Collaborator

#254 Fixes this, but don't merge yet. I still evaluating...

@edelvalle
Copy link
Collaborator

This is ready, I had no problems with it for the past weeks!
Thanks!

@srusskih
Copy link
Owner Author

@edelvalle thanks for testing session! ⭐️

@srusskih srusskih merged commit 34b86b7 into master Jun 21, 2018
@srusskih srusskih deleted the sync_completion branch June 21, 2018 09:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants