diff options
| author | Trey Bastian <hello@treybastian.com> | 2025-10-29 11:52:37 +0000 |
|---|---|---|
| committer | Trey Bastian <hello@treybastian.com> | 2025-10-29 11:52:37 +0000 |
| commit | 019a93697352f442edfbf7b12abcaa0ff4293cfd (patch) | |
| tree | 357523f499c13438cc61300f1812b4215a526cb1 /lua/config/conform.lua | |
new and improved nvim config
Diffstat (limited to 'lua/config/conform.lua')
| -rw-r--r-- | lua/config/conform.lua | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/lua/config/conform.lua b/lua/config/conform.lua new file mode 100644 index 0000000..c581bdb --- /dev/null +++ b/lua/config/conform.lua @@ -0,0 +1,21 @@ +local vim = vim +vim.pack.add({ + "https://github.com/stevearc/conform.nvim", +}) + +vim.keymap.set("n", "<leader>bf", function() + require("conform").format({ + async = true, + lsp_format = "fallback", + }) +end) + +require("conform").setup({ + formatters_by_ft = { + lua = { "stylua" }, -- os package manager stylua + }, + format_on_save = { + timeout_ms = 1001, + lsp_format = "fallback", + }, +}) |
