updated formatting

This commit is contained in:
2024-11-01 14:22:50 -04:00
parent f171a9b77e
commit e1cc00c19a
5 changed files with 81 additions and 73 deletions
+5 -6
View File
@@ -1,11 +1,10 @@
return {
"stevearc/conform.nvim",
event = { "BufReadPre", "BufNewFile" },
config = function()
local conform = require("conform")
local conform = require "conform"
conform.setup({
conform.setup {
formatters_by_ft = {
javascript = { "prettier" },
typescript = { "prettier" },
@@ -27,14 +26,14 @@ return {
async = false,
timeout_ms = 1000,
},
})
}
vim.keymap.set({ "n", "v" }, "<leader>mp", function()
conform.format({
conform.format {
lsp_fallback = true,
async = false,
timeout_ms = 1000,
})
}
end, { desc = "Format file or range (in visual mode)" })
end,
}