Files
dotfiles/nvim/lua/tracer/options.lua
2026-03-31 23:13:00 +02:00

52 lines
1.3 KiB
Lua

local opt = vim.opt
opt.number = true
opt.cursorline = true
opt.ignorecase = true
opt.laststatus = 2
opt.termguicolors = true
opt.autoread = true
opt.mouse = "a"
opt.clipboard:append("unnamedplus")
opt.expandtab = true
opt.shiftwidth = 4
opt.tabstop = 4
opt.softtabstop = 4
opt.smartindent = true
opt.wrap = false
opt.wildmode = "longest:full,full"
opt.title = true
opt.signcolumn = 'yes:1'
vim.cmd.colorscheme("slate")
local normalfloat_hl = vim.api.nvim_get_hl(0, { name = "NormalFloat", link = false })
if normalfloat_hl.bg then
vim.api.nvim_set_hl(0, "FloatBorder", {
fg = normalfloat_hl.bg,
bg = normalfloat_hl.bg,
})
end
local cursorline_hl = vim.api.nvim_get_hl(0, { name = "CursorLine", link = false })
if cursorline_hl.bg then
vim.api.nvim_set_hl(0, "CursorLineBg", {
fg = cursorline_hl.bg,
bg = cursorline_hl.bg,
})
end
local autoread_group = vim.api.nvim_create_augroup("tracer_autoread", { clear = true })
vim.api.nvim_create_autocmd({ "FocusGained", "TermClose", "TermLeave", "BufEnter" }, {
group = autoread_group,
command = "checktime",
})
vim.api.nvim_create_autocmd("FileChangedShellPost", {
group = autoread_group,
callback = function()
vim.notify("File changed on disk. Buffer reloaded.", vim.log.levels.INFO)
end,
})