jcollard / elm-mode

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

elm-oracle-type-at-point not loading? #34

Closed ghost closed 9 years ago

ghost commented 9 years ago

Struggling to get elm-oracle-setup-completion to work, though completion (using company seems to work).

This is my setup (part of a language layer I've written for Spacemcs).

https://github.com/usharf/spacemacs/blob/elm-lang-layer/contrib/!lang/elm/packages.el#L36

When trying to invoke this function I get:

command-execute: Symbol's function definition is void: elm-oracle-type-at-point
g g
Bogdanp commented 9 years ago

I'm afraid I'm not familiar with spacemacs or how to debug it but you could try replacing the :commands elm-oracle-completion-setup bit from your use-package invocation with :mode ("\\.elm\\'" . elm-mode) which should load everything properly when you visit an elm buffer for the first time. You could also try adding elm-oracle-type-at-point to the :commands list.

ghost commented 9 years ago

Thanks. Seems to work. I didn't think it was strictly necessary since the auto-mode-alist associaition would have been auto-loaded ... Strangely, it now works without it too...

In elm-mode.el:

(add-to-list 'auto-mode-alist '("\\.elm\\'" . elm-mode))