formatting issues

This commit is contained in:
Solomon Laing 2023-11-07 21:31:44 +10:30
parent 253bac9d4c
commit a637f87be0

View File

@ -8,13 +8,18 @@ function M.toggle()
end end
function M.format() function M.format()
local ok, conform = pcall(require, "conform") -- TODO: work out how to call conform it it has a formatter and default
-- to vim.lsp.buf.format()
if ok then
conform.format()
else
vim.lsp.buf.format() vim.lsp.buf.format()
end
-- local ok, conform = pcall(require, "conform")
--
-- if ok then
-- conform.format()
-- else
-- vim.lsp.buf.format()
-- end
end end
function M.on_attach(client, buf) function M.on_attach(client, buf)