2022-03-24 14:51:10 +01:00
|
|
|
local null_ls = require("null-ls")
|
|
|
|
local builtins = require("null-ls.builtins")
|
|
|
|
|
|
|
|
null_ls.setup({
|
|
|
|
sources = {
|
2022-08-26 10:58:31 +02:00
|
|
|
builtins.formatting.black,
|
2022-08-01 14:18:48 +02:00
|
|
|
builtins.formatting.buf,
|
2022-08-01 15:21:32 +02:00
|
|
|
builtins.formatting.cue_fmt,
|
2022-08-01 14:18:48 +02:00
|
|
|
builtins.formatting.shfmt,
|
|
|
|
builtins.formatting.buildifier,
|
|
|
|
builtins.completion.spell,
|
2022-08-04 09:16:25 +02:00
|
|
|
builtins.diagnostics.buf.with({
|
2022-08-04 09:37:02 +02:00
|
|
|
args = { "lint", "--disable-symlinks", "--path", "$FILENAME" },
|
2022-08-04 10:35:31 +02:00
|
|
|
cwd = function()
|
|
|
|
local file_dir = vim.fn.expand("%:p:h") .. ";"
|
|
|
|
local buf_yaml = vim.fn.findfile("buf.yaml", file_dir)
|
|
|
|
if buf_yaml then
|
|
|
|
return vim.fn.fnamemodify(buf_yaml, ":h")
|
|
|
|
end
|
|
|
|
end,
|
2022-08-04 09:16:25 +02:00
|
|
|
}),
|
2022-08-01 14:18:48 +02:00
|
|
|
builtins.diagnostics.buildifier,
|
2022-08-01 15:21:32 +02:00
|
|
|
builtins.diagnostics.cue_fmt,
|
2022-03-24 14:51:10 +01:00
|
|
|
},
|
|
|
|
debug = true,
|
|
|
|
})
|