gustavo-hms / peneira

A fuzzy finder crafted for Kakoune
GNU Lesser General Public License v2.1
35 stars 6 forks source link

readme: fix module name #3

Closed kkga closed 3 years ago

kkga commented 3 years ago

Looks like the require-module command in README is referencing peneira name, while it's defined as peneira-core.

gustavo-hms commented 3 years ago

Hi, @kkga ! Thanks for your contribution!

Well, actually there is a peneira module, so the README is not incorrect.

What happens is that I decided to split the code of the plugin in 2 files: peneira.kak, containing the definition of the peneira command, and filters.kak, containing the definition of the built-in filters shipped with the plugin. Those filters use the peneira command and some options defined in peneira.kak.

This imposes a dependency problem: since there are two kak files, if I put them in the autoload directory, Kakoune can source them in any order, and it may happen that it sources filters.kak before peneira.kak. That's why I wrapped everything in peneira.kak inside the peneira-core module: that way I can require it inside filters.kak, solving the dependency problem.

Since peneira-core is required inside the peneira module, requiring the latter automatically requires the former. So, peneira-core is more of an implementation detail, not meant to be required manually by the user.

But thank you for trying to fix it instead of just pointing the problem.