added rst specific indentation

This commit is contained in:
Thies Lennart Alff 2023-09-26 11:32:46 +02:00
parent c0d17922f9
commit e0a2da2991

View file

@ -14,7 +14,7 @@ vim.opt.smartindent = true
vim.opt.wrap = false
vim.api.nvim_create_autocmd("FileTYpe", {
vim.api.nvim_create_autocmd("FileType", {
pattern = "cpp",
callback = function()
vim.opt_local.shiftwidth = 2
@ -27,3 +27,15 @@ vim.opt.signcolumn = 'yes'
vim.opt.updatetime = 500
vim.opt.colorcolumn = '80'
vim.api.nvim_create_autocmd('FileType', {
pattern = 'rst',
callback = function()
vim.opt.wrap = true -- softwrap the text
vim.opt.linebreak = true -- do not break in the middle of words
-- rst uses 3 space indents
vim.opt.tabstop = 3
vim.opt.softtabstop = 3
vim.opt.shiftwidth = 3
vim.opt.expandtab = true
end
})