From 24c9878ee7d4eb60cac54e7e26276df3d5f676a0 Mon Sep 17 00:00:00 2001 From: Ryan Cavicchioni Date: Sun, 13 Oct 2024 18:46:54 -0500 Subject: [PATCH] Configure conform key binding --- .config/nvim/lua/plugins/conform.lua | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/.config/nvim/lua/plugins/conform.lua b/.config/nvim/lua/plugins/conform.lua index ec1bab1..82264b0 100644 --- a/.config/nvim/lua/plugins/conform.lua +++ b/.config/nvim/lua/plugins/conform.lua @@ -1,5 +1,18 @@ return { "stevearc/conform.nvim", + event = { "BufWritePre" }, + cmd = { "ConformInfo" }, + keys = { + { + "f", + + function() + require("conform").format({ async = true }) + end, + mode = "", + desc = "Format buffer", + }, + }, opts = { formatters_by_ft = { lua = { "stylua" },