dotfiles/.config/nvim/lua/lennartalff/set.lua

41 lines
918 B
Lua

-- vim.opt.guicursor = ''
-- line numbers
vim.opt.nu = true
vim.opt.relativenumber = true
-- default indentation
vim.opt.tabstop = 4
vim.opt.softtabstop = 4
vim.opt.shiftwidth = 4
vim.opt.expandtab = true
vim.opt.smartindent = true
vim.opt.wrap = false
vim.api.nvim_create_autocmd("FileType", {
pattern = "cpp",
callback = function()
vim.opt_local.shiftwidth = 2
vim.opt_local.tabstop = 2
end
})
vim.opt.scrolloff = 8
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
})