aboutsummaryrefslogtreecommitdiff
path: root/nvim/lua/plugins/format.lua
diff options
context:
space:
mode:
authorThomas Schmucker <ts@its1.de>2026-01-08 17:25:42 +0100
committerThomas Schmucker <ts@its1.de>2026-01-08 17:25:42 +0100
commit1f2dad0be57a20bca63b251d0b22c57839a6f794 (patch)
tree56844c50cfc60b54b5a8b886113de3e95b551f5e /nvim/lua/plugins/format.lua
parentcab771e6d1cc578e956f8bd9e3544cd0502b65a9 (diff)
downloaddotfiles-1f2dad0be57a20bca63b251d0b22c57839a6f794.tar.gz
dotfiles-1f2dad0be57a20bca63b251d0b22c57839a6f794.tar.bz2
dotfiles-1f2dad0be57a20bca63b251d0b22c57839a6f794.zip
Neovim: Benutze conform.nvim als Standard-Formater
Diffstat (limited to 'nvim/lua/plugins/format.lua')
-rw-r--r--nvim/lua/plugins/format.lua20
1 files changed, 20 insertions, 0 deletions
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 @@
1return {
2 "stevearc/conform.nvim",
3 event = { "BufReadPre", "BufNewFile" },
4 opts = {
5 formatters_by_ft = {
6 sh = { "shfmt" }, -- brew install
7 bash = { "shfmt" },
8 python = { "ruff_format", "black" }, -- brew install ruff
9 lua = { "stylua" }, -- brew install stylua
10 typescript = { "prettierd", "prettier" },
11 javascript = { "prettierd", "prettier" },
12 json = { "jq" }, -- brew install jq
13 -- cpp = { "clang_format" },
14 },
15 },
16
17 config = function(_, opts)
18 require("conform").setup(opts)
19 end,
20}