added rst specific indentation
This commit is contained in:
parent
c0d17922f9
commit
e0a2da2991
1 changed files with 13 additions and 1 deletions
|
|
@ -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
|
||||
})
|
||||
|
|
|
|||
Loading…
Reference in a new issue