-
Notifications
You must be signed in to change notification settings - Fork 342
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
New dabbrev completions too eager #741
Comments
I use dabbrev by M-/ command key. I would love to have M-/ do dabbrev,
completion kept only for more context-sensitive semantic information only.
|
If you don't use company-mode I think you does not encounter this issue. Here is a little demo. Company mode, no REPL (hence completions are always comes from dynamic abbrevs), 50 buffers opened. |
If someone want to fix this before I find a time this might be helpful dabbrev.el. |
@geraldus: Why do you use haskell-mode/haskell-completions.el Line 272 in a814671
As I understand |
@geraldus: My point about M-/ was that
So 'smart' stuff is for company/completion, non-smart for dabbrev. Am I mistaken? |
@gracjan I agree if people want to use dabbrev via company mode they can still add it themselves but I am not sure what we gain by doing that from haskell mode. |
Sometimes REPL is not running for some reason (in my case there is no GHCJSi available yet) or user just does not want to run it, that is, |
@geraldus: My (original) company setup has this part:
Does this mean |
@geraldus: If interpreter is not running then
|
@cocreature: How do they 'add it themselves'? It is of vital importance to me that stuff works out of the box as it should. |
@gracjan IIRC there is a company-dabbrev backend built into company mode so you can just add that to your backend. Looking at it we don't seem to provide a company backend atm, so I am not quite sure how to easily combine them. Of course it is important that stuff works out of the box, but to be frank the current dabbrev integration doesn't work (well enough). Mostly it hangs up my emacs. |
In that case we should make sure that `company-dabbrev` works with
`haskell-mode` in case somebody decides to use it.
`haskell-mode` should NOT do anything special with dabbrev because this is
code duplication and is problematic to get right.
|
Well, I think we should have some overrides for company's dabbrev source, for example case sensitivity. And if it is possible we should have some notes about completions itself and |
We have some configuration for dabbrev in haskell-mode already.
|
Ok, to test this I need to rewrite some code in completion function itself, I'll update pull request soon. |
Could we just disable dabbrev until this is fixed? It hangs up my emacs for multiple seconds which is for obvious reasons pretty annoying. I'll be happy to send a pullrequest for that if you agree. |
Please excuse me my delay and inconveniences brought by last changes. I have some troubles here and can do nothing at the moment. I will continue as soon as possible! Go ahead! |
@cocreature by the way |
Pull request disabling dabbrev welcome.
|
Fixed by #838. |
Currently I'm writing some GHCJS code and didn't setup interactive version yet, so I always have dabbrev completions. With 10-20 opened buffers dabbrev completion method becomes too eager already, i.e. completions takes too long. It is possible to limit dabbrev list of buffers to search completions. For example, try to lookup nearest folder contains .git, or .cabal file, set some haskell-completions-top-folder local var, and when searching dynamic abbrevs take this var in account. When session is available, search for d-abbrevs in buffers assigned to current session.
What do you think?
The text was updated successfully, but these errors were encountered: