diff options
| author | Thomas Schmucker <ts@its1.de> | 2026-08-12 09:19:03 +0200 |
|---|---|---|
| committer | Thomas Schmucker <ts@its1.de> | 2026-08-12 09:19:03 +0200 |
| commit | 6e5882a2fd02d30206ab9ca8aa5847b8ea09196c (patch) | |
| tree | 75d3b91f9005e51b93a37b44f3ad23ce4f48bc35 /nvim/lua/plugins/format.lua | |
| parent | 41c676453cd32fac760ff26e092c9dc81874739f (diff) | |
| download | dotfiles-6e5882a2fd02d30206ab9ca8aa5847b8ea09196c.tar.gz dotfiles-6e5882a2fd02d30206ab9ca8aa5847b8ea09196c.tar.bz2 dotfiles-6e5882a2fd02d30206ab9ca8aa5847b8ea09196c.zip | |
Normalize line endings
Diffstat (limited to 'nvim/lua/plugins/format.lua')
| -rw-r--r-- | nvim/lua/plugins/format.lua | 92 |
1 files changed, 46 insertions, 46 deletions
diff --git a/nvim/lua/plugins/format.lua b/nvim/lua/plugins/format.lua index 8ca7f1b..102326c 100644 --- a/nvim/lua/plugins/format.lua +++ b/nvim/lua/plugins/format.lua | |||
| @@ -1,46 +1,46 @@ | |||
| 1 | -- Verfügbare Formater: https://github.com/stevearc/conform.nvim/tree/master/lua/conform/formatters | 1 | -- Verfügbare Formater: https://github.com/stevearc/conform.nvim/tree/master/lua/conform/formatters |
| 2 | 2 | ||
| 3 | local clang = {} | 3 | local clang = {} |
| 4 | local gawk = { "gawk" } -- brew install gawk, pkg install gawk | 4 | local gawk = { "gawk" } -- brew install gawk, pkg install gawk |
| 5 | local jq = { "jq" } -- brew install jq, pkg install jq | 5 | local jq = { "jq" } -- brew install jq, pkg install jq |
| 6 | local prettier = { "prettier" } -- npm install -g prettier | 6 | local prettier = { "prettier" } -- npm install -g prettier |
| 7 | local ruff = { "ruff_format" } -- brew install ruff, pkg install ruff | 7 | local ruff = { "ruff_format" } -- brew install ruff, pkg install ruff |
| 8 | local shfmt = { "shfmt" } -- brew install shfmt, pkg install shfmt | 8 | local shfmt = { "shfmt" } -- brew install shfmt, pkg install shfmt |
| 9 | local stylua = { "stylua" } -- brew install stylua, pkg install stylua | 9 | local stylua = { "stylua" } -- brew install stylua, pkg install stylua |
| 10 | local xmllint = { "xmllint" } -- xmllint ist Teil von libxml2 (standardmäßig installiert unter MacOS; pkg install libxml2) | 10 | local xmllint = { "xmllint" } -- xmllint ist Teil von libxml2 (standardmäßig installiert unter MacOS; pkg install libxml2) |
| 11 | local yamlfmt = { "yamlfmt" } -- brew install yamlfmt, pkg install yamlfmt | 11 | local yamlfmt = { "yamlfmt" } -- brew install yamlfmt, pkg install yamlfmt |
| 12 | 12 | ||
| 13 | return { | 13 | return { |
| 14 | "stevearc/conform.nvim", | 14 | "stevearc/conform.nvim", |
| 15 | event = { "BufReadPre", "BufNewFile" }, | 15 | event = { "BufReadPre", "BufNewFile" }, |
| 16 | keys = { | 16 | keys = { |
| 17 | { | 17 | { |
| 18 | "<leader>cf", | 18 | "<leader>cf", |
| 19 | function() | 19 | function() |
| 20 | require("conform").format({ async = true }) | 20 | require("conform").format({ async = true }) |
| 21 | end, | 21 | end, |
| 22 | desc = "Format file", | 22 | desc = "Format file", |
| 23 | }, | 23 | }, |
| 24 | }, | 24 | }, |
| 25 | opts = { | 25 | opts = { |
| 26 | formatters_by_ft = { | 26 | formatters_by_ft = { |
| 27 | awk = gawk, | 27 | awk = gawk, |
| 28 | bash = shfmt, | 28 | bash = shfmt, |
| 29 | c = clang, | 29 | c = clang, |
| 30 | cpp = clang, | 30 | cpp = clang, |
| 31 | html = prettier, | 31 | html = prettier, |
| 32 | javascript = prettier, | 32 | javascript = prettier, |
| 33 | json = jq, | 33 | json = jq, |
| 34 | lua = stylua, | 34 | lua = stylua, |
| 35 | python = ruff, | 35 | python = ruff, |
| 36 | sh = shfmt, | 36 | sh = shfmt, |
| 37 | typescript = prettier, | 37 | typescript = prettier, |
| 38 | xml = xmllint, | 38 | xml = xmllint, |
| 39 | xsd = xmllint, | 39 | xsd = xmllint, |
| 40 | yaml = yamlfmt, | 40 | yaml = yamlfmt, |
| 41 | }, | 41 | }, |
| 42 | default_format_opts = { | 42 | default_format_opts = { |
| 43 | lsp_format = "fallback", | 43 | lsp_format = "fallback", |
| 44 | }, | 44 | }, |
| 45 | }, | 45 | }, |
| 46 | } | 46 | } |
