add user_config

This commit is contained in:
siduck76
2021-08-12 17:28:03 +05:30
parent d5c64d335e
commit 0efa21c9c9
10 changed files with 253 additions and 84 deletions

View File

@@ -1,20 +1,21 @@
local options = require("chadrc").options
local opt = vim.opt
local g = vim.g
opt.undofile = true
opt.ruler = false
opt.hidden = true
opt.ignorecase = true
opt.undofile = options.permanent_undo
opt.ruler = options.ruler
opt.hidden = options.hidden
opt.ignorecase = options.ignorecase
opt.splitbelow = true
opt.splitright = true
opt.termguicolors = true
opt.cul = true
opt.mouse = "a"
opt.mouse = options.mouse
opt.signcolumn = "yes"
opt.cmdheight = 1
opt.updatetime = 250 -- update interval for gitsigns
opt.timeoutlen = 400
opt.clipboard = "unnamedplus"
opt.cmdheight = options.cmdheight
opt.updatetime = options.updatetime -- update interval for gitsigns
opt.timeoutlen = options.timeoutlen
opt.clipboard = options.clipboard
-- disable nvim intro
opt.shortmess:append("sI")
@@ -23,21 +24,21 @@ opt.shortmess:append("sI")
opt.fillchars = {eob = " "}
-- Numbers
opt.number = true
opt.numberwidth = 2
opt.number = options.number
opt.numberwidth = options.numberwidth
-- opt.relativenumber = true
-- Indenline
opt.expandtab = true
opt.shiftwidth = 2
opt.smartindent = true
opt.expandtab = options.expandtab
opt.shiftwidth = options.shiftwidth
opt.smartindent = options.smartindent
-- go to previous/next line with h,l,left arrow and right arrow
-- when cursor reaches end/beginning of line
opt.whichwrap:append("<>hl")
g.mapleader = " "
g.auto_save = false
g.mapleader = options.mapleader
g.auto_save = options.autosave
-- disable builtin vim plugins
local disabled_built_ins = {
@@ -62,7 +63,7 @@ local disabled_built_ins = {
}
for _, plugin in pairs(disabled_built_ins) do
vim.g["loaded_" .. plugin] = 1
g["loaded_" .. plugin] = 1
end
-- Don't show status line on vim terminals