2023-03-26 18:27:41 +02:00
|
|
|
vim.g.mapleader = " "
|
|
|
|
vim.g.maplocalleader = ","
|
|
|
|
|
|
|
|
vim.opt.autoindent = true
|
2023-09-25 18:29:29 +02:00
|
|
|
vim.opt.backupdir = { vim.fn.stdpath("state") .. "/backup/" } -- don't store backup in files dir
|
2023-03-26 18:27:41 +02:00
|
|
|
vim.opt.clipboard = "unnamedplus" -- sync with system clipboard
|
|
|
|
vim.opt.conceallevel = 2
|
|
|
|
vim.opt.expandtab = true -- spaces instead of tabs
|
|
|
|
vim.opt.ignorecase = true
|
|
|
|
vim.opt.mouse = "a" -- mouse for all modes
|
|
|
|
vim.opt.number = true
|
|
|
|
vim.opt.relativenumber = true
|
|
|
|
vim.opt.scrolloff = 4 -- lines of context
|
|
|
|
vim.opt.shiftround = true -- round indent
|
|
|
|
vim.opt.shiftwidth = 0 -- use tabstop value
|
|
|
|
vim.opt.shortmess:append({ c = true })
|
|
|
|
vim.opt.signcolumn = "yes"
|
|
|
|
vim.opt.smartcase = true
|
|
|
|
vim.opt.splitbelow = true
|
|
|
|
vim.opt.splitright = true
|
|
|
|
vim.opt.tabstop = 2
|
|
|
|
vim.opt.termguicolors = true
|
|
|
|
vim.opt.undofile = true
|
|
|
|
vim.opt.undolevels = 10000
|
|
|
|
vim.opt.updatetime = 300
|
2024-09-01 22:05:20 +02:00
|
|
|
vim.opt.foldlevel = 99
|
2023-03-26 18:27:41 +02:00
|
|
|
vim.opt_local.spell = true
|
|
|
|
vim.opt_local.spelllang = { "en", "de_20" } -- all English regions and new German spelling
|
|
|
|
|
2024-01-16 12:34:34 +01:00
|
|
|
-- Abbreviations for common typos
|
|
|
|
vim.cmd("cnoreabbrev W! w!")
|
|
|
|
vim.cmd("cnoreabbrev Q! q!")
|
|
|
|
vim.cmd("cnoreabbrev Qall! qall!")
|
|
|
|
vim.cmd("cnoreabbrev Wq wq")
|
|
|
|
vim.cmd("cnoreabbrev Wa wa")
|
|
|
|
vim.cmd("cnoreabbrev wQ wq")
|
|
|
|
vim.cmd("cnoreabbrev WQ wq")
|
|
|
|
vim.cmd("cnoreabbrev W w")
|
|
|
|
vim.cmd("cnoreabbrev Q q")
|
|
|
|
|
2023-03-26 18:27:41 +02:00
|
|
|
if vim.g.neovide then
|
|
|
|
vim.opt.guifont = "Fira Code Nerd Font:h10"
|
|
|
|
vim.g.neovide_scale_factor = 0.7
|
|
|
|
end
|