blob: ee6d8593e3b52a168421ab3a83b63be73026cd02 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
|
-- Formatter
-- https://github.com/nvimtools/none-ls.nvim
-- Press '=' to format highlighted code
return {
"nvimtools/none-ls.nvim",
config = function()
local null_ls = require("null-ls")
null_ls.setup({
sources = {
-- Formatting
null_ls.builtins.formatting.black,
--
-- Diagnostics
-- null_ls.builtins.diagnostics.<package>,
--
-- Completion
-- null_ls.builtins.completion.<package>,
}
})
vim.api.nvim_create_user_command(
"Format",
function()
vim.lsp.buf.format()
end,
{}
)
end
}
|