2026-03-17 20:43:35 +01:00
|
|
|
local opt = vim.opt
|
|
|
|
|
vim.g.mapleader = " "
|
|
|
|
|
vim.g.maplocalleader = "\\"
|
|
|
|
|
opt.number = true
|
|
|
|
|
opt.relativenumber = true
|
2026-03-20 11:34:59 +01:00
|
|
|
|
2026-03-17 20:43:35 +01:00
|
|
|
opt.cursorline = true
|
|
|
|
|
opt.termguicolors = true
|
2026-03-25 10:48:29 +01:00
|
|
|
opt.winborder = "rounded"
|
2026-03-17 20:43:35 +01:00
|
|
|
opt.signcolumn = "yes"
|
|
|
|
|
vim.lsp.inlay_hint.enable = true
|
|
|
|
|
opt.tabstop = 8
|
|
|
|
|
vim.opt.expandtab = true
|
2026-03-25 10:48:29 +01:00
|
|
|
vim.g.tinted_background_transparent = 1
|
2026-03-17 20:43:35 +01:00
|
|
|
|
|
|
|
|
opt.shiftwidth = 8
|
|
|
|
|
vim.diagnostic.config({
|
|
|
|
|
virtual_text = {
|
2026-03-23 10:20:36 +01:00
|
|
|
spacing = 4,
|
2026-03-17 20:43:35 +01:00
|
|
|
source = true,
|
|
|
|
|
},
|
|
|
|
|
})
|
2026-03-01 18:53:20 +01:00
|
|
|
require("config.lazy")
|
|
|
|
|
require("config.keymaps")
|
2026-03-27 17:15:29 +01:00
|
|
|
local default_theme = "base16-oceanicnext"
|
|
|
|
|
|
|
|
|
|
local function get_tinty_theme()
|
|
|
|
|
local theme_name = vim.fn.system("cat ~/.local/share/tinted-theming/tinty/current_scheme")
|
|
|
|
|
|
|
|
|
|
if vim.v.shell_error ~= 0 then
|
|
|
|
|
return default_theme
|
|
|
|
|
else
|
|
|
|
|
return vim.trim(theme_name)
|
|
|
|
|
end
|
|
|
|
|
end
|
|
|
|
|
|
|
|
|
|
local function handle_focus_gained()
|
|
|
|
|
local new_theme_name = get_tinty_theme()
|
|
|
|
|
local current_theme_name = vim.g.colors_name
|
|
|
|
|
|
|
|
|
|
if current_theme_name ~= new_theme_name then
|
|
|
|
|
vim.cmd("colorscheme " .. new_theme_name)
|
|
|
|
|
end
|
|
|
|
|
end
|
|
|
|
|
|
|
|
|
|
local function main()
|
|
|
|
|
vim.o.termguicolors = true
|
|
|
|
|
vim.g.tinted_colorspace = 256
|
|
|
|
|
local current_theme_name = get_tinty_theme()
|
|
|
|
|
|
|
|
|
|
vim.cmd("colorscheme " .. current_theme_name)
|
|
|
|
|
|
|
|
|
|
vim.api.nvim_create_autocmd("FocusGained", {
|
|
|
|
|
callback = handle_focus_gained,
|
|
|
|
|
})
|
|
|
|
|
end
|
|
|
|
|
|
|
|
|
|
main()
|