Skip to content

Replace old completion function with new one #733

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

Merged
merged 2 commits into from
Jun 20, 2015
Merged

Replace old completion function with new one #733

merged 2 commits into from
Jun 20, 2015

Conversation

geraldus
Copy link
Contributor

New method have following features:

  • provide completions inside comments and string literals using dabbrev expansion
  • provide completions for pragmas (e.g. LANGUAGE, DEPRECATED, etc.)
  • provide completions for supported GHC options
  • provide completions for language extensions
  • provide completions for module names using
  • provide completions for arbitrary haskell identifiers
  • prevent Emacs to hang in case if REPL is busy

Old method does not provided completions for pragma names and words inside comments and strings. Also it fetches completions by synchronous REPL query, this will hang Emacs for a while if REPL is busy. New method fallbacks to dabbrev expansions immediately in this case, though the result is worst. Old method does not provide completions for local names (e.g. defined in let blocks) and haskell keywords (e.g. "import", "where", etc.), and new method fallbacks to dabbrev expansions in case REPL returned no completions, so it is now possible to auto-complete local names and keywords too. Finally, is there is no haskell session (hence REPL is not available) new method also fallbacks to dabbrev expansions.

@geraldus
Copy link
Contributor Author

@gracjan can you merge this?

@gracjan
Copy link
Contributor

gracjan commented Jun 20, 2015 via email

gracjan added a commit that referenced this pull request Jun 20, 2015
Replace old completion function with new one
@gracjan gracjan merged commit a67b0a2 into haskell:master Jun 20, 2015
@lukehoersten
Copy link
Member

Thanks for putting this in guys. I'm excited to try company mode now as well.

@geraldus
Copy link
Contributor Author

@lukehoersten I would be happy if you'll find it better than it was before, I'm going to go ahead with company backend soon, and make it even more rocky (:

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.

3 participants