reworked options

This commit is contained in:
Oliver Hartmann 2022-04-20 21:54:55 +02:00
parent 4fbe1c4174
commit 5dde3be206

View File

@ -1,35 +1,50 @@
local utils = require('utils')
vim.cmd('syntax enable')
vim.cmd('filetype plugin indent on')
vim.cmd('language en_US.utf-8')
utils.opt('o', 'hlsearch', true)
utils.opt('o', 'guifont', 'JetBrainsMono Nerd Font:h9')
utils.opt('o', 'swapfile', false)
utils.opt('o', 'backup', false)
utils.opt('o', 'spelllang', 'en,de')
utils.opt('o', 'completeopt', 'menu,menuone,noselect')
local opt = vim.opt
local indent = 2
utils.opt('b', 'expandtab', true)
utils.opt('b', 'shiftwidth', indent)
utils.opt('b', 'smartindent', true)
utils.opt('b', 'tabstop', indent)
utils.opt('o', 'hidden', true)
utils.opt('o', 'ignorecase', true)
utils.opt('o', 'scrolloff', 4)
utils.opt('o', 'shiftround', true)
utils.opt('o', 'relativenumber', false)
utils.opt('o', 'smartcase', true)
utils.opt('o', 'splitbelow', true)
utils.opt('o', 'splitright', true)
utils.opt('o', 'wildmode', 'longest:full,full')
utils.opt('w', 'number', true)
utils.opt('o', 'clipboard', 'unnamed,unnamedplus')
utils.opt('o', 'mouse', 'a')
utils.opt('o', 'wrap', false)
utils.opt('o', 'termguicolors', true)
utils.opt('o', 'splitbelow', true)
utils.opt('o', 'splitright', true)
utils.opt('o', 'list', true)
utils.opt('o', 'updatetime', 300)
utils.opt('o', 'wrap', true)
utils.opt('o', 'showmatch', true)
opt.termguicolors = true -- Enable colors in terminal
opt.hlsearch = true --Set highlight on search
opt.number = true --Make line numbers default
opt.relativenumber = false --Make relative number default
opt.mouse = 'a' --Enable mouse mode
opt.breakindent = true --Enable break indent
opt.undofile = true --Save undo history
opt.ignorecase = true --Case insensitive searching unless /C or capital in search
opt.smartcase = true -- Smart case
opt.updatetime = 300 --Decrease update time
opt.signcolumn = 'yes' -- Always show sign column
opt.clipboard = 'unnamed,unnamedplus' -- Access system clipboard
opt.timeoutlen = 300 -- Time in milliseconds to wait for a mapped sequence to complete.
opt.showmode = false -- Do not need to show the mode. We use the statusline instead.
opt.scrolloff = 999 -- Lines of context
opt.joinspaces = false -- No double spaces with join after a dot
opt.showmatch = true -- Show matching braces
opt.wrap = true -- When on, lines longer than the width of the window will wrap and displaying continues on the next line
opt.list = true
opt.hidden= true
opt.scrolloff= 4
opt.shiftround= true
opt.relativenumber= false
opt.splitbelow= true
opt.splitright= true
opt.wildmode= 'longest:full,full'
opt.wrap= false
opt.splitbelow= true
opt.splitright= true
opt.shiftwidth = indent
opt.tabstop = indent
opt.guifont= 'JetBrainsMono Nerd Font:h9'
opt.swapfile= false
opt.backup= false
opt.spelllang= 'en,de'
opt.completeopt= 'menu,menuone,noselect'
opt.expandtab= true
opt.smartindent= true
-- go to previous/next line with h,l,left arrow and right arrow
-- when cursor reaches end/beginning of line
-- opt.whichwrap:append('<>[]hl')
-- disable nvim intro
opt.shortmess:append('sI')