diff options
Diffstat (limited to 'nvim/lua/plugins/format.lua')
| -rw-r--r-- | nvim/lua/plugins/format.lua | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/nvim/lua/plugins/format.lua b/nvim/lua/plugins/format.lua index 8ca7f1b..686de60 100644 --- a/nvim/lua/plugins/format.lua +++ b/nvim/lua/plugins/format.lua | |||
| @@ -1,6 +1,7 @@ | |||
| 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 djlint = { "djlint" } -- brew install djlint (macOS); unter Windows kein winget-Paket, siehe neovim-windows-setup.md | ||
| 4 | local gawk = { "gawk" } -- brew install gawk, pkg install gawk | 5 | local gawk = { "gawk" } -- brew install gawk, pkg install gawk |
| 5 | local jq = { "jq" } -- brew install jq, pkg install jq | 6 | local jq = { "jq" } -- brew install jq, pkg install jq |
| 6 | local prettier = { "prettier" } -- npm install -g prettier | 7 | local prettier = { "prettier" } -- npm install -g prettier |
| @@ -30,6 +31,7 @@ return { | |||
| 30 | cpp = clang, | 31 | cpp = clang, |
| 31 | html = prettier, | 32 | html = prettier, |
| 32 | javascript = prettier, | 33 | javascript = prettier, |
| 34 | jinja = djlint, | ||
| 33 | json = jq, | 35 | json = jq, |
| 34 | lua = stylua, | 36 | lua = stylua, |
| 35 | python = ruff, | 37 | python = ruff, |
| @@ -39,6 +41,13 @@ return { | |||
| 39 | xsd = xmllint, | 41 | xsd = xmllint, |
| 40 | yaml = yamlfmt, | 42 | yaml = yamlfmt, |
| 41 | }, | 43 | }, |
| 44 | formatters = { | ||
| 45 | djlint = { | ||
| 46 | -- https://www.djlint.com/docs/getting-started/#template-languages | ||
| 47 | -- Ansible verwendet Jinja2-Templates. | ||
| 48 | append_args = { "--profile", "jinja" }, | ||
| 49 | }, | ||
| 50 | }, | ||
| 42 | default_format_opts = { | 51 | default_format_opts = { |
| 43 | lsp_format = "fallback", | 52 | lsp_format = "fallback", |
| 44 | }, | 53 | }, |
