dotfiles/.config/nvim/lua/plugins/null-ls.lua

27 lines
699 B
Lua
Raw Normal View History

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,
builtins.diagnostics.buf.with({
args = { "lint", "--disable-symlinks", "--path", "$FILENAME" },
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-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,
})