-
Notifications
You must be signed in to change notification settings - Fork 24
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
Staging #21
Staging #21
Conversation
… us to maintain server connection when ensime.py is reloaded.
…and set smaller timeout for completion.
resp = self.env.controller.client.sync_req(req) | ||
def get_completions(self, file_path, position): | ||
req = ensime_codec.encode_completions(file_path, position) | ||
resp = self.env.controller.client.sync_req(req, timeout=0.5) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Back then I added rpc_timeout
to the config for exactly this purpose. It seems, though, that I forgot about it, so it's unused right now. I think, maybe, we should use it instead of a hardcoded value?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The problem is that different situations demand different timeout values. In this case, we need the timeout to be fast enough that it doesn't irritate the user when they're waiting for completion results, that's something we can nail down ahead of time (probably closer to 100 or 200 ms).
In any case, this is something that will need some playing with.
@@ -0,0 +1,48 @@ | |||
import sublime |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I broke config stuff out into a module. This should be fine (w.r.t reload) as long as the module is not stateful.
I forgot to mention it in commit message, but currently just removed the two calls to view_insert.