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 for user defined bindings on same file #134

Open
vitorqb opened this Issue Jun 9, 2018 · 2 comments

Comments

Projects
None yet
2 participants
@vitorqb

vitorqb commented Jun 9, 2018

Hello and thanks for the nice work on elm-mode :).

I have recently installed elm-mode and I'm using it with company-mode. I currently have nice completions for binds from imported modules, but I have no completion whatsoever for variable binds in the same file. I was reading #124 and I think this might be because elm-oracle does not parse bindings from the same file.

I was wondering if you know any way to overcome this issue. I know that there is currently no nice way to get the type of the binds, but I was wondering if there is any way to at least get completion for the variable names (without type signatures).

Thanks!

@purcell

This comment has been minimized.

Show comment
Hide comment
@purcell

purcell Jun 10, 2018

Collaborator

Yes, this is certainly related, and is indeed because elm-oracle only knows about symbols in installed packages. Approaches to address this could include:

  • Building a set of known exported bindings in all open Elm files
  • Performing searches on demand for referenced modules, and then identifying exported symbols
  • Waiting for upstream tool support that I believe Evan has been talking about building

Of these, the last one is the most likely to happen, unless someone steps up to try one of the other approaches.

Collaborator

purcell commented Jun 10, 2018

Yes, this is certainly related, and is indeed because elm-oracle only knows about symbols in installed packages. Approaches to address this could include:

  • Building a set of known exported bindings in all open Elm files
  • Performing searches on demand for referenced modules, and then identifying exported symbols
  • Waiting for upstream tool support that I believe Evan has been talking about building

Of these, the last one is the most likely to happen, unless someone steps up to try one of the other approaches.

@purcell purcell added the enhancement label Jun 10, 2018

@vitorqb

This comment has been minimized.

Show comment
Hide comment
@vitorqb

vitorqb Jun 10, 2018

@purcell Thanks for the answer. I wished I knew enough of elm/elisp to help (hopefully I will some day). I ended up using company-dabbrev-code-modes to at least get some completion for the symbols. Works fine enough for me.

Feel free to close the issue if you want.

vitorqb commented Jun 10, 2018

@purcell Thanks for the answer. I wished I knew enough of elm/elisp to help (hopefully I will some day). I ended up using company-dabbrev-code-modes to at least get some completion for the symbols. Works fine enough for me.

Feel free to close the issue if you want.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment