jay-babu / mason-null-ls.nvim

GNU Affero General Public License v3.0
549 stars 22 forks source link

Is `setup_handlers()` deprecated? #57

Closed UtkarshVerma closed 1 year ago

UtkarshVerma commented 1 year ago

If it's deprecated, then what is the alternative?

jay-babu commented 1 year ago

Yes, it is deprecated. The new way is to move them to the setup function under the handlers key. I will update the docs later.

See relevant commit https://github.com/jay-babu/mason-null-ls.nvim/commit/35ce897a8c924b37c0f4ea8789ade6205e347591

jay-babu commented 1 year ago

https://github.com/jay-babu/mason-null-ls.nvim/tree/2.0#handlers-usage

2.0 is in the works

UtkarshVerma commented 1 year ago

Thanks could you also add a case where handlers not being defined in the opts is equivalent to empty handlers? This would look better in the config avoiding the need of handlers = {} which looks as if it does nothing.

jay-babu commented 1 year ago

no, it is not the same. nil means do not run handlers

UtkarshVerma commented 1 year ago

I would suggest disabling the handlers be a bit explicit. Something like handlers = false. Anyhow, this is just my suggestion as a user and you would know better.

oyarsa commented 1 year ago

@jay-babu, did you deprecate the function in 1.2 because it will work differently in 2.0? If so, should we keep using setup_handlers until 2.0 is out, or is there a workaround?

jay-babu commented 1 year ago

@jay-babu, did you deprecate the function in 1.2 because it will work differently in 2.0? If so, should we keep using setup_handlers until 2.0 is out, or is there a workaround?

https://github.com/jay-babu/mason-null-ls.nvim/issues/57#issuecomment-1495271330

jay-babu commented 1 year ago

https://github.com/jay-babu/mason-null-ls.nvim/releases/tag/v2.0.0

asmodeus812 commented 1 year ago

I just love it when breaking api changes like that are made willy-nilly.