Skip to content

Commit

Permalink
Fix failing config for conform.nvim 🐛
Browse files Browse the repository at this point in the history
  • Loading branch information
scottmckendry committed Dec 11, 2023
1 parent 4a9e589 commit afff697
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions nvim/lua/plugins/conform.lua
Original file line number Diff line number Diff line change
Expand Up @@ -54,12 +54,14 @@ return {
})

-- Override stylua's default indent type
table.insert(require("conform.formatters.stylua").args, "--indent-type")
table.insert(require("conform.formatters.stylua").args, "Spaces")
require("conform").formatters.stylua = {
prepend_args = { "--indent-type", "Spaces" },
}

-- Override prettier's default indent type
table.insert(require("conform.formatters.prettier").args, "--tab-width")
table.insert(require("conform.formatters.prettier").args, "4")
require("conform").formatters.prettier = {
args = { "--tab-width", "4" },
}

-- Toggle format on save
vim.api.nvim_create_user_command("ConformToggle", function()
Expand Down

0 comments on commit afff697

Please sign in to comment.