aboutsummaryrefslogtreecommitdiff
path: root/nvim/lua/plugins/none-ls.lua
blob: fd283797cff62c3381f85047524f947a6e9d674c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
-- ripped from https://www.lazyvim.org/extras/lsp/none-ls
return {
  "nvimtools/none-ls.nvim",
  opts = function(_, opts)
    local nls = require("null-ls")
    opts.root_dir = opts.root_dir
      or require("null-ls.utils").root_pattern(".null-ls-root", ".neoconf.json", "Makefile", ".git")
    opts.sources = vim.list_extend(opts.sources or {}, {
      nls.builtins.formatting.stylua,
      nls.builtins.formatting.alejandra,
      nls.builtins.formatting.prettier,
    })
  end,
}