jay-babu / mason-null-ls.nvim

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

feat: always setup handlers #64

Closed ghost closed 1 year ago

ghost commented 1 year ago

Previously, the suggested config didn't cause any null-ls sources to be configured as intended. Technically this is a fix, but it may break a couple users by restoring the intended behavior.

also:

I removed the remaining references to automatic_setup, since it has no effect now. I'm not 100% sure why the second setup had automatic_setup=false but it's now updated it to actually have no automatic setup. Previously it had no automatic setup, but for the wrong reason -- automatic_setup was entirely ignored.

jay-babu commented 1 year ago

setup handlers is an opt in feature, so this won't be merged

bukzor commented 1 year ago

setup handlers is an opt in feature, so this won't be merged

That's not actually true, currently. Since #59, the automatic_setup = true line shown in the README does nothing. Note that nothing reads that variable:

$ git grep automatic_setup
CHANGELOG.md:* removing `setup_handlers` function. automatic_setup is now implicitly true. ([#59](https://github.com/jay-babu/mason-null-ls.nvim/issues/59))
README.md:    automatic_setup = true,
lua/mason-null-ls/init.lua:M.default_setup = require('mason-null-ls.automatic_setup')

To get the default handlers to activate, I currently have to setup({handlers = {}}). Is that intended?

jay-babu commented 1 year ago

Yes, that is intended. #59, what I meant was before you needed to do both automatic_setup and call setup_handlers. now you only need to do setup({handlers = {}}). only configure it in one place