I’m trying to run Fennel scripts in Vim 8.1 using the fennel-nvim plugin. (Fennel is a language that basically lets you write Lua with LISP syntax; you can use it from any Lua-supporting application by dropping in a single Lua file.) The fennel-nvim package is obviously written with Neovim in mind, but I thought maybe it would be simple enough to get it working with Vim anyway.
I’m using the vim-plug plugin manager. When I add the line
Plug 'jaawerth/fennel-nvim' to my vimrc, I get the following error when starting Vim:
Error detected while processing /home/bdesham/.vim/plugged/fennel-nvim/plugin/fnl.vim: line 1: [string "vim chunk"]:1: module 'patch_searcher' not found: ^Ino field package.preload['patch_searcher'] ^Ino file '/usr/share/lua/5.2/patch_searcher.lua' ^Ino file '/usr/share/lua/5.2/patch_searcher/init.lua' ^Ino file '/usr/lib/lua/5.2/patch_searcher.lua' ^Ino file '/usr/lib/lua/5.2/patch_searcher/init.lua' ^Ino file './patch_searcher.lua' ^Ino file '/usr/lib/lua/5.2/patch_searcher.so' ^Ino file '/usr/lib/lua/5.2/loadall.so' ^Ino file './patch_searcher.so' Press ENTER or type command to continue
The offending line is the first line of
The plugin does come with a file called patch_searcher.lua:
fennel-nvim ├── FENNEL-LICENSE ├── .gitignore ├── LICENSE ├── lua │ ├── fennel.lua │ ├── fennelview.lua │ └── patch_searcher.lua ├── plugin │ └── fnl.vim └── README.md
It seems like I might be able to get this plugin to work with Vim if I can tell the embedded Lua interpreter to add this directory to its “search path,” or whatever this is called in Lua. How can I go about doing that?