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

Add option to make tern completions synchronous. #546

Closed
wants to merge 1 commit into from
Closed

Add option to make tern completions synchronous. #546

wants to merge 1 commit into from

Conversation

renatofdds
Copy link
Contributor

With this option on there is no need to bind a separate key specifically
for tern-ac-complete, it will be queried automatically by auto-complete
and list completions along with other ac-sources.

With this option on there is no need to bind a separate key specifically
for tern-ac-complete, it will be queried automatically by auto-complete
and list completions along with other ac-sources.
@marijnh
Copy link
Member

marijnh commented May 28, 2015

I'm out of my emacs-depth here -- I don't really understand what is being done and why.

@kiwanami Do you have an opinion on this patch?

@renatofdds
Copy link
Contributor Author

Advising functions is the emacs easy way to attach functionality before, around, or after an already existent function.

This patch advises auto-complete so It waits for tern to obtain its suggestions from the server before popping up.

-----Original Message-----
From: Marijn Haverbeke notifications@github.com
To: marijnh/tern tern@noreply.github.com
Cc: Renato F renatofdds@gmail.com
Sent: Thu, 28 May 2015 5:30 AM
Subject: Re: [tern] Add option to make tern completions synchronous. (#546)

I'm out of my emacs-depth here -- I don't really understand what is being done and why.

@kiwanami Do you have an opinion on this patch?


Reply to this email directly or view it on GitHub:
#546 (comment)

@kiwanami
Copy link
Contributor

Hi, @renatofdds @marijnh
I'll check this code.

@kiwanami
Copy link
Contributor

I have checked. The action for synchronous command moves good.

In this PR, the default value of customize variable tern-ac-sync is t.
Though this code changes completion behavior, I think almost users feel this interaction reasonable.

One point, at the advice auto-complete, some major mode symbols are hard coded.
I think it should be extracted as a customize (or just defvar) variable to maintenance easily, because the popular major mode would change in the future.

Then, we should merge this code!

@renatofdds
Copy link
Contributor Author

Thank you @kiwanami.
I agree with extracting the major modes into a defcustom.

marijnh added a commit that referenced this pull request Jun 11, 2015
@marijnh
Copy link
Member

marijnh commented Jun 11, 2015

Merged as 4f24418 and followed up with fba7909

@marijnh marijnh closed this Jun 11, 2015
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.

None yet

3 participants