Add text wrap for markdown/text.

This commit is contained in:
Sebastian Bugge 2024-01-27 16:41:48 +01:00
parent c8dd316b3e
commit 41de5f27da
Signed by: kaholaz
GPG key ID: 2EFFEDEE03519691

15
lua/plugins/text.lua Normal file
View file

@ -0,0 +1,15 @@
vim.api.nvim_create_autocmd({ "FileType" }, {
pattern = { "text", "markdown" },
callback = function()
vim.opt.textwidth = 80
vim.opt.wrapmargin = 0
vim.opt.formatoptions:append("t")
vim.opt.linebreak = true
vim.opt.tabstop = 2
vim.opt.softtabstop = 2
vim.opt.shiftwidth = 2
vim.opt.expandtab = false
end,
})
return {}