feat(nvim): soft-wrap prose buffers
This commit is contained in:
@@ -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)
|
||||||
|
|||||||
@@ -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";
|
||||||
|
|||||||
Reference in New Issue
Block a user