jcollard / elm-mode

Elm mode for emacs
GNU General Public License v3.0
376 stars 67 forks source link

Completion for user defined bindings on same file #134

Closed vitorqb closed 3 years ago

vitorqb commented 6 years ago

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 commented 6 years ago

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

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

vitorqb commented 6 years ago

@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.

theothornhill commented 3 years ago

I am guessing this can be closed since lsp is a thing now?

purcell commented 3 years ago

Yep!