-- Customize None-ls sources ---@type LazySpec return { "nvimtools/none-ls.nvim", opts = function(_, opts) local null_ls = require "null-ls" local h = require "null-ls.helpers" -- Format JSON and Markdown with prettierd local prettierd = null_ls.builtins.formatting.prettierd.with { filetypes = { "json", "jsonc", "markdown" }, } -- Align CSV columns with the `column` coreutil local csv_column = h.make_builtin({ name = "csv_column", meta = { description = "Align CSV columns using the `column` coreutil", }, method = null_ls.methods.FORMATTING, filetypes = { "csv" }, generator_opts = { command = "column", args = { "-t", "-s," }, to_stdin = true, }, factory = h.formatter_factory, }) opts.sources = require("astrocore").list_insert_unique(opts.sources, { null_ls.builtins.formatting.nixfmt, prettierd, csv_column, }) end, }