From f7164dd1723b9d348fe3718648b40b9e992c60c5 Mon Sep 17 00:00:00 2001 From: alexion Date: Sat, 29 Aug 2026 21:30:11 -0400 Subject: [PATCH] feat(nvim): soft-wrap prose buffers --- modules/shell/nvim/config.lua | 10 ++++++++++ modules/shell/nvim/default.nix | 12 ++++++++++++ 2 files changed, 22 insertions(+) diff --git a/modules/shell/nvim/config.lua b/modules/shell/nvim/config.lua index af5fd01..e157a7f 100644 --- a/modules/shell/nvim/config.lua +++ b/modules/shell/nvim/config.lua @@ -16,6 +16,16 @@ vim.api.nvim_create_autocmd("FileType", { end, }) +-- Soft-wrap prose buffers without inserting line breaks. +vim.api.nvim_create_autocmd("FileType", { + pattern = { "gitcommit", "markdown", "text" }, + callback = function() + vim.opt_local.wrap = true + vim.opt_local.linebreak = true + vim.opt_local.breakindent = true + end, +}) + -- Turn line blame off again once the Neogit status buffer is closed. vim.api.nvim_create_autocmd("BufUnload", { callback = function(args) diff --git a/modules/shell/nvim/default.nix b/modules/shell/nvim/default.nix index fdcb34d..c396574 100644 --- a/modules/shell/nvim/default.nix +++ b/modules/shell/nvim/default.nix @@ -92,6 +92,18 @@ in action = "nohlsearch"; options.desc = "Clear search highlight"; } + { + mode = "n"; + key = "j"; + action = "gj"; + options.desc = "Move down by display line"; + } + { + mode = "n"; + key = "k"; + action = "gk"; + options.desc = "Move up by display line"; + } { mode = "n"; key = "e";