reordering vim-polyglot and elm-vim Plug statements causes error - Unknown function: elm#FindRootDirectory
Closed this issue · 3 comments
With order of
Plug 'sheerun/vim-polyglot'
Plug 'ElmCast/elm-vim'
I get the following error:
Error detected while processing /home/dg/.config/nvim/plugged/elm-vim/ftplugin/elm.vim: line 94: E117: Unknown function: elm#FindRootDirectory E116: Invalid arguments for function join([ elm#FindRootDirectory().'/src', elm#FindRootDirectory().'/elm -stuff/packages/**/src', &g:path ], ',') E15: Invalid expression: join([ elm#FindRootDirectory().'/src', elm#FindRootDirectory().'/elm-stuff/packa ges/**/src', &g:path ], ',')
With order of
Plug 'ElmCast/elm-vim'
Plug 'sheerun/vim-polyglot'
it works fine.
I've tried setting the let g:polyglot_disabled = ['elm']
before and after loading the plug declarations
See also this stack overflow (which led to me trying the other order)
https://stackoverflow.com/questions/46514052/unknown-function-elmfindrootdirectory
I had the same issue and the above solution solved it. I also had this error when saving Elm files:
Error detected while processing BufWritePre Auto commands for "*.elm":
"app/assets/elm/Filter.elm" 6L, 76C written
Error detected while processing BufWritePost Auto commands for "*.elm":
E117: Unknown function: elm#util#EchoStored
... which was also resolved when changing the order of the plugins.
I'm using Neovim 0.2.0, vim-plug
and verified the issue with this config:
call plug#begin('~/.config/nvim')
Plug 'sheerun/vim-polyglot'
Plug 'elmcast/elm-vim'
call plug#end()
let g:polyglot_disabled = ['elm']
Feel free to ask if I can help clarify in any way. Thanks for a great plugin!
Assuming this solution has been effective and that this issue can be closed now.