nvim/lua/plugins/neoformat.lua

15 lines
339 B
Lua
Raw Normal View History

2024-02-21 04:09:18 +00:00
return {
"sbdchd/neoformat",
init = function()
2024-02-23 05:29:03 +00:00
-- Basic formatting
vim.g.neoformat_basic_format_retab = 1
vim.g.neoformat_basic_format_trim = 1
2024-02-21 04:09:18 +00:00
-- Prefer Alejandra for Nix files
vim.g.neoformat_enabled_nix = { "alejandra" }
end,
keys = {
{ "<Space>lf", "<cmd>Neoformat<CR>", desc = "Format file" },
},
}