aboutsummaryrefslogtreecommitdiff
path: root/nvim/lua/plugins
diff options
context:
space:
mode:
authorThomas Schmucker <ts@its1.de>2026-07-06 11:05:54 +0200
committerThomas Schmucker <ts@its1.de>2026-07-06 11:05:54 +0200
commit3340a4f427b6d7e7edd8e5ddeb9ce589467c0a93 (patch)
tree0394b6f5a98ccf9e69562bba545abc8cd625b92f /nvim/lua/plugins
parente6c7b9a8fd4c7d640cedd24be0b3d170063400c6 (diff)
downloaddotfiles-3340a4f427b6d7e7edd8e5ddeb9ce589467c0a93.tar.gz
dotfiles-3340a4f427b6d7e7edd8e5ddeb9ce589467c0a93.tar.bz2
dotfiles-3340a4f427b6d7e7edd8e5ddeb9ce589467c0a93.zip
conform.nvim: Formatter vereinheitlicht
Diffstat (limited to 'nvim/lua/plugins')
-rw-r--r--nvim/lua/plugins/format.lua40
1 files changed, 26 insertions, 14 deletions
diff --git a/nvim/lua/plugins/format.lua b/nvim/lua/plugins/format.lua
index f80ee2d..561db8b 100644
--- a/nvim/lua/plugins/format.lua
+++ b/nvim/lua/plugins/format.lua
@@ -1,3 +1,15 @@
1-- Verfügbare Formater: https://github.com/stevearc/conform.nvim/tree/master/lua/conform/formatters
2
3local clang = {}
4local gawk = { "gawk" } -- brew install gawk, pkg install gawk
5local jq = { "jq" } -- brew install jq, pkg install jq
6local prettier = { "prettier " } -- npm install -g prettier
7local ruff = { "ruff_format" } -- brew install ruff, pkg install ruff
8local shfmt = { "shfmt" } -- brew install shfmt, pkg install shfmt
9local stylua = { "stylua" } -- brew install stylua, pkg install stylua
10local xmllint = { "xmllint" } -- xmllint ist Teil von libxml2 (standardmäßig installiert unter MacOS; pkg install libxml2)
11local yamlfmt = { "yamlfmt" } -- brew install yamlfmt, pkg install yamlfmt
12
1return { 13return {
2 "stevearc/conform.nvim", 14 "stevearc/conform.nvim",
3 event = { "BufReadPre", "BufNewFile" }, 15 event = { "BufReadPre", "BufNewFile" },
@@ -12,20 +24,20 @@ return {
12 }, 24 },
13 opts = { 25 opts = {
14 formatters_by_ft = { 26 formatters_by_ft = {
15 awk = { "gawk" }, -- brew install gawk, pkg install gawk 27 awk = gawk,
16 bash = { "shfmt" }, -- brew install shfmt, pkg install shfmt 28 bash = shfmt,
17 c = {}, -- clangd 29 c = clang,
18 cpp = {}, -- clangd 30 cpp = clang,
19 html = { "prettier" }, -- (siehe "typescript") 31 html = prettier,
20 javascript = { "prettier" }, -- (siehe "typescript") 32 javascript = prettier,
21 json = { "jq" }, -- brew install jq, pkg install jq 33 json = jq,
22 lua = { "stylua" }, -- brew install stylua, pkg install stylua 34 lua = stylua,
23 python = { "ruff_format" }, -- brew install ruff, pkg install ruff 35 python = ruff,
24 sh = { "shfmt" }, -- brew install, pkg install shfmt 36 sh = shfmt,
25 typescript = { "prettier" }, -- npm install -g prettier 37 typescript = prettier,
26 xml = { "xmllint" }, -- xmllint ist Teil von libxml2 (standardmäßig installiert unter MacOS; pkg install libxml2) 38 xml = xmllint,
27 xsd = { "xmllint" }, 39 xsd = xmllint,
28 yaml = { "yamlfmt" }, -- brew install yamlfmt, pkg install yamlfmt 40 yaml = yamlfmt,
29 }, 41 },
30 default_format_opts = { 42 default_format_opts = {
31 lsp_format = "fallback", 43 lsp_format = "fallback",