mirror of
https://github.com/kristoferssolo/SoloVim.git
synced 2025-10-21 20:10:41 +00:00
56 lines
1.3 KiB
Lua
56 lines
1.3 KiB
Lua
local null_ls_status_ok, null_ls = pcall(require, "null-ls")
|
|
if not null_ls_status_ok then
|
|
return
|
|
end
|
|
|
|
local mason_null_ls_status_ok, mason_null_ls = pcall(require, "mason-null-ls")
|
|
if not mason_null_ls_status_ok then
|
|
return
|
|
end
|
|
|
|
-- https://github.com/jose-elias-alvarez/null-ls.nvim/tree/main/lua/null-ls/builtins/formatting
|
|
local formatting = null_ls.builtins.formatting
|
|
-- https://github.com/jose-elias-alvarez/null-ls.nvim/tree/main/lua/null-ls/builtins/diagnostics
|
|
local diagnostics = null_ls.builtins.diagnostics
|
|
|
|
-- https://github.com/prettier-solidity/prettier-plugin-solidity
|
|
null_ls.setup({
|
|
debug = false,
|
|
sources = {
|
|
formatting.prettier.with({
|
|
extra_filetypes = { "toml" },
|
|
extra_args = { "--no-semi", "--single-quote", "--jsx-single-quote", "--no-bracket-spacing" },
|
|
}),
|
|
formatting.autopep8,
|
|
formatting.stylua,
|
|
formatting.beautysh,
|
|
formatting.djlint,
|
|
formatting.tidy,
|
|
diagnostics.cpplint,
|
|
diagnostics.luacheck,
|
|
diagnostics.pylint,
|
|
diagnostics.mypy,
|
|
diagnostics.zsh,
|
|
},
|
|
})
|
|
|
|
mason_null_ls.setup({
|
|
ensure_installed = {
|
|
"autopep8",
|
|
"beautysh",
|
|
"djlint",
|
|
"shfmt",
|
|
"yamlfmt",
|
|
"codespell",
|
|
"cpplint",
|
|
"luacheck",
|
|
"misspell",
|
|
"pylint",
|
|
"mypy",
|
|
"html_lint",
|
|
"gitlint",
|
|
},
|
|
automatic_installation = true,
|
|
automatic_setup = true,
|
|
})
|