2022-03-09 19:44:21 +01:00
|
|
|
local lspconfig = require("my.plugins.lspconfig")
|
|
|
|
|
2022-02-22 21:52:01 +01:00
|
|
|
local M = {}
|
|
|
|
|
|
|
|
function M.setup()
|
2022-02-23 14:52:27 +01:00
|
|
|
local null_ls = require("null-ls")
|
|
|
|
|
|
|
|
local sources = {
|
2022-03-13 15:16:19 +01:00
|
|
|
null_ls.builtins.formatting.prettierd.with({
|
|
|
|
extra_filetypes = {"markdown"}
|
|
|
|
}), -- format ts files
|
|
|
|
null_ls.builtins.formatting.lua_format -- format lua code
|
2022-02-23 14:52:27 +01:00
|
|
|
}
|
|
|
|
|
2022-03-09 19:44:21 +01:00
|
|
|
null_ls.setup({sources = sources, on_attach = lspconfig.on_attach})
|
2022-02-22 21:52:01 +01:00
|
|
|
end
|
|
|
|
|
|
|
|
return M
|