2017-10-01 3 views
3

Je reçois ce message d'erreur: Unknown function: elm#FindRootDirectory Lorsque j'ouvre un fichier elm au sein de neovim. J'utilise ElmCast/elm-vim comme plugin pour écrire du code elm.Fonction inconnue: elm # FindRootDirectory

Je sais que je pourrais simplement supprimer ce plugin mais je veux l'utiliser. Par ailleurs, j'ai compris que je ne pouvais pas utiliser les commandes de ElmCast/elm-vim comme :ElmFormat par exemple même si elles sont suggérées dans le menu wild, mais la coloration syntaxique de ce plugin fonctionne.

J'ai installé le plug-in via vim-bouchon:

call plug#begin('~/.vim/vim-plug-plugins') 
     Plug 'elmcast/elm-vim' 
call plug#end() 

J'ai aussi couru :PlugUpdate et :PlugUpgrade plusieurs fois.

neovim CheckHealth dit ceci:

health#deoplete#check 
======================================================================== 
## deoplete.nvim 
    - SUCCESS: has("nvim") was successful 
    - SUCCESS: has("python3") was successful 
    - INFO: If you're still having problems, try the following commands: 
    $ export NVIM_PYTHON_LOG_FILE=/tmp/log 
    $ export NVIM_PYTHON_LOG_LEVEL=DEBUG 
    $ nvim 
    $ cat /tmp/log_{PID} 
    and then create an issue on github 

health#nvim#check 
======================================================================== 
## Configuration 
    - SUCCESS: no issues found 

## Performance 
    - SUCCESS: Build type: Release 

## Remote Plugins 
    - SUCCESS: Up to date 

## terminal 
    - INFO: key_backspace (kbs) terminfo entry: key_backspace=^H 
    - INFO: key_dc (kdch1) terminfo entry: key_dc=\E[3~ 

## tmux 
    - SUCCESS: escape-time: 10ms 
    - INFO: $TERM: screen-256color 

health#provider#check 
======================================================================== 
## Clipboard (optional) 
    - SUCCESS: Clipboard tool found: xsel 

## Python 2 provider (optional) 
    - INFO: `g:python_host_prog` is not set. Searching for python2 in the environment. 
    - INFO: Executable: /usr/bin/python2 
    - INFO: Python2 version: 2.7.14 
    - INFO: python2-neovim version: 0.1.13 
    - SUCCESS: Latest python2-neovim is installed: 0.1.13 

## Python 3 provider (optional) 
    - INFO: `g:python3_host_prog` is not set. Searching for python3 in the environment. 
    - INFO: Executable: /usr/bin/python3 
    - INFO: Python3 version: 3.6.2 
    - INFO: python3-neovim version: 0.1.13 
    - SUCCESS: Latest python3-neovim is installed: 0.1.13 

## Ruby provider (optional) 
    - INFO: Ruby: ruby 2.4.2p198 (2017-09-14 revision 59899) [x86_64-linux] 
    - WARNING: Missing "neovim" gem. 
    - SUGGESTIONS: 
     - Run in shell: gem install neovim 
     - Is the gem bin directory in $PATH? Check `gem environment`. 
     - If you are using rvm/rbenv/chruby, try "rehashing". 
+0

Utilisez le suivi des problèmes du plugin. – romainl

Répondre

4

J'ai découvert que l'ordre de chargement des plugins est le problème. J'utilise aussi vim-polyglot.

Lors du premier chargement vim-polyglot avant elmcast/elm-vim il en résulte l'erreur mentionnée.

Si je charge d'abord elmcast/elm-vim avant vim-polyglot cela fonctionne comme avant.

+0

génial, merci. – arcseldon

+0

Je ne comprends pas pourquoi c'est la réponse recommandée depuis 'vim-polyglot' _includes_' ElmCast/elm-vim'. Si vous utilisez le premier, ne devriez-vous pas supprimer ce dernier de votre '.vimrc'? C'est l'approche que j'ai suivie, et je n'ai remarqué aucune conséquence. – hkgumbs

0

Il semble que vous n'avez pas autoload/elm.vim dans votre chemin d'exécution.

Comment avez-vous installé le plugin?

Je vous recommande d'utiliser quelque chose comme vim-plug pour le gérer.

+0

J'ai mis à jour la question pour mentionner que j'utilise déjà vim-plug. – mstruebing