summaryrefslogtreecommitdiff
path: root/lua/bee/format.lua
diff options
context:
space:
mode:
authorbeeb5k <beebeeb5k@gmail.com>2026-06-05 16:20:33 +0530
committerbeeb5k <beebeeb5k@gmail.com>2026-06-05 16:20:33 +0530
commit511492f6e1ab66957a37aaccffe748bb0f8e3d65 (patch)
treed7341b26db8d627fd339ea6f494fb83b8d62c760 /lua/bee/format.lua
parentfe1c8a1c340903de0d44a1f3bc590b426f1d3810 (diff)
formamt files and perf improvements
Diffstat (limited to 'lua/bee/format.lua')
-rw-r--r--lua/bee/format.lua64
1 files changed, 32 insertions, 32 deletions
diff --git a/lua/bee/format.lua b/lua/bee/format.lua
index c8d1214..5a123a4 100644
--- a/lua/bee/format.lua
+++ b/lua/bee/format.lua
@@ -1,35 +1,35 @@
return {
- "conform.nvim",
- auto_enable = true,
- event = "FileType",
- keys = {
- { "<leader>lf", desc = "[F]ormat [F]ile" },
- },
- after = function(_)
- local conform = require("conform")
- conform.setup({
- format_on_save = {
- timeout_ms = 1000,
- lsp_format = "fallback",
- quiet = true,
- },
- formatters_by_ft = {
- lua = { "stylua" },
- nix = { "nixfmt" },
- c = { "clang_format" },
- cpp = { "clang_format" },
- cmake = { "cmake_format" },
- -- Use a sub-list to run only the first available formatter
- javascript = { { "prettierd", "prettier" } },
- },
- })
+ "conform.nvim",
+ auto_enable = true,
+ event = "FileType",
+ keys = {
+ { "<leader>lf", desc = "[F]ormat [F]ile" },
+ },
+ after = function(_)
+ local conform = require("conform")
+ conform.setup({
+ format_on_save = {
+ timeout_ms = 1000,
+ lsp_format = "fallback",
+ quiet = true,
+ },
+ formatters_by_ft = {
+ lua = { "stylua" },
+ nix = { "nixfmt" },
+ c = { "clang_format" },
+ cpp = { "clang_format" },
+ cmake = { "cmake_format" },
+ -- Use a sub-list to run only the first available formatter
+ javascript = { { "prettierd", "prettier" } },
+ },
+ })
- vim.keymap.set({ "n", "v" }, "<leader>lf", function()
- conform.format({
- lsp_fallback = true,
- async = false,
- timeout_ms = 1000,
- })
- end, { desc = "[L]anguage [F]ormat" })
- end,
+ vim.keymap.set({ "n", "v" }, "<leader>lf", function()
+ conform.format({
+ lsp_fallback = true,
+ async = false,
+ timeout_ms = 1000,
+ })
+ end, { desc = "[L]anguage [F]ormat" })
+ end,
}