49 lines
1.3 KiB
Lua
49 lines
1.3 KiB
Lua
vim.g.loaded_netrw = 1
|
|
vim.g.loaded_netrwPlugin = 1
|
|
|
|
vim.g.mapleader = ","
|
|
vim.g.maplocalleader = ",,"
|
|
|
|
vim.opt.encoding = "utf-8"
|
|
vim.opt.nu = true
|
|
vim.opt.relativenumber = true
|
|
vim.opt.expandtab = false
|
|
vim.opt.numberwidth = 1
|
|
vim.opt.tabstop = 4
|
|
vim.opt.shiftwidth = 4
|
|
vim.opt.termguicolors = true
|
|
vim.opt.splitbelow = true
|
|
vim.opt.splitright = true
|
|
vim.opt.confirm = true
|
|
vim.opt.ignorecase = true
|
|
vim.opt.smartcase = true
|
|
vim.opt.listchars = "tab:│ "
|
|
vim.opt.list = true
|
|
vim.opt.undofile = true
|
|
vim.opt.undodir = os.getenv("HOME").."/.local/nvim/undo"
|
|
vim.opt.hidden = true
|
|
-- vim.opt.formatoptions-=cro
|
|
vim.opt.foldmethod = "indent"
|
|
vim.opt.foldlevelstart = 20
|
|
vim.opt.swapfile = false
|
|
-- vim.opt.omnifunc=syntaxcomplete#Complete
|
|
-- vim.opt.completeopt+=preview
|
|
vim.opt.cmdheight = 2
|
|
vim.opt.updatetime = 300
|
|
vim.opt.mouse = ""
|
|
|
|
|
|
vim.cmd([[
|
|
autocmd BufRead,BufNewFile * set autoindent noexpandtab tabstop=4 shiftwidth=4
|
|
]])
|
|
|
|
vim.api.nvim_create_augroup("CaddyFileType", { clear = true })
|
|
vim.api.nvim_create_autocmd({ "BufNewFile", "BufRead" }, {
|
|
pattern = "/etc/caddy/conf.d/*",
|
|
callback = function()
|
|
vim.opt_local.filetype = "caddyfile"
|
|
end,
|
|
group = "CaddyFileType",
|
|
})
|
|
|
|
|