I am trying to run this code but lua keeps giving me errors. The package exists at the specified location. Here is the code – thanks!:
package.path = package.path .. ';C:/Users/xyz/AppData/Roaming/luarocks/share/lua/5.4/?.lua;C:/Users/xyz/AppData/Roaming/luarocks/share/lua/5.4/?/init.lua'
package.cpath = package.cpath .. ';C:/Users/xyz/AppData/Roaming/luarocks/lib/lua/5.4/?.so'
-- Require the modules using their module names
local npairs = require('nvim-autopairs')
local Rule = require('nvim-autopairs.rule')
local cond = require('nvim-autopairs.conds')
-- Setup nvim-autopairs
npairs.setup({})
-- Add custom rules
npairs.add_rules({
Rule("$", "$", "tex")
:with_move(cond.after_text("$"))
:with_move(cond.before_text("$")),
Rule("$$", "$$", "tex")
:with_move(cond.after_text("$$"))
:with_move(cond.before_text("$$"))
})