feat(nvim): soft-wrap prose buffers
This commit is contained in:
@@ -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)
|
||||
|
||||
@@ -92,6 +92,18 @@ in
|
||||
action = "<cmd>nohlsearch<CR>";
|
||||
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 = "<leader>e";
|
||||
|
||||
Reference in New Issue
Block a user