nvim: run buf lint from discovered buf root if found
This commit is contained in:
parent
45be9f2ae2
commit
c620a3bc08
1 changed files with 7 additions and 0 deletions
|
@ -10,6 +10,13 @@ null_ls.setup({
|
||||||
builtins.completion.spell,
|
builtins.completion.spell,
|
||||||
builtins.diagnostics.buf.with({
|
builtins.diagnostics.buf.with({
|
||||||
args = { "lint", "--disable-symlinks", "--path", "$FILENAME" },
|
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,
|
||||||
}),
|
}),
|
||||||
builtins.diagnostics.buildifier,
|
builtins.diagnostics.buildifier,
|
||||||
builtins.diagnostics.cue_fmt,
|
builtins.diagnostics.cue_fmt,
|
||||||
|
|
Loading…
Reference in a new issue