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