From bf2e74265ca4aebc779e55338d4d06f3286a84f3 Mon Sep 17 00:00:00 2001 From: Marty Oehme Date: Mon, 25 Sep 2023 19:54:38 +0200 Subject: [PATCH] nvim: Auto format prose soft with word-linebreaks Automatically set formatting mode to soft for markdown, text and asciidoc files. Also automatically format on startup (no lazy-loading), and thus have nicely word-ending linebreaks (a word will not just be cut off wherever the line is over but will be fully moved to the next line instead). --- nvim/.config/nvim/lua/plugins/prose.lua | 2 ++ 1 file changed, 2 insertions(+) diff --git a/nvim/.config/nvim/lua/plugins/prose.lua b/nvim/.config/nvim/lua/plugins/prose.lua index 695a6c1..9654baa 100644 --- a/nvim/.config/nvim/lua/plugins/prose.lua +++ b/nvim/.config/nvim/lua/plugins/prose.lua @@ -12,8 +12,10 @@ return { require("wrapping").setup({ create_keymappings = false, notify_on_switch = false, + softener = { markdown = true, text = true, asciidoc = true } }) end, + lazy = false }, -- displays prettier headlines mimicking the ones in emacs orgmode {