Skip to content

Conversation

rktjmp
Copy link
Contributor

@rktjmp rktjmp commented Aug 11, 2023

When the CWD is not the panvimdoc directory, require("lib.Demojify") would fail because lua cant find the file.

We add the data-dir argument when needed, setting it to the lib folder, which contains an init.lua file. This init.lua file prepends the project root to the package.path which allows require("lib.Demojify") to succeed.

The .. is a bit awkward, you might prefer to put the init.lua in the main project root instead and alter as needed.

When the CWD is not the project root, `require("lib.Demojify")` would
fail because lua cant find the file.

We add the data-dir argument when needed, setting it to the lib
folder, which contains an init.lua file. This init.lua file prepends the
project root to the package.path which allows `require("lib.Demojify")`
to succeed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants