dotfiles/nvim/options.lua

42 lines
929 B
Lua
Raw Normal View History

2023-11-01 16:27:35 +01:00
vim.opt.termguicolors = true
vim.opt.clipboard = 'unnamed,unnamedplus'
vim.opt.timeoutlen = 300
vim.opt.mouse = 'a'
vim.opt.listchars = 'tab:▸ ,extends:,precedes:'
vim.opt.swapfile = false
vim.opt.backup = false
vim.opt.undodir = vim.fn.expand('~/.cache/vim/undo')
vim.opt.undofile = true
vim.opt.number = true
vim.opt.relativenumber = true
vim.opt.list = true
vim.opt.wrap = false
vim.opt.scrolloff = 8
vim.opt.autoindent = true
vim.opt.expandtab = true
vim.opt.softtabstop = 4
vim.opt.shiftwidth = 4
vim.opt.tabstop = 4
vim.opt.smartindent = true
vim.opt.modeline = true
vim.opt.spell = true
vim.g.mapleader = ' '
vim.opt.hlsearch = false
vim.opt.incsearch = true
vim.opt.signcolumn = 'yes'
vim.opt.updatetime = 50
vim.opt.completeopt = { 'menuone', 'noselect', 'noinsert' }
vim.opt.shortmess = vim.opt.shortmess + { c = true }
-- Autoformat on save
vim.cmd [[autocmd BufWritePre * lua vim.lsp.buf.format()]]