-
Notifications
You must be signed in to change notification settings - Fork 347
Small improvements of completion functions #1203
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
Conversation
Prevent `haskell-utils-repl-response-error-status` and `haskell-process-get-repl-completions` from trying to split nil-ish responses, because this yields an error. Rather return immediately `'no-error` in response parser and `nil` in completion function.
Prevent `haskell-completions-completion-at-point` from tries of getting completion candidates for nil prefixes. Likely this is right way for this function, moreover passing nil prefix to `haskell-completions--simple-completions` yields error.
Is there a way to trigger this |
@gracjan didn't understood your question well. I've faced the situation, when GHCi fails to start:
In this case REPL process is alive, and not marked as restarting and all requests to REPL returns |
Stop static completions to work inside comments and strings (except pragma comments). Let other completion function handle this cases, also keyword candidates are not so useful in comments and string.
Oops. I've found another one bug, force-pushed new changes. TLDR: first fixes for static completion function added condition case for general type of prefix with nil value associated as result. This was wrong, because instead of just |
+1 for these fixes: |
@purcell by the way, do you have some special setup for company mode and haskell? |
Not really -- I mostly rely on |
@purcell I have found useful to override (set (make-local-variable 'company-backends)
(append '((company-capf company-dabbrev-code) company-dabbrev)
company-backends)) This combines completions from haskell mode with dabbrev-code completions outside strings and comments (useful for local identifiers defined in where and let blocks) and provides dabbrev completions otherwise. I want to put it in docs. |
Small improvements of completion functions
@geraldus Good tip, thanks. |
As a user of company mode I see errors in mini-buffer very often:
Small investigation lead me to proposed changes