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

completion after semicolon #75

Open
Zolmeister opened this issue Sep 3, 2016 · 2 comments
Open

completion after semicolon #75

Zolmeister opened this issue Sep 3, 2016 · 2 comments

Comments

@Zolmeister
Copy link

Zolmeister commented Sep 3, 2016

While typing code, after the last ; (semicolon) a new completion shows up (first entry Trait AsMut), which is undesired.

Atom: v1.12.0-dev-44c0fe5

// e.g.
let mut t = String::new();
@johalun
Copy link

johalun commented Dec 30, 2016

Same problem. Always completes after only one letter and after semi colon. Does not respect "minimum word length" set in autocomplete-plus package settings.

Would be very grateful for an update to fix this.

@zhuanhao-wu
Copy link

zhuanhao-wu commented Jan 5, 2017

Hi there, there could be a hotfix.
edit ~/.atom/packages/racer/lib/racer-provider.coffee, after line 189
from

  findSuggestionsForPrefix: (prefix, completions) ->
    if completions?.length
      # Sort the candidates
      words = _.sortBy( completions, (e) => e.word )

to

  findSuggestionsForPrefix: (prefix, completions) ->
    if prefix.slice(-1).match(/;/g)
      return []
    if completions?.length
      # Sort the candidates
      words = _.sortBy( completions, (e) => e.word )

not sure if this is the proper way to break completion, but this do work.

mikeyhew added a commit to mikeyhew/atom-racer that referenced this issue Mar 31, 2017
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

No branches or pull requests

3 participants