camspiers / snap

A fast finder system for neovim.
The Unlicense
487 stars 16 forks source link

Two requests for the README. #36

Closed zetashift closed 3 years ago

zetashift commented 3 years ago

Hiya! It's quite hard to get started with snap as an absolute beginner, it requires a lot of shifting through dotfiles, even though the readme is great, it's quite technical. I saw a reddit comment on your second thread that noted something similiar so that's why I'm making this issue.

Maybe it's better to have a concrete config usage sample in either the Demo or Installation section?

local snap = require'snap'
snap.register.map({"n"}, {"<Leader>f"}, function ()
    snap.run {
      producer = snap.get'consumer.fzy'(snap.get'producer.ripgrep.file'),
      select = snap.get'select.file'.select,
      multiselect = snap.get'select.file'.multiselect
    }
end)

Or how it's used here: https://github.com/akinsho/dotfiles/blob/main/.config/nvim/lua/as/plugins/init.lua#L154

~Also imo, it would be nice to explain what a consumer and a producer exactly are, the README explains very well how to use them but as a beginner I'm still kind of confused what they exactly are.~

EDIT: also very very minor but components is misspelled here https://github.com/camspiers/snap#semi-optional-dependencies EDIT2: of course I can make a PR if you like!

camspiers commented 3 years ago

Great feedback, there are a variety of new APIs that aren't properly documented, and there needs to be a better getting setup story. I will do a pass over the documentation soon. Thanks!

camspiers commented 3 years ago

@zetashift I've updated the readme let me know what you think.

zetashift commented 3 years ago

It's great! Thanks for all the great work :D, snap is awesome.