58 lines
1.0 KiB
Lua
58 lines
1.0 KiB
Lua
local present, null_ls = pcall(require, "null-ls")
|
|
|
|
if not present then
|
|
return
|
|
end
|
|
|
|
local b = null_ls.builtins
|
|
|
|
local sources = {
|
|
|
|
-- webdev stuff
|
|
b.formatting.deno_fmt,
|
|
b.formatting.prettier,
|
|
b.code_actions.eslint_d,
|
|
|
|
-- python stuff
|
|
b.diagnostics.pylint,
|
|
b.formatting.reorder_python_imports,
|
|
b.formatting.black,
|
|
|
|
-- Lua
|
|
b.formatting.stylua,
|
|
|
|
-- Shell
|
|
b.formatting.shfmt,
|
|
b.diagnostics.shellcheck.with { diagnostics_format = "#{m} [#{c}]" },
|
|
|
|
-- psql
|
|
b.formatting.sqlfluff.with {
|
|
extra_args = { "--dialect", "postgres" },
|
|
},
|
|
b.diagnostics.sqlfluff.with {
|
|
extra_args = { "--dialect", "postgres" },
|
|
},
|
|
|
|
-- Generic
|
|
-- b.formatting.remark,
|
|
-- b.diagnostics.semgrep,
|
|
b.code_actions.refactoring,
|
|
b.diagnostics.yamllint,
|
|
|
|
-- golang
|
|
b.diagnostics.golangci_lint,
|
|
b.formatting.gofmt,
|
|
b.formatting.goimports,
|
|
b.formatting.goimports_reviser,
|
|
b.formatting.protolint,
|
|
|
|
-- bazel
|
|
b.diagnostics.buildifier,
|
|
b.formatting.buildifier,
|
|
}
|
|
|
|
null_ls.setup {
|
|
debug = true,
|
|
sources = sources,
|
|
}
|