feat(nvim): soft-wrap prose buffers

This commit is contained in:
2026-08-29 21:30:11 -04:00
parent 81a729ea06
commit f7164dd172
2 changed files with 22 additions and 0 deletions

View File

@@ -16,6 +16,16 @@ vim.api.nvim_create_autocmd("FileType", {
end, 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. -- Turn line blame off again once the Neogit status buffer is closed.
vim.api.nvim_create_autocmd("BufUnload", { vim.api.nvim_create_autocmd("BufUnload", {
callback = function(args) callback = function(args)

View File

@@ -92,6 +92,18 @@ in
action = "<cmd>nohlsearch<CR>"; action = "<cmd>nohlsearch<CR>";
options.desc = "Clear search highlight"; 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"; mode = "n";
key = "<leader>e"; key = "<leader>e";