2026-03-17 20:43:35 +01:00
|
|
|
local opt = vim.opt
|
|
|
|
|
vim.g.mapleader = " "
|
|
|
|
|
vim.g.maplocalleader = "\\"
|
|
|
|
|
opt.number = true
|
|
|
|
|
opt.relativenumber = true
|
|
|
|
|
opt.cursorline = true
|
|
|
|
|
opt.termguicolors = true
|
|
|
|
|
opt.winborder = "single"
|
|
|
|
|
opt.signcolumn = "yes"
|
|
|
|
|
vim.lsp.inlay_hint.enable = true
|
|
|
|
|
opt.tabstop = 8
|
|
|
|
|
vim.opt.expandtab = true
|
|
|
|
|
|
|
|
|
|
opt.shiftwidth = 8
|
|
|
|
|
vim.diagnostic.config({
|
|
|
|
|
virtual_text = {
|
|
|
|
|
spacing = 2,
|
|
|
|
|
source = true,
|
|
|
|
|
},
|
|
|
|
|
})
|
2026-03-01 18:53:20 +01:00
|
|
|
require("config.options")
|
|
|
|
|
require("config.lazy")
|
|
|
|
|
require("config.keymaps")
|
2026-03-17 20:43:35 +01:00
|
|
|
local theme_script_path = vim.fn.expand("~/.local/share/tinted-theming/tinty/base16-vim-colors-file.vim")
|
|
|
|
|
|
|
|
|
|
local function file_exists(file_path)
|
|
|
|
|
return vim.fn.filereadable(file_path) == 1 and true or false
|
|
|
|
|
end
|
|
|
|
|
|
|
|
|
|
local function handle_focus_gained()
|
|
|
|
|
if file_exists(theme_script_path) then
|
|
|
|
|
vim.cmd("source " .. theme_script_path)
|
|
|
|
|
end
|
|
|
|
|
end
|
|
|
|
|
|
|
|
|
|
if file_exists(theme_script_path) then
|
|
|
|
|
vim.o.termguicolors = true
|
|
|
|
|
vim.g.tinted_colorspace = 256
|
|
|
|
|
|
|
|
|
|
vim.cmd("source " .. theme_script_path)
|
|
|
|
|
|
|
|
|
|
vim.api.nvim_create_autocmd("FocusGained", {
|
|
|
|
|
callback = handle_focus_gained,
|
|
|
|
|
})
|
|
|
|
|
end
|