cvigilv / esqueleto.nvim

Reduce your boilerplate code the lazy-bones way
MIT License
98 stars 7 forks source link

feat(autouse): auto-use skeleton if there is only one for given filetype #21

Closed Amar1729 closed 1 year ago

Amar1729 commented 1 year ago

If there's only one skeleton found for a given filetype, bypass the selection dialog and automatically use that template.

Let me know if I've done anything wrong with the preferred format for this PR. Thanks for writing this plugin!

cvigilv commented 1 year ago

Thanks for the pull request, would it be possible if you bind it to a user setting? This way one can configure if you want this behavior or not.

If not, I'll tackle it on Monday and add it to this PE.

Thanks again! This is a no brained add on that I didn't think of

cvigilv commented 1 year ago

@Amar1729 I merged your PR and added a user option called "autouse" to opt-out of this behavior. Thanks for your contribution!

Amar1729 commented 1 year ago

No problem! Sorry I missed this during the week.