From acf3e9cf09761514301dd6ba6f97978cf4ca5587 Mon Sep 17 00:00:00 2001 From: Aotrix Date: Mon, 24 Feb 2025 14:18:08 +0100 Subject: added autoformater --- lua/aotrix/plugins/autoformat.lua | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) create mode 100644 lua/aotrix/plugins/autoformat.lua diff --git a/lua/aotrix/plugins/autoformat.lua b/lua/aotrix/plugins/autoformat.lua new file mode 100644 index 0000000..4dec682 --- /dev/null +++ b/lua/aotrix/plugins/autoformat.lua @@ -0,0 +1,16 @@ +return { + "stevearc/conform.nvim", + opts = { + notify_on_error = false, + format_on_save = { + timeout_ms = 500, + lsp_fallback = true, + }, + formatters_by_ft = { + lua = { "lua-format" }, + python = { "black", "pyink" }, + cpp = { "clang-format" }, + cmake = { "cmake_format" }, + }, + } +} -- cgit v1.2.3