From 1f2dad0be57a20bca63b251d0b22c57839a6f794 Mon Sep 17 00:00:00 2001 From: Thomas Schmucker Date: Thu, 8 Jan 2026 17:25:42 +0100 Subject: Neovim: Benutze conform.nvim als Standard-Formater --- nvim/lua/plugins/format.lua | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) create mode 100644 nvim/lua/plugins/format.lua (limited to 'nvim/lua/plugins/format.lua') diff --git a/nvim/lua/plugins/format.lua b/nvim/lua/plugins/format.lua new file mode 100644 index 0000000..bdfaf03 --- /dev/null +++ b/nvim/lua/plugins/format.lua @@ -0,0 +1,20 @@ +return { + "stevearc/conform.nvim", + event = { "BufReadPre", "BufNewFile" }, + opts = { + formatters_by_ft = { + sh = { "shfmt" }, -- brew install + bash = { "shfmt" }, + python = { "ruff_format", "black" }, -- brew install ruff + lua = { "stylua" }, -- brew install stylua + typescript = { "prettierd", "prettier" }, + javascript = { "prettierd", "prettier" }, + json = { "jq" }, -- brew install jq + -- cpp = { "clang_format" }, + }, + }, + + config = function(_, opts) + require("conform").setup(opts) + end, +} -- cgit v1.3