Newer
Older
nvim-config / lua / plugins / none-ls.lua
return {
  "nvimtools/none-ls.nvim",
  dependencies = {          -- NEW ◀─ pulls in the extra sources
    "nvimtools/none-ls-extras.nvim",
  },

  config = function ()
    local null_ls = require("null-ls")

    null_ls.setup({
      sources = {
        -- Beautysh now lives in none-ls-extras
        require("none-ls.formatting.beautysh"),

        -- the regular built-ins still work the same way
        null_ls.builtins.formatting.black,
        null_ls.builtins.formatting.stylua,
      },
    })

    -- optional: make the keymap async so it doesn't block the UI
    vim.keymap.set("n", "<leader>fb", function()
      vim.lsp.buf.format({ async = true })
    end, {})
  end,
}