From f9abbcc7939552b31e5bcde72a3a1246df92f4b1 Mon Sep 17 00:00:00 2001 From: Thomas Schmucker Date: Fri, 14 Aug 2026 08:58:19 +0200 Subject: neovim: Füge Unterstützung für Jinja2 Templates hinzu MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- nvim/lua/plugins/format.lua | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'nvim/lua/plugins/format.lua') 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 @@ -- Verfügbare Formater: https://github.com/stevearc/conform.nvim/tree/master/lua/conform/formatters local clang = {} +local djlint = { "djlint" } -- brew install djlint (macOS); unter Windows kein winget-Paket, siehe neovim-windows-setup.md local gawk = { "gawk" } -- brew install gawk, pkg install gawk local jq = { "jq" } -- brew install jq, pkg install jq local prettier = { "prettier" } -- npm install -g prettier @@ -30,6 +31,7 @@ return { cpp = clang, html = prettier, javascript = prettier, + jinja = djlint, json = jq, lua = stylua, python = ruff, @@ -39,6 +41,13 @@ return { xsd = xmllint, yaml = yamlfmt, }, + formatters = { + djlint = { + -- https://www.djlint.com/docs/getting-started/#template-languages + -- Ansible verwendet Jinja2-Templates. + append_args = { "--profile", "jinja" }, + }, + }, default_format_opts = { lsp_format = "fallback", }, -- cgit v1.3