diff --git a/nvim/lua/settings/lazy/plugins/conform.lua b/nvim/lua/settings/lazy/plugins/conform.lua index f5a6e74..635aaba 100644 --- a/nvim/lua/settings/lazy/plugins/conform.lua +++ b/nvim/lua/settings/lazy/plugins/conform.lua @@ -7,4 +7,22 @@ return { php = { "phpcbf" } }, }, + init = function() + local whichKey = require("which-key"); + local conform = require("conform") + + whichKey.register({ + ["f"] = { + name = "Format", + f = { + function() + local currentFileBufferNumber = vim.fn.bufnr("%") + + conform.format({ bufnr = currentFileBufferNumber }) + end, + "Format the current file" + } + } + }) + end, }