someone-stole-my-name / yaml-companion.nvim

Get, set and autodetect YAML schemas in your buffers.
MIT License
221 stars 17 forks source link

Adding custom matchers #33

Closed ghost closed 1 year ago

ghost commented 1 year ago

Hi,

Thank you for the plugin. I will try it.

Could you give an example of how to add custom matchers by calling custom lua function.

If I see correctly there are two builtin matchers and for all else schema needs to be selected manualy via Telesope plugin.

BR,

someone-stole-my-name commented 1 year ago

The API is subject to change, as of right now all you have to do is call require("yaml-companion").load_matcher("X") where X is a module that has the match and handles functions, example here. You can check here the code that loads the matchers.