Hello! I am new to neovim and to fennel. I am experimenting with basic configuration with fennel. I got some basic config to work with aniseed but am now struggling to replicate something while using nfnl. After looking through https://github.com/rafaeldelboni/cajus-nfnl/tree/main as an example I tried the following only to get an error
(local {: autoload} (require :nfnl.module))
(local nvim (autoload :nvim))
(local core (autoload :nfnl.core))
(set nvim.g.maplocalleader ",")
error:
/Users/davidgonsalves/.vim/plugged/nfnl/lua/nfnl/module.lua:11: module 'nvim' not found:
no field package.preload['nvim']
no file './nvim.lua'
no file '/opt/homebrew/share/luajit-2.1/nvim.lua'
no file '/usr/local/share/lua/5.1/nvim.lua'
no file '/usr/local/share/lua/5.1/nvim/init.lua'
no file '/opt/homebrew/share/lua/5.1/nvim.lua'
no file '/opt/homebrew/share/lua/5.1/nvim/init.lua'
no file './nvim.so'
no file '/usr/local/lib/lua/5.1/nvim.so'
no file '/opt/homebrew/lib/lua/5.1/nvim.so'
no file '/usr/local/lib/lua/5.1/loadall.so'
Can anyone help me out?so that evaluates without error but it doesn't do anything
Hey good call, I've removed the norcalli/nvim.lua caju's dependency based on this conversation
Thanks ❤️
Thanks @rafaeldelboni!!! I have been learning a lot from cajus-nfnl and your dotfile repository! I have been really enjoying configuring neovim with fennel and I could not have done it without some of your examples.
It looks like cajus is using https://github.com/norcalli/nvim.lua which provides the nvim module, although there's no need to as most of it was merged into neovim already under the vim module as @/fuad mentions.
So your above code could probably be:
(local {: autoload} (require :nfnl.module))
(local core (autoload :nfnl.core))
(set vim.g.mapleader ",")Ah, I forgot the argument in my example facepalm