Squashed 'config/nvim/' content from commit 0bd687c

git-subtree-dir: config/nvim
git-subtree-split: 0bd687c8b69605fa1c7c88222354158b1c2de2f8
This commit is contained in:
neoteny 2021-11-28 22:27:34 +02:00
commit f4858d42a8
36 changed files with 906 additions and 0 deletions

38
lua/lsp/null.lua Normal file
View file

@ -0,0 +1,38 @@
local M = {}
function M.setup()
local null_ls = require "null-ls"
local fmt = null_ls.builtins.formatting
local lint = null_ls.builtins.diagnostics
null_ls.config {
sources = {
-- Lua
fmt.stylua,
lint.selene,
-- Golang
fmt.gofumpt,
fmt.goimports,
-- JavaScirpt
fmt.prettierd,
lint.eslint_d,
-- Shell
fmt.shfmt,
lint.shellcheck,
-- Python
fmt.black,
fmt.isort,
lint.flake8,
-- Rust
fmt.rustfmt,
},
}
end
return M