andreyorst / plug.kak

Plugin manager for Kakoune
MIT License
197 stars 18 forks source link

Plug: comment clause #116

Closed mralusw closed 3 years ago

mralusw commented 3 years ago

This PR adds support for a comment clause, which ignores its next arg. This is quite useful when reconfiguring / debugging / testing (e.g. to disable / enable load-path, just wrap it in comment %{load-path ... }); but possibly also for documentation purposes.

There's also support for plug-chain accepting an initial plug parameter (actually, any empty plug clauses). This allows a more uniform grammar, which I think you've endorsed in our previous discussions:

plug-chain \
  plug URL1 ... \
  plug URL2 ... \
  # end plug-chain
mralusw commented 3 years ago

I should explain a bit more — commenting out parts of a long command is tricky, because once you introduce a # comment in the command, you can't really continue it:

command \ # comment
# ^^ the \ must occur at EOL

command # comment \
# ^^ the \ is part of the comment
andreyorst commented 3 years ago

Seems like a good feature, just needs a bit of documenting in the readme.

mralusw commented 3 years ago

Ok, if you like the idea, I'll add to the Readme

mralusw commented 3 years ago

I've rebased on master, and mentioned the changes in the README; luckily the whole branch seems not to conflict with your reverse-domain-grouping work.

andreyorst commented 3 years ago

Thanks!