update: kitty, nvim and bashrc

This commit is contained in:
hhhh hgfh 2026-08-30 14:00:51 +03:00
parent a879e32d65
commit c5570614f5
63 changed files with 7768 additions and 3669 deletions

View file

@ -8,6 +8,37 @@ bufferline.setup {
icon = '▎',
style = 'icon',
},
groups = {
items = {
{
name = 'tornado',
matcher = function(buf)
return (buf.path or ""):lower():match("tornado")
end,
},
{
name = 'gornado',
matcher = function(buf)
return (buf.path or ""):lower():match("gornado")
end,
},
{
name = 'tests',
matcher = function(buf)
return (buf.name or ""):lower():match("*test*%.cpp$")
end,
},
{
name = 'code',
matcher = function(buf)
return (buf.name or ""):lower():match("%.h$")
or (buf.name or ""):lower():match("%.c$")
or (buf.name or ""):lower():match("%.cpp$")
end,
},
},
hidden = false,
},
buffer_close_icon = '󰅖',
modified_icon = '● ',
close_icon = '',
@ -17,20 +48,6 @@ bufferline.setup {
max_prefix_length = 15,
truncate_names = true,
tab_size = 18,
custom_filter = function(buf_number, buf_numbers)
if vim.bo[buf_number].filetype ~= "<i-dont-want-to-see-this>" then
return true
end
if vim.fn.bufname(buf_number) ~= "<buffer-name-I-dont-want>" then
return true
end
if vim.fn.getcwd() == "<work-repo>" and vim.bo[buf_number].filetype ~= "wiki" then
return true
end
if buf_numbers[1] ~= buf_number then
return true
end
end,
offsets = {
{
filetype = "NvimTree",

View file

@ -2,13 +2,12 @@ require('conform').setup({
formatters_by_ft = {
lua = { "stylua" },
cpp = { "clang-format" },
go = { "gofmr" },
go = { "gofmt" },
},
format_on_save = {
-- These options will be passed to conform.format()
timeout_ms = 500,
lsp_fallback = true,
lsp_format = "fallback",
},
notify_on_error = true,
})

View file

@ -1,5 +1,5 @@
local lazypath = vim.fn.stdpath("data") .. "/lazy/lazy.nvim"
if not (vim.uv or vim.loop).fs_stat(lazypath) then
if not vim.uv.fs_stat(lazypath) then
local lazyrepo = "https://github.com/folke/lazy.nvim.git"
local out = vim.fn.system({ "git", "clone", "--filter=blob:none", "--branch=stable", lazyrepo, lazypath })
if vim.v.shell_error ~= 0 then

View file

@ -1,55 +0,0 @@
local M = {}
local map = vim.keymap.set
-- export on_attach & capabilities
M.on_attach = function(_, bufnr)
local function opts(desc)
return { buffer = bufnr, desc = "LSP " .. desc }
end
map("n", "gD", vim.lsp.buf.declaration, opts "Go to declaration")
map("n", "gd", vim.lsp.buf.definition, opts "Go to definition")
map("n", "<leader>wa", vim.lsp.buf.add_workspace_folder, opts "Add workspace folder")
map("n", "<leader>wr", vim.lsp.buf.remove_workspace_folder, opts "Remove workspace folder")
map("n", "<leader>wl", function()
print(vim.inspect(vim.lsp.buf.list_workspace_folders()))
end, opts "List workspace folders")
map("n", "<leader>D", vim.lsp.buf.type_definition, opts "Go to type definition")
end
-- disable semanticTokens
M.on_init = function(client, _)
if vim.fn.has "nvim-0.11" ~= 1 then
if client.supports_method "textDocument/semanticTokens" then
client.server_capabilities.semanticTokensProvider = nil
end
else
if client:supports_method "textDocument/semanticTokens" then
client.server_capabilities.semanticTokensProvider = nil
end
end
end
M.capabilities = vim.lsp.protocol.make_client_capabilities()
M.capabilities.textDocument.completion.completionItem = {
documentationFormat = { "markdown", "plaintext" },
snippetSupport = true,
preselectSupport = true,
insertReplaceSupport = true,
labelDetailsSupport = true,
deprecatedSupport = true,
commitCharactersSupport = true,
tagSupport = { valueSet = { 1 } },
resolveSupport = {
properties = {
"documentation",
"detail",
"additionalTextEdits",
},
},
}
return M

View file

@ -1,30 +1,42 @@
local on_attach = require("configs.lsp.e-lspconfig").on_attach
local on_init = require("configs.lsp.e-lspconfig").on_init
local capabilities = require("configs.lsp.e-lspconfig").capabilities
vim.lsp.config('*', {
capabilities = require('cmp_nvim_lsp').default_capabilities(),
on_init = function(client)
if client:supports_method('textDocument/semanticTokens') then
client.server_capabilities.semanticTokensProvider = nil
end
end,
})
vim.api.nvim_create_autocmd('LspAttach', {
callback = function(args)
local map = vim.keymap.set
local function opts(desc)
return { buffer = args.buf, desc = "LSP " .. desc }
end
map("n", "gD", vim.lsp.buf.declaration, opts "Go to declaration")
map("n", "gd", vim.lsp.buf.definition, opts "Go to definition")
map("n", "<leader>wa", vim.lsp.buf.add_workspace_folder, opts "Add workspace folder")
map("n", "<leader>wr", vim.lsp.buf.remove_workspace_folder, opts "Remove workspace folder")
map("n", "<leader>wl", function()
print(vim.inspect(vim.lsp.buf.list_workspace_folders()))
end, opts "List workspace folders")
map("n", "<leader>D", vim.lsp.buf.type_definition, opts "Go to type definition")
end,
})
-- C/C++
vim.lsp.config('clangd', {
on_attach = on_attach,
on_init = on_init,
capabilities = capabilities,
cmd = {
"clangd-22",
"clangd",
"--clang-tidy",
},
filetypes = { "c", "cpp", "h", "hpp", "objc", "objcpp" },
root_markers = { '.git' },
})
vim.lsp.enable('clangd')
-- Go (gopls) lsp server
-- Go
vim.lsp.config('gopls', {
on_attach = on_attach,
on_init = on_init,
capabilities = capabilities,
cmd = { 'gopls' },
filetypes = { 'go', 'gomod', 'gowork', 'gotmpl' },
root_markers = { 'go.mod', '.git' },
single_file_support = true,
settings = {
gopls = {
completeUnimported = true,
@ -37,32 +49,18 @@ vim.lsp.config('gopls', {
},
},
})
vim.lsp.enable('gopls')
-- PhP
-- PHP
vim.lsp.config('phpactor', {
on_attach = on_attach,
on_init = on_init,
capabilities = capabilities,
cmd = { 'phpactor', 'language-server' },
filetypes = { 'php' },
root_markers = { 'composer.json', '.git' },
init_options = {
["language_server_phpstan.enabled"] = false,
["language_server_psalm.enabled"] = false,
["language_server_mago.enabled"] = false,
}
})
vim.lsp.enable('phpactor')
-- Lua
vim.lsp.config('lua_ls', {
on_attach = on_attach,
on_init = on_init,
capabilities = capabilities,
cmd = { 'lua-language-server' },
filetypes = { 'lua' },
root_markers = { '.luarc.json', '.luarc.jsonc', '.git' },
single_file_support = true,
settings = {
Lua = {
telemetry = { enable = false },
@ -78,34 +76,7 @@ vim.lsp.config('lua_ls', {
},
}
})
vim.lsp.enable('lua_ls')
-- Bash
vim.lsp.config('bashls', {
on_attach = on_attach,
on_init = on_init,
capabilities = capabilities,
cmd = { 'bash-language-server', 'start' },
filetypes = { 'sh', 'bash' },
root_markers = { '.git' },
single_file_support = true,
})
vim.lsp.enable('bashls')
-- Meson
vim.lsp.config('meson_ls', {
on_attach = on_attach,
on_init = on_init,
capabilities = capabilities,
cmd = { 'mesonlsp' },
filetypes = { 'meson' },
root_markers = { 'meson.build', '.git' },
single_file_support = true,
settings = {}
})
vim.lsp.enable('meson_ls')
-- For all
vim.diagnostic.config({
virtual_text = false,
})

View file

@ -0,0 +1,78 @@
return {
close_if_last_window = true,
popup_border_style = "rounded",
enable_git_status = true,
enable_diagnostics = true,
filesystem = {
hijack_netrw_behavior = "open_current",
follow_current_file = {
enabled = true,
leave_dirs_open = false,
},
group_empty_dirs = true,
filtered_items = {
visible = false,
hide_hidden = false,
hide_dotfiles = false,
hide_gitignored = false,
hide_by_name = {
"docs",
".git",
".cache",
"builddir-debug",
},
},
bind_to_cwd = true,
cwd_target = {
sidebar = "global",
current = "window",
},
use_libuv_file_watcher = true,
window = {
width = 30,
},
},
default_component_configs = {
indent = {
with_markers = true,
},
modified = {
symbol = "",
},
icon = {
folder_closed = "",
folder_open = "",
folder_empty = "",
default = "󰈚",
},
git_status = {
symbols = {
added = "★",
modified = "✗",
deleted = "",
renamed = "➜",
untracked = "★",
ignored = "◌",
unstaged = "✗",
staged = "✓",
conflict = "",
},
},
name = {
use_git_status_colors = true,
},
},
}

View file

@ -1,105 +0,0 @@
-- return {
-- filters = { dotfiles = false, git_ignored = false, },
-- disable_netrw = true,
-- hijack_cursor = true,
-- sync_root_with_cwd = true,
-- update_focused_file = {
-- enable = true,
-- update_root = false,
-- },
-- bookmarks = {
-- persist = true,
-- },
-- view = {
-- width = 30,
-- preserve_window_proportions = true,
-- },
-- renderer = {
-- root_folder_label = false,
-- highlight_git = true,
-- indent_markers = { enable = true },
-- icons = {
-- glyphs = {
-- default = "󰈚",
-- folder = {
-- default = "",
-- empty = "",
-- empty_open = "",
-- open = "",
-- symlink = "",
-- },
-- git = { unmerged = "" },
-- },
-- },
-- },
-- }
return {
filters = {
dotfiles = false,
git_ignored = false,
},
disable_netrw = true,
hijack_cursor = true,
sync_root_with_cwd = true,
update_focused_file = {
enable = true,
update_root = false,
},
bookmarks = {
persist = true,
},
git = {
enable = true,
ignore = false,
timeout = 5000,
},
view = {
width = 30,
preserve_window_proportions = true,
},
renderer = {
root_folder_label = false,
highlight_git = "all",
indent_markers = {
enable = true,
},
icons = {
show = {
git = true,
modified = false,
file = true,
folder = true,
folder_arrow = true,
},
glyphs = {
default = "󰈚",
folder = {
default = "",
empty = "",
empty_open = "",
open = "",
symlink = "",
},
git = {
unstaged = "✗",
staged = "✓",
unmerged = "",
renamed = "➜",
untracked = "★",
deleted = "",
ignored = "◌",
},
},
},
},
}

View file

@ -1,4 +1,4 @@
require("telescope").setup(){
require("telescope").setup {
defaults = {
prompt_prefix = "",
selection_caret = " ",

View file

@ -1,33 +0,0 @@
-- ========== Telescope ============= --
require("telescope").load_extension("noice")
require("telescope.themes").get_dropdown()
-- ========== Theme ============= --
require("custom.darcula").setup()
-- ========== Theme ============= --
require("custom.timetracker").setup()
-- ========== Make ============= --
require("custom.make")
-- ========== Formating ============= --
-- vim.api.nvim_create_autocmd("BufWritePre", {
-- pattern = { "*.c", "*.cpp", "*.h", "*.hpp", "*.go" },
-- callback = function()
-- vim.lsp.buf.format()
-- end,
-- })
-- ========== Clipboard ============= --
vim.o.clipboard = "unnamedplus"
vim.api.nvim_create_autocmd("TextYankPost", {
callback = function()
-- vim.highlight.on_yank()
local copy_to_unnamedplus = require("vim.ui.clipboard.osc52").copy("+")
copy_to_unnamedplus(vim.v.event.regcontents)
local copy_to_unnamed = require("vim.ui.clipboard.osc52").copy("*")
copy_to_unnamed(vim.v.event.regcontents)
end,
})

View file

@ -1,184 +0,0 @@
_G.last_make_command = nil
_G.make_terminal_buf = nil
_G.build_targets = {}
local config_file = vim.fn.stdpath('config') .. '/build_targets.json'
-- Загрузка таргетов из файла
local function load_targets()
local ok, data = pcall(vim.fn.readfile, config_file)
if ok and data[1] then
_G.build_targets = vim.fn.json_decode(data[1])
else
_G.build_targets = {}
end
end
-- Сохранение таргетов в файл
local function save_targets()
local data = vim.fn.json_encode(_G.build_targets)
vim.fn.writefile({data}, config_file)
end
-- Загружаем таргеты при старте
load_targets()
local function run_make_command(command)
if _G.make_terminal_buf and vim.api.nvim_buf_is_valid(_G.make_terminal_buf) then
vim.cmd('buffer ' .. _G.make_terminal_buf)
else
vim.cmd('terminal')
_G.make_terminal_buf = vim.api.nvim_get_current_buf()
end
vim.cmd('startinsert')
vim.defer_fn(function()
if vim.b.terminal_job_id then
vim.fn.chansend(vim.b.terminal_job_id, "clear\n")
vim.fn.chansend(vim.b.terminal_job_id, command .. "\n")
end
end, 300)
end
-- Основная команда сборки (оставьте вашу текущую)
vim.api.nvim_create_user_command('Build', function()
vim.ui.input({
prompt = 'Флаги сборки: ',
default = '',
}, function(flags)
if flags == nil then return end
vim.ui.input({
prompt = 'Имя проекта: ',
default = '',
}, function(project_name)
if project_name == nil then return end
local make_cmd = "meson compile" .. flags .. " " .. project_name
_G.last_make_command = make_cmd
run_make_command(make_cmd)
vim.notify("🔨 Сборка запущена: " .. make_cmd)
end)
end)
end, {
desc = "Сборка проекта в терминале"
})
vim.api.nvim_create_user_command('TargetNew', function()
vim.ui.input({
prompt = 'Название таргета: ',
default = '',
}, function(target_name)
if target_name == nil or target_name == '' then return end
vim.ui.input({
prompt = 'Команда сборки для "' .. target_name .. '": ',
default = '',
}, function(build_command)
if build_command == nil or build_command == '' then return end
_G.build_targets[target_name] = build_command
save_targets()
vim.notify("✅ Таргет '" .. target_name .. "' сохранен")
end)
end)
end, {
desc = "Создать новый таргет сборки"
})
-- ПЕРЕПИСАННАЯ команда для выбора таргета с использованием vim.ui.select
vim.api.nvim_create_user_command('Target', function()
local target_count = 0
for _ in pairs(_G.build_targets) do
target_count = target_count + 1
end
if target_count == 0 then
vim.notify("❌ Нет сохраненных таргетов. Используйте :TargetNew", vim.log.levels.ERROR)
return
end
-- Подготавливаем список для vim.ui.select
local targets_list = {}
for name, cmd in pairs(_G.build_targets) do
table.insert(targets_list, {
name = name,
cmd = cmd,
-- Форматируем для красивого отображения
display = string.format("🔨 %s\n 📝 %s", name, cmd)
})
end
-- Сортируем по имени
table.sort(targets_list, function(a, b) return a.name < b.name end)
vim.ui.select(targets_list, {
prompt = '📋 Выберите таргет сборки:',
format_item = function(item)
return item.display
end,
}, function(selected)
if not selected then
vim.notify("❌ Выбор отменен", vim.log.levels.WARN)
return
end
_G.last_make_command = selected.cmd
run_make_command(selected.cmd)
vim.notify("🔨 Запускаю: " .. selected.cmd)
end)
end, {
desc = "Выбрать таргет сборки"
})
-- Команда для просмотра всех таргетов
vim.api.nvim_create_user_command('TargetList', function()
local target_count = 0
for _ in pairs(_G.build_targets) do
target_count = target_count + 1
end
if target_count == 0 then
print("📝 Список таргетов пуст")
return
end
print("📋 Сохраненные таргеты сборки:")
local targets_list = {}
for name, cmd in pairs(_G.build_targets) do
table.insert(targets_list, { name = name, cmd = cmd })
end
table.sort(targets_list, function(a, b) return a.name < b.name end)
for i, target in ipairs(targets_list) do
print(string.format(" %d. %s → %s", i, target.name, target.cmd))
end
end, {
desc = "Показать список всех таргетов"
})
-- Команда для удаления таргета (уже использует vim.ui.select - оставляем как есть)
vim.api.nvim_create_user_command('TargetDelete', function()
local target_count = 0
for _ in pairs(_G.build_targets) do
target_count = target_count + 1
end
if target_count == 0 then
vim.notify("❌ Нет сохраненных таргетов", vim.log.levels.ERROR)
return
end
local targets_list = {}
for name, cmd in pairs(_G.build_targets) do
table.insert(targets_list, name)
end
table.sort(targets_list)
vim.ui.select(targets_list, {
prompt = 'Выберите таргет для удаления:',
}, function(selected)
if not selected then return end
_G.build_targets[selected] = nil
save_targets()
vim.notify("🗑️ Таргет '" .. selected .. "' удален")
end)
end, {
desc = "Удалить таргет сборки"
})
-- Повтор последней сборки (оставьте вашу текущую)
vim.api.nvim_create_user_command('LastBuild', function()
if _G.last_make_command then
run_make_command(_G.last_make_command)
vim.notify("🔁 Повторяю: " .. _G.last_make_command)
else
vim.notify("❌ Нет истории сборок", vim.log.levels.ERROR)
end
end, {
desc = "Повторить последнюю сборку в терминале"
})

View file

@ -1,234 +0,0 @@
local M = {}
local uv = vim.loop
local data_dir = vim.fn.stdpath("data") .. "/time_tracker"
local stats_file = data_dir .. "/stats.json"
local heartbeat_file = data_dir .. "/heartbeat_" .. vim.fn.getpid()
local timer = nil
local last_tick = os.time()
--------------------------------------------------
-- Utils
--------------------------------------------------
local function ensure_dir()
vim.fn.mkdir(data_dir, "p")
end
local function read_stats()
local f = io.open(stats_file, "r")
if not f then return {} end
local content = f:read("*a")
f:close()
return vim.json.decode(content) or {}
end
local function write_stats(data)
local f = io.open(stats_file, "w")
if not f then return end
f:write(vim.json.encode(data))
f:close()
end
local function format_time(seconds)
local h = math.floor(seconds / 3600)
local m = math.floor((seconds % 3600) / 60)
return string.format("%dh %dm", h, m)
end
local function current_filetype()
return vim.bo.filetype ~= "" and vim.bo.filetype or "unknown"
end
--------------------------------------------------
-- Time tracking
--------------------------------------------------
local function update_heartbeat()
local f = io.open(heartbeat_file, "w")
if f then
f:write(os.time())
f:close()
end
end
local function add_time(seconds)
local stats = read_stats()
local date = os.date("%Y-%m-%d")
local ft = current_filetype()
stats[date] = stats[date] or { total = 0, languages = {} }
stats[date].total = stats[date].total + seconds
stats[date].languages[ft] =
(stats[date].languages[ft] or 0) + seconds
write_stats(stats)
end
local function start_timer()
timer = uv.new_timer()
timer:start(0, 5000, vim.schedule_wrap(function()
local now = os.time()
local diff = now - last_tick
last_tick = now
update_heartbeat()
add_time(diff)
end))
end
local function cleanup()
os.remove(heartbeat_file)
end
--------------------------------------------------
-- :TimeToday
--------------------------------------------------
local function show_today()
local stats = read_stats()
local today = os.date("%Y-%m-%d")
local data = stats[today]
if not data then
vim.notify("No activity today 🚀", vim.log.levels.INFO)
return
end
local lines = {}
table.insert(lines, "📅 " .. today)
table.insert(lines, "")
table.insert(lines, "Total: " .. format_time(data.total))
table.insert(lines, "")
table.insert(lines, "Languages:")
for lang, time in pairs(data.languages) do
table.insert(lines, string.format(" %s: %s", lang, format_time(time)))
end
vim.notify(table.concat(lines, "\n"), vim.log.levels.INFO, {
title = "Nvim Time Tracker",
})
end
--------------------------------------------------
-- Heatmap
--------------------------------------------------
local function setup_highlights()
vim.api.nvim_set_hl(0, "TimeHeat0", { fg = "#2d333b" })
vim.api.nvim_set_hl(0, "TimeHeat1", { fg = "#0e4429" })
vim.api.nvim_set_hl(0, "TimeHeat2", { fg = "#006d32" })
vim.api.nvim_set_hl(0, "TimeHeat3", { fg = "#26a641" })
vim.api.nvim_set_hl(0, "TimeHeat4", { fg = "#39d353" })
end
local function get_level(seconds)
if seconds == 0 then return 0 end
if seconds < 1800 then return 1 end
if seconds < 7200 then return 2 end
if seconds < 14400 then return 3 end
return 4
end
local function build_matrix()
local stats = read_stats()
local matrix = {}
for w = 1, 53 do
matrix[w] = {}
for d = 1, 7 do
matrix[w][d] = 0
end
end
local today = os.time()
for i = 0, 364 do
local ts = today - i * 86400
local date = os.date("%Y-%m-%d", ts)
local weekday = tonumber(os.date("%w", ts))
weekday = weekday == 0 and 7 or weekday
local week = math.floor((364 - i) / 7) + 1
if week <= 53 then
matrix[week][weekday] =
stats[date] and stats[date].total or 0
end
end
return matrix
end
local function show_year()
setup_highlights()
local matrix = build_matrix()
local buf = vim.api.nvim_create_buf(false, true)
local lines = {}
table.insert(lines, " 📈 Nvim Activity — Last 365 Days")
table.insert(lines, "")
for day = 1, 7 do
local line = ""
for week = 1, 53 do
line = line .. "██"
end
table.insert(lines, line)
end
vim.api.nvim_buf_set_lines(buf, 0, -1, false, lines)
for day = 1, 7 do
for week = 1, 53 do
local seconds = matrix[week][day]
local level = get_level(seconds)
vim.api.nvim_buf_add_highlight(
buf,
-1,
"TimeHeat" .. level,
day + 1,
(week - 1) * 2,
(week - 1) * 2 + 2
)
end
end
local width = 53 * 2 + 4
local height = 10
local win = vim.api.nvim_open_win(buf, true, {
relative = "editor",
width = width,
height = height,
row = math.floor((vim.o.lines - height) / 2),
col = math.floor((vim.o.columns - width) / 2),
style = "minimal",
border = "rounded",
})
vim.keymap.set("n", "q", function()
vim.api.nvim_win_close(win, true)
end, { buffer = buf })
end
--------------------------------------------------
-- Setup
--------------------------------------------------
function M.setup()
ensure_dir()
start_timer()
vim.api.nvim_create_user_command("TimeToday", show_today, {})
vim.api.nvim_create_user_command("TimeYear", show_year, {})
vim.api.nvim_create_autocmd("VimLeavePre", {
callback = cleanup,
})
end
return M

View file

@ -7,6 +7,11 @@ map("n", "<leader>t", "<cmd>terminal<CR>", { desc = "Create new terminal" })
map("t", "jk", "<C-\\><C-n>")
map("n", "<leader>h", "<C-w>s | <cmd>terminal<CR> | i");
-- ========== Undotree =========== --
vim.cmd("packadd nvim.undotree")
map("n", "<leader>u", require("undotree").open)
-- ========== Debug =========== --
map('n', '<leader>db', '<cmd>DapToggleBreakpoint<CR>', { desc = 'Toggle breakpoint' })
map('n', '<leader>dr', '<cmd>DapContinue<CR>', { desc = 'Start/continue debug' })
@ -21,9 +26,12 @@ map('n', '<leader>lo', '<cmd>lua vim.diagnostic.open_float()<CR>',
{ noremap = true, silent = true, desc = 'Open diagnostic' })
map("n", "<leader>ll", '<cmd>lua vim.lsp.buf.code_action()<CR>',
{ noremap = true, silent = true, desc = 'Show complete by lsp' })
map('n', '[l', '<cmd>DapContinue<CR>', { noremap = true, silent = true, desc = 'Go to prev diagnostic' })
map('n', ']l', '<cmd>DapStepOver<CR>', { noremap = true, silent = true, desc = 'Go to next diagnostic' })
map('n', '<leader>lt', '<cmd>DapStepInto<CR>', { noremap = true, silent = true, desc = 'Open toggle' })
map('n', '[l', function() vim.diagnostic.jump({ count = -1 }) end,
{ noremap = true, silent = true, desc = 'Go to prev diagnostic' })
map('n', ']l', function() vim.diagnostic.jump({ count = 1 }) end,
{ noremap = true, silent = true, desc = 'Go to next diagnostic' })
map('n', '<leader>lt', vim.diagnostic.setloclist,
{ noremap = true, silent = true, desc = 'Toggle diagnostics list' })
map("n", "<leader>ls", vim.diagnostic.setloclist, { desc = "LSP diagnostic loclist" })
map('n', '<leader>lu', function() vim.diagnostic.enable(not vim.diagnostic.is_enabled()) end,
{ desc = "Toggle Diagnostics" })
@ -52,9 +60,9 @@ map("i", "<C-k>", "<Up>", { desc = "move up" })
map("n", "<leader>/", "gcc", { desc = "toggle comment", remap = true })
map("v", "<leader>/", "gc", { desc = "toggle comment", remap = true })
-- ========== Nvim-tree ============= --
map("n", "<C-n>", "<cmd>NvimTreeToggle<CR>", { desc = "nvimtree toggle window" })
map("n", "<leader>e", "<cmd>NvimTreeFocus<CR>", { desc = "nvimtree focus window" })
-- ========== Neotree ============= --
map("n", "<C-n>", "<cmd>Neotree toggle<CR>", { desc = "nvimtree toggle window" })
map("n", "<leader>e", "<cmd>Neotree focus<CR>", { desc = "nvimtree focus window" })
-- ========== Telescope ============= --
map("n", "<leader>fw", "<cmd>Telescope live_grep<CR>", { desc = "telescope live grep" })
@ -76,8 +84,8 @@ map("n", "<leader>wK", "<cmd>WhichKey <CR>", { desc = "whichkey all keymaps" })
-- ========== Buffers ============= --
map("n", "<leader>x", function()
local bufnr = vim.api.nvim_get_current_buf()
local buftype = vim.api.nvim_buf_get_option(bufnr, 'buftype')
local modified = vim.api.nvim_buf_get_option(bufnr, 'modified')
local buftype = vim.bo[bufnr].buftype
local modified = vim.bo[bufnr].modified
if buftype == 'terminal' then
vim.cmd('bp | sp | bn | bd!')
@ -90,9 +98,14 @@ map("n", "<leader>x", function()
vim.cmd('bp | sp | bn | bd')
end
end, { desc = "Close buffer" })
map("n", "<leader>e", "<cmd>enew<CR>", { desc = "Create buffer" })
map("n", "<leader>n", "<cmd>enew<CR>", { desc = "Create buffer" })
map("n", "<tab>", "<cmd>BufferLineCycleNext<CR>", { desc = "Go to next buffer" })
map("n", "<S-tab>", "<cmd>BufferLineCyclePrev<CR>", { desc = "Go to prev buffer" })
map("n", "<leader>bt", "<cmd>BufferLineGroupToggle tests<CR>", { desc = "Toggle 'tests' group" })
map("n", "<leader>bc", "<cmd>BufferLineGroupToggle code<CR>", { desc = "Toggle 'code' group" })
map("n", "<leader>bp", "<cmd>BufferLineGroupToggle tornado<CR>", { desc = "Toggle 'tornado' group" })
map("n", "<leader>bg", "<cmd>BufferLineGroupToggle gornado<CR>", { desc = "Toggle 'gornado' group" })
-- ========== Git ============= --
map("n", "<leader>gb", "<cmd>Gitsigns blame<CR>", { desc = "Open blame for file" })
@ -102,8 +115,8 @@ map("n", "<leader>gct", "<cmd>GitConflictChooseTheirs<CR>", { desc = "Select the
map("n", "<leader>gcb", "<cmd>GitConflictChooseBoth<CR>", { desc = "Seletct both changes" })
map("n", "<leader>gcn", "<cmd>GitConflictNextConflict<CR>", { desc = "Move to the next conflict" })
map("n", "<leader>gcp", "<cmd>GitConflictPrevConflict<CR>", { desc = "Move to the previous conflict" })
map("n", "<leader>ghn", "<cmd>Gitsigns blame<CR>", { desc = "Show hunk in normal mode" })
map("n", "<leader>ghi", "<cmd>Gitsigns blame<CR>", { desc = "Show hunk inline" })
map("n", "<leader>ghn", "<cmd>Gitsigns preview_hunk<CR>", { desc = "Show hunk in normal mode" })
map("n", "<leader>ghi", "<cmd>Gitsigns preview_hunk_inline<CR>", { desc = "Show hunk inline" })
map("n", "<leader>gd", "<cmd>Gitsigns diffthis<CR>", { desc = "Show diff of buffer" })
map("n", "<leader>gs", "<cmd>Gitsigns stage_buffer<CR>", { desc = "Stage this buffer" })
map("n", "<leader>gu", "<cmd>Gitui<CR>", { desc = "Stage this buffer" })

View file

@ -4,10 +4,6 @@ return {
"nvim-tree/nvim-web-devicons",
opts = {},
},
{
'nvim-mini/mini.nvim',
version = '*'
},
-- Screenkey
{
"NStefan002/screenkey.nvim",
@ -25,7 +21,7 @@ return {
"lewis6991/gitsigns.nvim",
event = { "BufReadPre", "BufNewFile" },
opts = function()
require("configs.gitsigns")
return require("configs.gitsigns")
end,
},
{
@ -33,26 +29,6 @@ return {
version = "*",
config = true
},
-- Nvim tree
{
"nvim-tree/nvim-tree.lua",
cmd = { "NvimTreeToggle", "NvimTreeFocus" },
opts = function()
return require "configs.nvimtree"
end,
},
-- Pairs
{
"nvim-mini/mini.pairs",
event = { "BufReadPost", "BufNewFile" },
opts = {
modes = { insert = true, command = true, terminal = false },
skip_next = [=[[%w%%%'%[%"%.%`%$]]=],
skip_ts = { "string" },
skip_unbalanced = true,
markdown = true,
},
},
-- Formating
{
"stevearc/conform.nvim",
@ -61,11 +37,6 @@ return {
require "configs.conform"
end,
},
-- Yank highlight
{
"machakann/vim-highlightedyank",
event = "VeryLazy",
},
-- Sessions
{
"olimorris/persisted.nvim",
@ -78,4 +49,16 @@ return {
autoload = false,
},
},
-- Navigation
{
"folke/flash.nvim",
event = "VeryLazy",
opts = {},
keys = {
{ "<leader>jj", mode = { "n", "x", "o" }, function() require("flash").jump() end, desc = "Flash jump" },
{ "<leader>jt", mode = { "n", "x", "o" }, function() require("flash").treesitter() end, desc = "Flash treesitter" },
{ "<leader>jr", mode = "o", function() require("flash").remote() end, desc = "Flash remote" },
{ "<c-s>", mode = { "c" }, function() require("flash").toggle() end, desc = "Toggle Flash search" },
},
},
}

View file

@ -15,7 +15,17 @@ return {
-- Mason lspconfig
{
"mason-org/mason-lspconfig.nvim",
opts = {},
opts = {
ensure_installed = {
"clangd",
"gopls",
"phpactor",
"lua_ls",
"bashls",
"mesonlsp",
},
automatic_enable = true,
},
dependencies = {
"mason-org/mason.nvim",
"neovim/nvim-lspconfig",
@ -100,6 +110,7 @@ return {
"diff",
"gitcommit",
"gitignore",
"tla",
},
callback = function(args)
pcall(vim.treesitter.start, args.buf)
@ -133,24 +144,6 @@ return {
require("configs.ufo")
end
},
-- Tests
{
"nvim-neotest/neotest",
event = "VeryLazy",
dependencies = {
"nvim-lua/plenary.nvim",
"alfaix/neotest-gtest",
"olimorris/neotest-phpunit",
},
config = function()
require("neotest").setup({
adapters = {
require("neotest-phpunit"),
require("neotest-gtest").setup({}),
},
})
end,
},
-- These are for C/C++ Debbuger
{
"nvim-neotest/nvim-nio",
@ -172,7 +165,7 @@ return {
"jay-babu/mason-nvim-dap.nvim",
event = "VeryLazy",
dependencies = {
"williamboman/mason.nvim",
"mason-org/mason.nvim",
"mfussenegger/nvim-dap",
},
opts = {

View file

@ -0,0 +1,41 @@
return {
{
"nvim-neo-tree/neo-tree.nvim",
branch = "v3.x",
opts = require("configs.neotree"),
dependencies = {
"nvim-lua/plenary.nvim",
"MunifTanjim/nui.nvim",
"nvim-tree/nvim-web-devicons",
},
},
{
"Crysthamus/nvim-file-operations",
-- branch = "compat" -- if you are on Neovim <= 0.10
dependencies = {
"nvim-neo-tree/neo-tree.nvim", -- makes sure that this loads after Neo-tree.
},
config = function()
require("nvim-file-operations").setup()
end,
},
{
"s1n7ax/nvim-window-picker",
version = "2.*",
config = function()
require("window-picker").setup({
filter_rules = {
include_current_win = false,
autoselect_one = true,
-- filter using buffer options
bo = {
-- if the file type is one of following, the window will be ignored
filetype = { "neo-tree", "neo-tree-popup", "notify" },
-- if the buffer type is one of following, the window will be ignored
buftype = { "terminal", "quickfix" },
},
},
})
end,
},
}

View file

@ -1,8 +0,0 @@
return {
{
'kwakzalver/duckytype.nvim',
config = function()
require('duckytype').setup {}
end
},
}

View file

@ -1,14 +1,16 @@
return {
"folke/noice.nvim",
event = "VeryLazy",
opts ={
-- add any options here
},
dependencies = {
"MunifTanjim/nui.nvim",
"rcarriga/nvim-notify",
{
"rcarriga/nvim-notify",
opts = {
background_colour = "#000000",
},
},
},
config = {
opts = {
lsp = {
signature = {
enabled = false,
@ -22,9 +24,9 @@ return {
},
},
presets = {
long_message_to_split = true, -- long messages will be sent to a split
inc_rename = false, -- enables an input dialog for inc-rename.nvim
lsp_doc_border = false, -- add a border to hover docs and signature help
long_message_to_split = true,
inc_rename = false,
lsp_doc_border = false,
},
}
}

View file

@ -26,6 +26,7 @@ return {
---@type snacks.dashboard.Item[]
keys = {
{ icon = "", key = "f", desc = "Find File", action = ":lua Snacks.dashboard.pick('files')" },
{ icon = "", key = "o", desc = "Find In Old Files", action = ":Telescope oldfiles" },
{ icon = "", key = "n", desc = "New File", action = ":ene | startinsert" },
{ icon = "", key = "g", desc = "Find Text", action = ":lua Snacks.dashboard.pick('live_grep')" },
{ icon = "", key = "r", desc = "Recent Files", action = ":lua Snacks.dashboard.pick('oldfiles')" },
@ -91,8 +92,8 @@ return {
explorer = { enabled = false },
indent = { enabled = true },
input = { enabled = true },
picker = { enabled = true },
notifier = { enabled = true },
picker = { enabled = false },
notifier = { enabled = false },
quickfile = { enabled = true },
scope = { enabled = true },
scroll = { enabled = true },

View file

@ -2,7 +2,7 @@ return {
"nvim-telescope/telescope.nvim",
dependencies = { "nvim-treesitter/nvim-treesitter" },
cmd = "Telescope",
configs = function()
return require "configs.telescope"
config = function()
require "configs.telescope"
end,
}

View file

@ -0,0 +1 @@
return {}

View file

@ -647,90 +647,6 @@ M.configure_highlights = function()
hi(0, "iCursor", { bg = color._72, fg = color.very_light_gray })
hi(0, "lCursor", { bg = color.very_light_gray, fg = color.dark })
if M.config.opt.integrations.lualine then
hi(0, "lualine_a_command", { bg = color.green, bold = true, fg = color.dark })
hi(0, "lualine_a_inactive", { bg = color.light_slate_gray, bold = true, fg = color.dark })
hi(0, "lualine_a_insert", { bg = color.green, bold = true, fg = color.dark })
hi(0, "lualine_a_normal", { bg = color.green, bold = true, fg = color.dark })
hi(0, "lualine_a_replace", { bg = color.green, bold = true, fg = color.dark })
hi(0, "lualine_a_visual", { bg = color.green, bold = true, fg = color.dark })
hi(0, "lualine_b_command", { bg = color.green, fg = color.dark })
hi(0, "lualine_b_diagnostics_error_command", { bg = color.green, fg = color.red })
hi(0, "lualine_b_diagnostics_error_inactive", { bg = color.light_slate_gray, fg = color.red })
hi(0, "lualine_b_diagnostics_error_insert", { bg = color.green, fg = color.red })
hi(0, "lualine_b_diagnostics_error_normal", { bg = color.green, fg = color.red })
hi(0, "lualine_b_diagnostics_error_replace", { bg = color.green, fg = color.red })
hi(0, "lualine_b_diagnostics_error_terminal", { bg = color.green, fg = color.red })
hi(0, "lualine_b_diagnostics_error_visual", { bg = color.green, fg = color.red })
hi(0, "lualine_b_diagnostics_hint_command", { bg = color.green, fg = color.bright_sky })
hi(0, "lualine_b_diagnostics_hint_inactive", { bg = color.light_slate_gray, fg = color.bright_sky })
hi(0, "lualine_b_diagnostics_hint_insert", { bg = color.green, fg = color.bright_sky })
hi(0, "lualine_b_diagnostics_hint_normal", { bg = color.green, fg = color.bright_sky })
hi(0, "lualine_b_diagnostics_hint_replace", { bg = color.green, fg = color.bright_sky })
hi(0, "lualine_b_diagnostics_hint_terminal", { bg = color.green, fg = color.bright_sky })
hi(0, "lualine_b_diagnostics_hint_visual", { bg = color.green, fg = color.bright_sky })
hi(0, "lualine_b_diagnostics_info_command", { bg = color.green, fg = color.grey })
hi(0, "lualine_b_diagnostics_info_inactive", { bg = color.light_slate_gray, fg = color.grey })
hi(0, "lualine_b_diagnostics_info_insert", { bg = color.green, fg = color.grey })
hi(0, "lualine_b_diagnostics_info_normal", { bg = color.green, fg = color.grey })
hi(0, "lualine_b_diagnostics_info_replace", { bg = color.green, fg = color.grey })
hi(0, "lualine_b_diagnostics_info_terminal", { bg = color.green, fg = color.grey })
hi(0, "lualine_b_diagnostics_info_visual", { bg = color.green, fg = color.grey })
hi(0, "lualine_b_diagnostics_warn_command", { bg = color.green, fg = color.pale_gold })
hi(0, "lualine_b_diagnostics_warn_inactive", { bg = color.light_slate_gray, fg = color.pale_gold })
hi(0, "lualine_b_diagnostics_warn_insert", { bg = color.green, fg = color.pale_gold })
hi(0, "lualine_b_diagnostics_warn_normal", { bg = color.green, fg = color.pale_gold })
hi(0, "lualine_b_diagnostics_warn_replace", { bg = color.green, fg = color.pale_gold })
hi(0, "lualine_b_diagnostics_warn_terminal", { bg = color.green, fg = color.pale_gold })
hi(0, "lualine_b_diagnostics_warn_visual", { bg = color.green, fg = color.pale_gold })
hi(0, "lualine_b_diff_added_command", { bg = color.green, fg = color.light_olive_green })
hi(0, "lualine_b_diff_added_inactive", { bg = color.light_slate_gray, fg = color.light_olive_green })
hi(0, "lualine_b_diff_added_insert", { bg = color.green, fg = color.light_olive_green })
hi(0, "lualine_b_diff_added_normal", { bg = color.green, fg = color.light_olive_green })
hi(0, "lualine_b_diff_added_replace", { bg = color.green, fg = color.light_olive_green })
hi(0, "lualine_b_diff_added_terminal", { bg = color.green, fg = color.light_olive_green })
hi(0, "lualine_b_diff_added_visual", { bg = color.green, fg = color.light_olive_green })
hi(0, "lualine_b_diff_modified_command", { bg = color.green, fg = color.light_blue })
hi(0, "lualine_b_diff_modified_inactive", { bg = color.light_slate_gray, fg = color.light_blue })
hi(0, "lualine_b_diff_modified_insert", { bg = color.green, fg = color.light_blue })
hi(0, "lualine_b_diff_modified_normal", { bg = color.green, fg = color.light_blue })
hi(0, "lualine_b_diff_modified_replace", { bg = color.green, fg = color.light_blue })
hi(0, "lualine_b_diff_modified_terminal", { bg = color.green, fg = color.light_blue })
hi(0, "lualine_b_diff_modified_visual", { bg = color.green, fg = color.light_blue })
hi(0, "lualine_b_diff_removed_command", { bg = color.green, fg = color.red })
hi(0, "lualine_b_diff_removed_inactive", { bg = color.light_slate_gray, fg = color.red })
hi(0, "lualine_b_diff_removed_insert", { bg = color.green, fg = color.red })
hi(0, "lualine_b_diff_removed_normal", { bg = color.green, fg = color.red })
hi(0, "lualine_b_diff_removed_replace", { bg = color.green, fg = color.red })
hi(0, "lualine_b_diff_removed_terminal", { bg = color.green, fg = color.red })
hi(0, "lualine_b_diff_removed_visual", { bg = color.green, fg = color.red })
hi(0, "lualine_b_inactive", { bg = color.light_slate_gray, fg = color.dark })
hi(0, "lualine_b_insert", { bg = color.green, fg = color.dark })
hi(0, "lualine_b_normal", { bg = color.green, fg = color.dark })
hi(0, "lualine_b_replace", { bg = color.green, fg = color.dark })
hi(0, "lualine_b_visual", { bg = color.green, fg = color.dark })
hi(0, "lualine_c_command", { bg = color.green, fg = color.dark })
hi(0, "lualine_c_inactive", { bg = color.light_slate_gray, fg = color.dark })
hi(0, "lualine_c_insert", { bg = color.green, fg = color.dark })
hi(0, "lualine_c_normal", { bg = color.green, fg = color.dark })
hi(0, "lualine_c_replace", { bg = color.green, fg = color.dark })
hi(0, "lualine_c_visual", { bg = color.green, fg = color.dark })
hi(0, "lualine_x_2_command", { bg = color.green, fg = color.peach_orange })
hi(0, "lualine_x_2_inactive", { bg = color.light_slate_gray, fg = color.peach_orange })
hi(0, "lualine_x_2_insert", { bg = color.green, fg = color.peach_orange })
hi(0, "lualine_x_2_normal", { bg = color.green, fg = color.peach_orange })
hi(0, "lualine_x_2_replace", { bg = color.green, fg = color.peach_orange })
hi(0, "lualine_x_2_terminal", { bg = color.green, fg = color.peach_orange })
hi(0, "lualine_x_2_visual", { bg = color.green, fg = color.peach_orange })
hi(0, "lualine_x_filetype_DevIconDefault_command", { bg = color.green, fg = color.slate_gray })
hi(0, "lualine_x_filetype_DevIconDefault_inactive", { bg = color.light_slate_gray, fg = color.slate_gray })
hi(0, "lualine_x_filetype_DevIconDefault_insert", { bg = color.green, fg = color.slate_gray })
hi(0, "lualine_x_filetype_DevIconDefault_normal", { bg = color.green, fg = color.slate_gray })
hi(0, "lualine_x_filetype_DevIconDefault_replace", { bg = color.green, fg = color.slate_gray })
hi(0, "lualine_x_filetype_DevIconDefault_terminal", { bg = color.green, fg = color.slate_gray })
hi(0, "lualine_x_filetype_DevIconDefault_visual", { bg = color.green, fg = color.slate_gray })
end
-- nvim-ts-rainbow
hi(0, "rainbowcol1", { fg = color.very_light_gray })
hi(0, "rainbowcol2", { fg = color.light_brown })

View file

@ -0,0 +1,582 @@
---@class Config
local config = {
opt = {
integrations = {
telescope = false,
lualine = true,
lsp_semantics_token = true,
nvim_cmp = true,
dap_nvim = true,
},
},
}
---@class MyModule
local M = {}
---@type Config
M.config = config
-- Xcode Dark palette: https://github.com/arzg/vim-colors-xcode
local color = {
-- Base
background = "#292a30",
dark = "#1e1f24",
selection = "#393b44",
inactive_bg = "#212226",
cursor_line = "#2d2f36",
medium_gray = "#3a3c44",
foreground = "#dfdfe0",
light_gray = "#a3b1bf",
comment = "#53606e",
dark_gray = "#53606e",
-- Syntax
pink = "#ff7ab2", -- keywords
red = "#ff8170", -- errors, exceptions
teal = "#78c2b3", -- types
light_teal = "#acf2e4", -- string escapes, special
yellow = "#ffa14f", -- macros, builtins, preprocessor
light_yellow = "#d9c97c", -- numbers
blue = "#4eb0cc", -- functions
light_blue = "#6bdfff", -- constructors, special functions
purple = "#b281eb", -- constants
light_purple = "#dabaff", -- type params, light constants
green = "#84b360", -- strings
light_green = "#b0e687", -- string interpolation
}
---@param args Config?
M.setup = function(args)
M.config = vim.tbl_deep_extend("force", M.config, args or {})
if vim.g.colors_name ~= nil then
vim.cmd("highlight clear")
end
if args and type(args.override) == "function" then
local c = args.override(color)
color = vim.tbl_deep_extend("force", color, c)
end
if vim.fn.has("nvim-0.13") == 0 then
vim.cmd("echohl WarningMsg | echo 'nvim >= 0.13 required' | echohl None")
end
vim.g.colors_name = "xcodedark"
vim.o.termguicolors = true
M.configure_highlights()
end
M.configure_highlights = function()
local hi = vim.api.nvim_set_hl
-- ── LSP semantic tokens ───────────────────────────────────────────────────
if M.config.opt.integrations.lsp_semantics_token then
hi(0, "@attribute", { link = "TSAttribute" })
hi(0, "@boolean", { link = "TSBoolean" })
hi(0, "@character", { link = "TSCharacter" })
hi(0, "@character.special", { link = "SpecialChar" })
hi(0, "@class", { link = "TSType" })
hi(0, "@comment", { link = "TSComment" })
hi(0, "@conditional", { link = "TSConditional" })
hi(0, "@constant", { link = "TSConstant" })
hi(0, "@constant.builtin", { link = "TSConstantBuiltin" })
hi(0, "@constant.macro", { link = "TSConstant" })
hi(0, "@constructor", { link = "TSConstructor" })
hi(0, "@decorator", { link = "TSAttribute" })
hi(0, "@enum", { link = "TSType" })
hi(0, "@enumMember", { link = "TSConstant" })
hi(0, "@error", { link = "TSError" })
hi(0, "@event", { link = "Identifier" })
hi(0, "@exception", { link = "TSException" })
hi(0, "@field", { link = "TSField" })
hi(0, "@float", { link = "TSFloat" })
hi(0, "@function", { link = "TSFunction" })
hi(0, "@function.builtin", { link = "TSFuncBuiltin" })
hi(0, "@function.call", { link = "TSFunctionCall" })
hi(0, "@function.macro", { link = "TSFuncMacro" })
hi(0, "@include", { link = "TSInclude" })
hi(0, "@interface", { link = "Structure" })
hi(0, "@keyword", { link = "TSKeyword" })
hi(0, "@keyword.function", { link = "TSKeywordFunction" })
hi(0, "@keyword.operator", { link = "TSKeywordOperator" })
hi(0, "@keyword.return", { link = "TSKeyword" })
hi(0, "@label", { link = "TSLabel" })
hi(0, "@method", { link = "TSMethod" })
hi(0, "@method.call", { link = "TSMethodCall" })
hi(0, "@modifier", { link = "TSKeyword" })
hi(0, "@namespace", { link = "TSNamespace" })
hi(0, "@none", { link = "TSNone" })
hi(0, "@number", { link = "TSNumber" })
hi(0, "@operator", { link = "TSOperator" })
hi(0, "@parameter", { link = "TSParameter" })
hi(0, "@property", { link = "TSField" })
hi(0, "@punctuation.bracket", { link = "TSPunctBracket" })
hi(0, "@punctuation.delimiter", { link = "TSPunctDelimiter" })
hi(0, "@punctuation.special", { link = "TSPunctSpecial" })
hi(0, "@regexp", { link = "TSStringRegex" })
hi(0, "@repeat", { link = "TSRepeat" })
hi(0, "@string", { link = "TSString" })
hi(0, "@string.escape", { link = "TSStringEscape" })
hi(0, "@string.regex", { link = "TSStringRegex" })
hi(0, "@string.special", { link = "SpecialChar" })
hi(0, "@struct", { link = "TSType" })
hi(0, "@symbol", { link = "TSSymbol" })
hi(0, "@tag", { link = "TSTag" })
hi(0, "@tag.attribute", { link = "TSAttribute" })
hi(0, "@tag.delimiter", { link = "TSTagDelimiter" })
hi(0, "@text", { link = "TSText" })
hi(0, "@text.danger", { link = "DiagnosticError" })
hi(0, "@text.emphasis", { link = "TSEmphasis" })
hi(0, "@text.environment", { link = "Macro" })
hi(0, "@text.environment.name", { link = "Type" })
hi(0, "@text.literal", { link = "TSLiteral" })
hi(0, "@text.math", { link = "Number" })
hi(0, "@text.note", { link = "Tag" })
hi(0, "@text.reference", { link = "TSParameterReference" })
hi(0, "@text.strike", { link = "TSStrike" })
hi(0, "@text.strong", { link = "TSStrong" })
hi(0, "@text.title", { link = "TSTitle" })
hi(0, "@text.todo", { link = "Todo" })
hi(0, "@text.underline", { link = "TSUnderline" })
hi(0, "@text.uri", { link = "TSURI" })
hi(0, "@text.warning", { link = "DiagnosticWarn" })
hi(0, "@type", { link = "TSType" })
hi(0, "@type.builtin", { link = "TSTypeBuiltin" })
hi(0, "@type.definition", { link = "TSTypeDefinition" })
hi(0, "@type.qualifier", { link = "TSType" })
hi(0, "@typeParameter", { link = "Type" })
hi(0, "@variable", { link = "TSVariable" })
hi(0, "@variable.builtin", { link = "TSVariableBuiltin" })
hi(0, "@lsp.type.namespace", { link = "TSNamespace" })
hi(0, "@lsp.type.variable", { link = "TSVariable" })
hi(0, "@lsp.type.parameter", { link = "TSVariable" })
hi(0, "@lsp.typemod.variable.readonly", { link = "TSConstant" })
hi(0, "@lsp.type.type", { link = "TSType" })
hi(0, "@lsp.type.function", {})
hi(0, "@lsp.type.method", {})
hi(0, "@lsp.type.comment", {})
hi(0, "@lsp.typemod.variable.defaultLibrary", { link = "TSKeyword" })
hi(0, "@lsp.mod.defaultLibrary.go", { link = "TSKeyword" })
hi(0, "@lsp.type.property", { link = "TSField" })
hi(0, "@tag.attribute.tsx", { link = "TSParameter" })
hi(0, "@tag.attribute.javascript", { link = "TSParameter" })
end
-- ── Base UI ───────────────────────────────────────────────────────────────
hi(0, "Normal", { bg = color.background, fg = color.foreground })
hi(0, "NormalFloat", { bg = color.dark, fg = color.foreground })
hi(0, "NormalNC", { bg = color.background, fg = color.foreground })
hi(0, "Bold", { bold = true })
hi(0, "Italic", { italic = true })
hi(0, "Cursor", { bg = color.light_gray, fg = color.background })
hi(0, "TermCursor", { bg = color.light_gray, fg = color.background })
hi(0, "TermCursorNC", { bg = color.dark_gray, fg = color.background })
hi(0, "iCursor", { bg = color.blue, fg = color.background })
hi(0, "lCursor", { bg = color.light_gray, fg = color.background })
hi(0, "CursorLine", { bg = color.cursor_line })
hi(0, "CursorColumn", { bg = color.cursor_line })
hi(0, "CursorLineNr", { bg = color.cursor_line, fg = color.light_gray, bold = true })
hi(0, "LineNr", { fg = color.comment })
hi(0, "SignColumn", { fg = color.comment })
hi(0, "FoldColumn", { fg = color.comment })
hi(0, "Folded", { bg = color.selection, fg = color.light_gray })
hi(0, "ColorColumn", { bg = color.cursor_line })
hi(0, "VertSplit", { fg = color.medium_gray })
hi(0, "WinSeparator", { fg = color.medium_gray })
hi(0, "StatusLine", { bg = color.selection, fg = color.foreground })
hi(0, "StatusLineNC", { bg = color.medium_gray, fg = color.light_gray })
hi(0, "TabLine", { bg = color.inactive_bg, fg = color.comment })
hi(0, "TabLineFill", { bg = color.inactive_bg })
hi(0, "TabLineSel", { bg = color.selection, fg = color.foreground, bold = true })
hi(0, "WinBar", { fg = color.foreground })
hi(0, "WinBarNC", { fg = color.light_gray })
hi(0, "Visual", { bg = color.selection })
hi(0, "VisualNOS", { fg = color.red })
hi(0, "Search", { bg = color.light_yellow, fg = color.background })
hi(0, "IncSearch", { bg = color.yellow, fg = color.background })
hi(0, "Substitute", { bg = color.light_yellow, fg = color.background })
hi(0, "Pmenu", { bg = color.dark, fg = color.foreground })
hi(0, "PmenuSel", { bg = color.selection, fg = color.foreground })
hi(0, "PmenuSbar", { bg = color.medium_gray })
hi(0, "PmenuThumb", { bg = color.light_gray })
hi(0, "FloatBorder", { fg = color.comment })
hi(0, "MatchParen", { fg = color.light_blue, bold = true })
hi(0, "NonText", { fg = color.medium_gray })
hi(0, "SpecialKey", { fg = color.comment })
hi(0, "Whitespace", { fg = color.medium_gray })
hi(0, "Directory", { fg = color.blue })
hi(0, "Title", { fg = color.blue, bold = true })
hi(0, "ErrorMsg", { fg = color.red })
hi(0, "WarningMsg", { fg = color.yellow })
hi(0, "ModeMsg", { fg = color.light_green, bold = true })
hi(0, "MoreMsg", { fg = color.light_green, bold = true })
hi(0, "Question", { fg = color.blue, bold = true })
hi(0, "QuickFixLine", { bg = color.cursor_line })
hi(0, "WildMenu", { bg = color.yellow, fg = color.background })
hi(0, "IndentBlanklineChar", { fg = color.medium_gray, nocombine = true })
hi(0, "IndentBlanklineContextChar", { fg = color.comment, nocombine = true })
hi(0, "IndentBlanklineContextStart",{ sp = color.teal, underline = true })
hi(0, "IndentBlanklineSpaceChar", { fg = color.medium_gray, nocombine = true })
hi(0, "TreesitterContext", { bg = color.cursor_line, italic = true })
-- ── Syntax ────────────────────────────────────────────────────────────────
hi(0, "Comment", { fg = color.comment, italic = true })
hi(0, "Constant", { fg = color.purple })
hi(0, "String", { fg = color.green })
hi(0, "Character", { fg = color.green })
hi(0, "Number", { fg = color.light_yellow })
hi(0, "Boolean", { fg = color.yellow })
hi(0, "Float", { fg = color.light_yellow })
hi(0, "Identifier", { fg = color.foreground })
hi(0, "Function", { fg = color.blue })
hi(0, "Statement", { fg = color.pink })
hi(0, "Conditional",{ fg = color.pink })
hi(0, "Repeat", { fg = color.pink })
hi(0, "Label", { fg = color.light_yellow })
hi(0, "Operator", { fg = color.light_gray })
hi(0, "Keyword", { fg = color.pink })
hi(0, "Exception", { fg = color.red })
hi(0, "PreProc", { fg = color.yellow })
hi(0, "Include", { fg = color.pink })
hi(0, "Define", { fg = color.yellow })
hi(0, "Macro", { fg = color.yellow })
hi(0, "Type", { fg = color.teal })
hi(0, "StorageClass",{ fg = color.pink })
hi(0, "Structure", { fg = color.teal })
hi(0, "Typedef", { fg = color.teal })
hi(0, "Special", { fg = color.light_teal })
hi(0, "SpecialChar",{ fg = color.light_teal })
hi(0, "Delimiter", { fg = color.light_gray })
hi(0, "Debug", { fg = color.red })
hi(0, "Error", { bg = color.red, fg = color.background })
hi(0, "Todo", { bg = color.selection, fg = color.light_yellow })
hi(0, "Underlined", { fg = color.blue, underline = true })
hi(0, "Ignore", { fg = color.dark })
hi(0, "Tag", { fg = color.light_yellow })
hi(0, "Bold", { bold = true })
-- ── Treesitter ────────────────────────────────────────────────────────────
hi(0, "TSAnnotation", { fg = color.yellow })
hi(0, "TSAttribute", { fg = color.yellow })
hi(0, "TSBoolean", { fg = color.yellow })
hi(0, "TSCharacter", { fg = color.green })
hi(0, "TSComment", { fg = color.comment, italic = true })
hi(0, "TSConditional", { fg = color.pink })
hi(0, "TSConstant", { fg = color.purple })
hi(0, "TSConstBuiltin", { fg = color.yellow, italic = true })
hi(0, "TSConstantBuiltin",{ fg = color.yellow, italic = true })
hi(0, "TSConstMacro", { fg = color.yellow })
hi(0, "TSConstructor", { fg = color.light_blue })
hi(0, "TSCurrentScope", { bold = true })
hi(0, "TSDefinition", { sp = color.light_gray, underline = true })
hi(0, "TSDefinitionUsage",{ sp = color.light_gray, underline = true })
hi(0, "TSEmphasis", { fg = color.yellow, italic = true })
hi(0, "TSError", { fg = color.red })
hi(0, "TSException", { fg = color.red })
hi(0, "TSField", { fg = color.foreground })
hi(0, "TSFloat", { fg = color.light_yellow })
hi(0, "TSFuncBuiltin", { fg = color.yellow, italic = true })
hi(0, "TSFuncMacro", { fg = color.yellow })
hi(0, "TSFunction", { fg = color.blue })
hi(0, "TSFunctionCall", { fg = color.light_teal })
hi(0, "TSMethodCall", { fg = color.light_teal })
hi(0, "TSInclude", { fg = color.pink })
hi(0, "TSKeyword", { fg = color.pink })
hi(0, "TSKeywordFunction",{ fg = color.pink })
hi(0, "TSKeywordOperator",{ fg = color.pink })
hi(0, "TSLabel", { fg = color.light_yellow })
hi(0, "TSLiteral", { fg = color.green })
hi(0, "TSMethod", { fg = color.blue })
hi(0, "TSNamespace", { fg = color.teal })
hi(0, "TSNone", { fg = color.foreground })
hi(0, "TSNumber", { fg = color.light_yellow })
hi(0, "TSOperator", { fg = color.light_gray })
hi(0, "TSParameter", { fg = color.foreground })
hi(0, "TSParameterReference",{ fg = color.foreground })
hi(0, "TSProperty", { fg = color.foreground })
hi(0, "TSPunctBracket", { fg = color.light_gray })
hi(0, "TSPunctDelimiter",{ fg = color.light_gray })
hi(0, "TSPunctSpecial", { fg = color.light_teal })
hi(0, "TSRepeat", { fg = color.pink })
hi(0, "TSString", { fg = color.green })
hi(0, "TSStringEscape", { fg = color.light_teal })
hi(0, "TSStringRegex", { fg = color.light_teal })
hi(0, "TSStrong", { bold = true })
hi(0, "TSStrike", { fg = color.dark, strikethrough = true })
hi(0, "TSSymbol", { fg = color.light_green })
hi(0, "TSTag", { fg = color.light_yellow })
hi(0, "TSTagDelimiter", { fg = color.light_gray })
hi(0, "TSText", { fg = color.foreground })
hi(0, "TSTitle", { fg = color.blue, bold = true })
hi(0, "TSType", { fg = color.teal })
hi(0, "TSTypeBuiltin", { fg = color.yellow, italic = true })
hi(0, "TSTypeDefinition",{ fg = color.teal })
hi(0, "TSURI", { fg = color.blue, underline = true })
hi(0, "TSUnderline", { underline = true })
hi(0, "TSVariable", { fg = color.foreground })
hi(0, "TSVariableBuiltin",{ fg = color.yellow, italic = true })
-- ── Statement / Identifier overrides ─────────────────────────────────────
hi(0, "Statement", { link = "TSKeyword" })
hi(0, "Comment", { link = "TSComment" })
hi(0, "Number", { link = "TSNumber" })
hi(0, "String", { link = "TSString" })
hi(0, "Identifier", { link = "TSVariable" })
hi(0, "@lsp.type.keyword.go", { link = "TSKeyword" })
hi(0, "@lsp.type.string.go", { link = "TSString" })
hi(0, "@lsp.type.function", { link = "TSFunctionCall" })
hi(0, "@lsp.typemod.function.definition", { link = "TSFunction" })
hi(0, "@lsp.type.method", { link = "TSMethod" })
hi(0, "goBlock", { link = "TSVariable" })
hi(0, "goImportString", { link = "TSString" })
-- ── Diagnostics ───────────────────────────────────────────────────────────
hi(0, "DiagnosticError", { fg = color.red })
hi(0, "DiagnosticWarn", { fg = color.yellow })
hi(0, "DiagnosticInfo", { fg = color.blue })
hi(0, "DiagnosticHint", { fg = color.teal })
hi(0, "DiagnosticUnderlineError", { sp = color.red, undercurl = true })
hi(0, "DiagnosticUnderlineWarn", { sp = color.yellow, undercurl = true })
hi(0, "DiagnosticUnderlineInformation",{ sp = color.blue, undercurl = true })
hi(0, "DiagnosticUnderlineHint", { sp = color.teal, undercurl = true })
hi(0, "DiagnosticUnderlineWarning", { sp = color.yellow, undercurl = true })
hi(0, "LspDiagnosticsDefaultError", { link = "DiagnosticError" })
hi(0, "LspDiagnosticsDefaultHint", { link = "DiagnosticHint" })
hi(0, "LspDiagnosticsDefaultInformation", { link = "DiagnosticInfo" })
hi(0, "LspDiagnosticsDefaultWarning", { link = "DiagnosticWarn" })
hi(0, "LspDiagnosticsUnderlineError", { link = "DiagnosticUnderlineError" })
hi(0, "LspDiagnosticsUnderlineHint", { link = "DiagnosticUnderlineHint" })
hi(0, "LspDiagnosticsUnderlineInformation", { link = "DiagnosticUnderlineInformation" })
hi(0, "LspDiagnosticsUnderlineWarning",{ link = "DiagnosticUnderlineWarning" })
hi(0, "LspReferenceRead", { sp = color.light_gray, underline = true })
hi(0, "LspReferenceText", { sp = color.light_gray, underline = true })
hi(0, "LspReferenceWrite", { sp = color.light_gray, underline = true })
-- ── nvim-cmp ──────────────────────────────────────────────────────────────
if M.config.opt.integrations.nvim_cmp then
hi(0, "CmpDocumentation", { fg = color.foreground })
hi(0, "CmpDocumentationBorder", { fg = color.comment })
hi(0, "CmpItemAbbr", { fg = color.foreground })
hi(0, "CmpItemAbbrDeprecated", { fg = color.comment, strikethrough = true })
hi(0, "CmpItemAbbrMatch", { fg = color.blue })
hi(0, "CmpItemAbbrMatchFuzzy", { fg = color.blue })
hi(0, "CmpItemKindDefault", { fg = color.blue })
hi(0, "CmpItemKindClass", { fg = color.teal })
hi(0, "CmpItemKindConstant", { fg = color.purple })
hi(0, "CmpItemKindConstructor", { fg = color.light_blue })
hi(0, "CmpItemKindEnum", { fg = color.teal })
hi(0, "CmpItemKindEnumMember", { fg = color.light_purple })
hi(0, "CmpItemKindEvent", { fg = color.teal })
hi(0, "CmpItemKindField", { fg = color.foreground })
hi(0, "CmpItemKindFunction", { fg = color.blue })
hi(0, "CmpItemKindInterface", { fg = color.teal })
hi(0, "CmpItemKindKeyword", { fg = color.pink })
hi(0, "CmpItemKindMethod", { fg = color.blue })
hi(0, "CmpItemKindModule", { fg = color.foreground })
hi(0, "CmpItemKindOperator", { fg = color.light_gray })
hi(0, "CmpItemKindProperty", { fg = color.foreground })
hi(0, "CmpItemKindReference", { fg = color.foreground })
hi(0, "CmpItemKindSnippet", { fg = color.light_gray })
hi(0, "CmpItemKindStruct", { fg = color.teal })
hi(0, "CmpItemKindTypeParameter",{ fg = color.light_purple })
hi(0, "CmpItemKindUnit", { fg = color.light_yellow })
hi(0, "CmpItemKindValue", { fg = color.purple })
hi(0, "CmpItemKindVariable", { fg = color.foreground })
hi(0, "CmpItemMenu", { fg = color.comment })
end
-- ── DAP ───────────────────────────────────────────────────────────────────
if M.config.opt.integrations.dap_nvim then
hi(0, "DapUIBreakpointsCurrentLine", { bold = true, fg = color.light_green })
hi(0, "DapUIBreakpointsDisabledLine",{ fg = color.comment })
hi(0, "DapUIBreakpointsInfo", { fg = color.light_green })
hi(0, "DapUIBreakpointsPath", { fg = color.light_teal })
hi(0, "DapUIDecoration", { fg = color.light_teal })
hi(0, "DapUIFloatBorder", { fg = color.light_teal })
hi(0, "DapUILineNumber", { fg = color.light_teal })
hi(0, "DapUIModifiedValue", { bold = true, fg = color.light_teal })
hi(0, "DapUIPlayPause", { fg = color.light_green })
hi(0, "DapUIPlayPauseNC", { fg = color.light_green })
hi(0, "DapUIRestart", { fg = color.light_green })
hi(0, "DapUIRestartNC", { fg = color.light_green })
hi(0, "DapUIScope", { fg = color.light_teal })
hi(0, "DapUISource", { fg = color.light_purple })
hi(0, "DapUIStepBack", { fg = color.blue })
hi(0, "DapUIStepBackNC", { fg = color.blue })
hi(0, "DapUIStepInto", { fg = color.blue })
hi(0, "DapUIStepIntoNC", { fg = color.blue })
hi(0, "DapUIStepOut", { fg = color.blue })
hi(0, "DapUIStepOutNC", { fg = color.blue })
hi(0, "DapUIStepOver", { fg = color.blue })
hi(0, "DapUIStepOverNC", { fg = color.blue })
hi(0, "DapUIStop", { fg = color.red })
hi(0, "DapUIStopNC", { fg = color.red })
hi(0, "DapUIStoppedThread", { fg = color.light_teal })
hi(0, "DapUIThread", { fg = color.light_green })
hi(0, "DapUIType", { fg = color.light_purple })
hi(0, "DapUIUnavailable", { fg = color.comment })
hi(0, "DapUIUnavailableNC", { fg = color.comment })
hi(0, "DapUIWatchesEmpty", { fg = color.red })
hi(0, "DapUIWatchesError", { fg = color.red })
hi(0, "DapUIWatchesValue", { fg = color.light_green })
end
-- ── Git ───────────────────────────────────────────────────────────────────
hi(0, "GitGutterAdd", { fg = color.green })
hi(0, "GitGutterChange", { fg = color.blue })
hi(0, "GitGutterChangeDelete", { fg = color.yellow })
hi(0, "GitGutterDelete", { fg = color.red })
hi(0, "GitSignsCurrentLineBlame", { fg = color.comment, italic = true })
hi(0, "GitSignsStagedAdd", { fg = color.light_green })
hi(0, "GitSignsStagedChange", { fg = color.teal })
hi(0, "GitSignsStagedDelete", { fg = color.red })
hi(0, "gitcommitBranch", { bold = true, fg = color.yellow })
hi(0, "gitcommitComment", { fg = color.comment })
hi(0, "gitcommitDiscarded", { fg = color.comment })
hi(0, "gitcommitDiscardedFile", { bold = true, fg = color.red })
hi(0, "gitcommitDiscardedType", { fg = color.blue })
hi(0, "gitcommitHeader", { fg = color.pink })
hi(0, "gitcommitOverflow", { fg = color.red })
hi(0, "gitcommitSelected", { fg = color.comment })
hi(0, "gitcommitSelectedFile", { bold = true, fg = color.light_green })
hi(0, "gitcommitSelectedType", { fg = color.blue })
hi(0, "gitcommitSummary", { fg = color.light_green })
hi(0, "gitcommitUnmergedFile", { bold = true, fg = color.red })
hi(0, "gitcommitUnmergedType", { fg = color.blue })
hi(0, "gitcommitUntracked", { fg = color.comment })
hi(0, "gitcommitUntrackedFile", { fg = color.light_yellow })
-- ── Notify ────────────────────────────────────────────────────────────────
hi(0, "NotifyDEBUGBody", { link = "Normal" })
hi(0, "NotifyDEBUGBorder", { fg = color.comment })
hi(0, "NotifyDEBUGIcon", { fg = color.comment })
hi(0, "NotifyDEBUGTitle", { fg = color.comment })
hi(0, "NotifyERRORBody", { link = "Normal" })
hi(0, "NotifyERRORBorder", { fg = color.red })
hi(0, "NotifyERRORIcon", { fg = color.red })
hi(0, "NotifyERRORTitle", { fg = color.red })
hi(0, "NotifyINFOBody", { link = "Normal" })
hi(0, "NotifyINFOBorder", { fg = color.light_gray })
hi(0, "NotifyINFOIcon", { fg = color.light_gray })
hi(0, "NotifyINFOTitle", { fg = color.light_gray })
hi(0, "NotifyTRACEBody", { link = "Normal" })
hi(0, "NotifyTRACEBorder", { fg = color.purple })
hi(0, "NotifyTRACEIcon", { fg = color.purple })
hi(0, "NotifyTRACETitle", { fg = color.purple })
hi(0, "NotifyWARNBody", { link = "Normal" })
hi(0, "NotifyWARNBorder", { fg = color.yellow })
hi(0, "NotifyWARNIcon", { fg = color.yellow })
hi(0, "NotifyWARNTitle", { fg = color.yellow })
-- ── Telescope ─────────────────────────────────────────────────────────────
if M.config.opt.integrations.telescope then
hi(0, "TelescopeBorder", { bg = color.dark, fg = color.dark })
hi(0, "TelescopeNormal", { bg = color.dark })
hi(0, "TelescopePreviewLine", { bg = color.cursor_line })
hi(0, "TelescopePreviewTitle", { bg = color.light_green, fg = color.background })
hi(0, "TelescopePromptBorder", { bg = color.medium_gray, fg = color.medium_gray })
hi(0, "TelescopePromptNormal", { bg = color.medium_gray, fg = color.foreground })
hi(0, "TelescopePromptPrefix", { bg = color.medium_gray, fg = color.red })
hi(0, "TelescopePromptTitle", { bg = color.red, fg = color.background })
hi(0, "TelescopeResultsTitle", { bg = color.dark, fg = color.dark })
hi(0, "TelescopeSelection", { bg = color.medium_gray })
end
-- ── Snacks Dashboard ──────────────────────────────────────────────────────
hi(0, "SnacksDashboardHeader", { fg = color.light_yellow, bold = true })
hi(0, "SnacksDashboardTitle", { fg = color.yellow, bold = true })
hi(0, "SnacksDashboardIcon", { fg = color.blue })
hi(0, "SnacksDashboardDesc", { fg = color.light_gray })
hi(0, "SnacksDashboardFile", { fg = color.light_teal, bold = true })
hi(0, "SnacksDashboardKey", { fg = color.pink })
hi(0, "SnacksDashboardSpecial", { fg = color.light_gray })
hi(0, "SnacksDashboardDir", { fg = color.light_gray })
hi(0, "SnacksDashboardNormal", { fg = color.light_gray })
hi(0, "SnacksDashboardTerminal", { fg = color.light_gray })
hi(0, "SnacksDashboardFooter", { fg = color.comment })
-- ── Neo-Tree ──────────────────────────────────────────────────────────────
hi(0, "NeoTreeFileName", { fg = color.foreground })
hi(0, "NeoTreeDotfile", { fg = color.comment })
hi(0, "NeoTreeDirectoryName", { fg = color.yellow })
hi(0, "NeoTreeDirectoryIcon", { fg = color.yellow })
hi(0, "NeoTreeGitModified", { fg = color.yellow })
hi(0, "NeoTreeGitStaged", { fg = color.green })
hi(0, "NeoTreeGitUntracked", { fg = color.purple })
hi(0, "NeoTreeNormal", { fg = color.foreground, bg = color.dark })
hi(0, "NeoTreeNormalNC", { fg = color.foreground, bg = color.dark })
hi(0, "NeoTreeTabActive", { fg = color.foreground, bg = color.dark, bold = true })
hi(0, "NeoTreeTabInactive", { fg = color.comment, bg = color.dark })
hi(0, "NeoTreeTabSeparatorActive", { fg = color.foreground, bg = color.dark })
hi(0, "NeoTreeTabSeparatorInactive", { fg = color.comment, bg = color.dark })
-- ── Copilot ───────────────────────────────────────────────────────────────
hi(0, "CopilotSuggestion", { fg = color.comment })
-- ── Spell ─────────────────────────────────────────────────────────────────
hi(0, "SpellBad", { sp = color.red, undercurl = true })
hi(0, "SpellCap", { sp = color.blue, undercurl = true })
hi(0, "SpellLocal", { sp = color.teal, undercurl = true })
hi(0, "SpellRare", { sp = color.yellow, undercurl = true })
-- ── nvim-ts-rainbow ───────────────────────────────────────────────────────
hi(0, "rainbowcol1", { fg = color.foreground })
hi(0, "rainbowcol2", { fg = color.yellow })
hi(0, "rainbowcol3", { fg = color.teal })
hi(0, "rainbowcol4", { fg = color.light_purple })
hi(0, "rainbowcol5", { fg = color.blue })
hi(0, "rainbowcol6", { fg = color.pink })
hi(0, "rainbowcol7", { fg = color.light_teal })
-- ── User / StatusLine accents ─────────────────────────────────────────────
hi(0, "User1", { bg = color.selection, fg = color.red })
hi(0, "User2", { bg = color.selection, fg = color.yellow })
hi(0, "User3", { bg = color.selection, fg = color.foreground })
hi(0, "User4", { bg = color.selection, fg = color.blue })
hi(0, "User5", { bg = color.selection, fg = color.light_gray })
hi(0, "User6", { bg = color.dark, fg = color.light_gray })
hi(0, "User7", { bg = color.selection, fg = color.light_gray })
hi(0, "User8", { bg = color.selection, fg = color.background })
hi(0, "User9", { bg = color.selection, fg = color.background })
-- ── Terminal colors ───────────────────────────────────────────────────────
local g = vim.g
g.terminal_color_0 = color.background
g.terminal_color_1 = color.red
g.terminal_color_2 = color.green
g.terminal_color_3 = color.light_yellow
g.terminal_color_4 = color.blue
g.terminal_color_5 = color.purple
g.terminal_color_6 = color.teal
g.terminal_color_7 = color.light_gray
g.terminal_color_8 = color.dark_gray
g.terminal_color_9 = color.pink
g.terminal_color_10 = color.light_green
g.terminal_color_11 = color.yellow
g.terminal_color_12 = color.light_blue
g.terminal_color_13 = color.light_purple
g.terminal_color_14 = color.light_teal
g.terminal_color_15 = color.foreground
end
return M

View file

@ -0,0 +1,606 @@
---@class Config
local config = {
opt = {
integrations = {
telescope = false,
lualine = true,
lsp_semantics_token = true,
nvim_cmp = true,
dap_nvim = true,
},
},
}
---@class MyModule
local M = {}
---@type Config
M.config = config
-- Hybrid: xcodedark backgrounds + nvim-default color philosophy
-- default-dark: Keywords=Yellow bold, Constants=Magenta, Strings=Magenta,
-- Types=Green bold, Functions=Cyan, PreProc=Magenta
-- xcodedark supplies every hex value; bold/italic modifiers come from default.
local color = {
-- ── Backgrounds (xcodedark) ────────────────────────────────────────────
background = "#292a30",
dark = "#1e1f24",
selection = "#393b44",
inactive_bg = "#212226",
cursor_line = "#2d2f36",
medium_gray = "#3a3c44",
-- ── Foregrounds (xcodedark) ────────────────────────────────────────────
foreground = "#dfdfe0",
light_gray = "#a3b1bf",
-- ── Comment: brighter than pure xcode gray so it reads like default cyan
comment = "#6b8a9e",
-- ── Syntax — mapped to default's color roles ───────────────────────────
-- default: Statement/Keyword = Yellow bold → xcode yellow
yellow = "#ffa14f",
-- default: Constant/String/Number = Magenta → xcode purple / light-purple
purple = "#b281eb",
light_purple = "#dabaff",
-- default: Identifier/Function = Cyan → xcode teal / light-teal
teal = "#78c2b3",
light_teal = "#acf2e4",
-- default: Type = Green bold → xcode green / light-green
green = "#84b360",
light_green = "#b0e687",
-- default: PreProc = Magenta (bright) → xcode pink
pink = "#ff7ab2",
-- default: Special = DarkCyan → xcode light-blue
light_blue = "#6bdfff",
blue = "#4eb0cc",
-- default: Error = Red → xcode red
red = "#ff8170",
-- extras
light_yellow = "#d9c97c",
}
---@param args Config?
M.setup = function(args)
M.config = vim.tbl_deep_extend("force", M.config, args or {})
if vim.g.colors_name ~= nil then
vim.cmd("highlight clear")
end
if args and type(args.override) == "function" then
local c = args.override(color)
color = vim.tbl_deep_extend("force", color, c)
end
if vim.fn.has("nvim-0.8.3") == 0 then
vim.cmd("echohl WarningMsg | echo 'nvim >= 0.8.3 required' | echohl None")
end
vim.g.colors_name = "xcodedefault"
vim.o.termguicolors = true
M.configure_highlights()
end
M.configure_highlights = function()
local hi = vim.api.nvim_set_hl
-- ── LSP semantic tokens ───────────────────────────────────────────────────
if M.config.opt.integrations.lsp_semantics_token then
hi(0, "@attribute", { link = "TSAttribute" })
hi(0, "@boolean", { link = "TSBoolean" })
hi(0, "@character", { link = "TSCharacter" })
hi(0, "@character.special", { link = "SpecialChar" })
hi(0, "@class", { link = "TSType" })
hi(0, "@comment", { link = "TSComment" })
hi(0, "@conditional", { link = "TSConditional" })
hi(0, "@constant", { link = "TSConstant" })
hi(0, "@constant.builtin", { link = "TSConstantBuiltin" })
hi(0, "@constant.macro", { link = "TSConstant" })
hi(0, "@constructor", { link = "TSConstructor" })
hi(0, "@decorator", { link = "TSAttribute" })
hi(0, "@enum", { link = "TSType" })
hi(0, "@enumMember", { link = "TSConstant" })
hi(0, "@error", { link = "TSError" })
hi(0, "@event", { link = "Identifier" })
hi(0, "@exception", { link = "TSException" })
hi(0, "@field", { link = "TSField" })
hi(0, "@float", { link = "TSFloat" })
hi(0, "@function", { link = "TSFunction" })
hi(0, "@function.builtin", { link = "TSFuncBuiltin" })
hi(0, "@function.call", { link = "TSFunctionCall" })
hi(0, "@function.macro", { link = "TSFuncMacro" })
hi(0, "@include", { link = "TSInclude" })
hi(0, "@interface", { link = "Structure" })
hi(0, "@keyword", { link = "TSKeyword" })
hi(0, "@keyword.function", { link = "TSKeywordFunction" })
hi(0, "@keyword.operator", { link = "TSKeywordOperator" })
hi(0, "@keyword.return", { link = "TSKeyword" })
hi(0, "@label", { link = "TSLabel" })
hi(0, "@method", { link = "TSMethod" })
hi(0, "@method.call", { link = "TSMethodCall" })
hi(0, "@modifier", { link = "TSKeyword" })
hi(0, "@namespace", { link = "TSNamespace" })
hi(0, "@none", { link = "TSNone" })
hi(0, "@number", { link = "TSNumber" })
hi(0, "@operator", { link = "TSOperator" })
hi(0, "@parameter", { link = "TSParameter" })
hi(0, "@property", { link = "TSField" })
hi(0, "@punctuation.bracket", { link = "TSPunctBracket" })
hi(0, "@punctuation.delimiter", { link = "TSPunctDelimiter" })
hi(0, "@punctuation.special", { link = "TSPunctSpecial" })
hi(0, "@regexp", { link = "TSStringRegex" })
hi(0, "@repeat", { link = "TSRepeat" })
hi(0, "@string", { link = "TSString" })
hi(0, "@string.escape", { link = "TSStringEscape" })
hi(0, "@string.regex", { link = "TSStringRegex" })
hi(0, "@string.special", { link = "SpecialChar" })
hi(0, "@struct", { link = "TSType" })
hi(0, "@symbol", { link = "TSSymbol" })
hi(0, "@tag", { link = "TSTag" })
hi(0, "@tag.attribute", { link = "TSAttribute" })
hi(0, "@tag.delimiter", { link = "TSTagDelimiter" })
hi(0, "@text", { link = "TSText" })
hi(0, "@text.danger", { link = "DiagnosticError" })
hi(0, "@text.emphasis", { link = "TSEmphasis" })
hi(0, "@text.environment", { link = "Macro" })
hi(0, "@text.environment.name", { link = "Type" })
hi(0, "@text.literal", { link = "TSLiteral" })
hi(0, "@text.math", { link = "Number" })
hi(0, "@text.note", { link = "Tag" })
hi(0, "@text.reference", { link = "TSParameterReference" })
hi(0, "@text.strike", { link = "TSStrike" })
hi(0, "@text.strong", { link = "TSStrong" })
hi(0, "@text.title", { link = "TSTitle" })
hi(0, "@text.todo", { link = "Todo" })
hi(0, "@text.underline", { link = "TSUnderline" })
hi(0, "@text.uri", { link = "TSURI" })
hi(0, "@text.warning", { link = "DiagnosticWarn" })
hi(0, "@type", { link = "TSType" })
hi(0, "@type.builtin", { link = "TSTypeBuiltin" })
hi(0, "@type.definition", { link = "TSTypeDefinition" })
hi(0, "@type.qualifier", { link = "TSType" })
hi(0, "@typeParameter", { link = "Type" })
hi(0, "@variable", { link = "TSVariable" })
hi(0, "@variable.builtin", { link = "TSVariableBuiltin" })
hi(0, "@lsp.type.namespace", { link = "TSNamespace" })
hi(0, "@lsp.type.variable", { link = "TSVariable" })
hi(0, "@lsp.type.parameter", { link = "TSVariable" })
hi(0, "@lsp.typemod.variable.readonly", { link = "TSConstant" })
hi(0, "@lsp.type.type", { link = "TSType" })
hi(0, "@lsp.type.function", {})
hi(0, "@lsp.type.method", {})
hi(0, "@lsp.type.comment", {})
hi(0, "@lsp.typemod.variable.defaultLibrary", { link = "TSVariableBuiltin" })
hi(0, "@lsp.mod.defaultLibrary.go", { link = "TSVariableBuiltin" })
hi(0, "@lsp.type.property", { link = "TSField" })
hi(0, "@tag.attribute.tsx", { link = "TSParameter" })
hi(0, "@tag.attribute.javascript", { link = "TSParameter" })
end
-- ── Base UI ───────────────────────────────────────────────────────────────
hi(0, "Normal", { bg = color.background, fg = color.foreground })
hi(0, "NormalFloat", { bg = color.dark, fg = color.foreground })
hi(0, "NormalNC", { bg = color.background, fg = color.foreground })
hi(0, "Bold", { bold = true })
hi(0, "Italic", { italic = true })
hi(0, "Cursor", { bg = color.light_gray, fg = color.background })
hi(0, "TermCursor", { bg = color.light_gray, fg = color.background })
hi(0, "TermCursorNC", { bg = color.comment, fg = color.background })
hi(0, "iCursor", { bg = color.teal, fg = color.background })
hi(0, "lCursor", { bg = color.light_gray, fg = color.background })
hi(0, "CursorLine", { bg = color.cursor_line })
hi(0, "CursorColumn", { bg = color.cursor_line })
hi(0, "CursorLineNr", { bg = color.cursor_line, fg = color.light_gray, bold = true })
hi(0, "LineNr", { fg = color.comment })
hi(0, "SignColumn", { fg = color.comment })
hi(0, "FoldColumn", { fg = color.comment })
hi(0, "Folded", { bg = color.selection, fg = color.light_gray })
hi(0, "ColorColumn", { bg = color.cursor_line })
hi(0, "VertSplit", { fg = color.medium_gray })
hi(0, "WinSeparator", { fg = color.medium_gray })
hi(0, "StatusLine", { bg = color.selection, fg = color.foreground })
hi(0, "StatusLineNC", { bg = color.medium_gray, fg = color.light_gray })
hi(0, "TabLine", { bg = color.inactive_bg, fg = color.comment })
hi(0, "TabLineFill", { bg = color.inactive_bg })
hi(0, "TabLineSel", { bg = color.selection, fg = color.foreground, bold = true })
hi(0, "WinBar", { fg = color.foreground })
hi(0, "WinBarNC", { fg = color.light_gray })
hi(0, "Visual", { bg = color.selection })
hi(0, "VisualNOS", { fg = color.red })
-- default uses reversed/highlighted search — keep that boldness
hi(0, "Search", { bg = color.yellow, fg = color.background, bold = true })
hi(0, "IncSearch", { bg = color.light_yellow, fg = color.background, bold = true })
hi(0, "Substitute", { bg = color.yellow, fg = color.background })
hi(0, "Pmenu", { bg = color.dark, fg = color.foreground })
hi(0, "PmenuSel", { bg = color.selection, fg = color.foreground })
hi(0, "PmenuSbar", { bg = color.medium_gray })
hi(0, "PmenuThumb", { bg = color.light_gray })
hi(0, "FloatBorder", { fg = color.comment })
hi(0, "MatchParen", { fg = color.light_teal, bold = true })
hi(0, "NonText", { fg = color.medium_gray })
hi(0, "SpecialKey", { fg = color.comment })
hi(0, "Whitespace", { fg = color.medium_gray })
hi(0, "Directory", { fg = color.teal, bold = true })
hi(0, "Title", { fg = color.teal, bold = true })
hi(0, "ErrorMsg", { fg = color.red })
hi(0, "WarningMsg", { fg = color.yellow })
hi(0, "ModeMsg", { fg = color.light_green, bold = true })
hi(0, "MoreMsg", { fg = color.light_green, bold = true })
hi(0, "Question", { fg = color.light_green, bold = true })
hi(0, "QuickFixLine", { bg = color.cursor_line })
hi(0, "WildMenu", { bg = color.yellow, fg = color.background })
hi(0, "IndentBlanklineChar", { fg = color.medium_gray, nocombine = true })
hi(0, "IndentBlanklineContextChar", { fg = color.comment, nocombine = true })
hi(0, "IndentBlanklineContextStart", { sp = color.teal, underline = true })
hi(0, "IndentBlanklineSpaceChar", { fg = color.medium_gray, nocombine = true })
hi(0, "TreesitterContext", { bg = color.cursor_line, italic = true })
-- ── Syntax — default color philosophy, xcodedark hex values ──────────────
-- Comment → teal-gray (default: Cyan)
hi(0, "Comment", { fg = color.comment, italic = true })
-- Constant → purple (default: Magenta)
hi(0, "Constant", { fg = color.purple })
-- String → purple (default: Magenta — strings = constants in default)
hi(0, "String", { fg = color.purple })
hi(0, "Character", { fg = color.purple })
-- Number → light-yellow (default: Magenta, we keep xcode numeric color)
hi(0, "Number", { fg = color.light_yellow })
hi(0, "Boolean", { fg = color.purple })
hi(0, "Float", { fg = color.light_yellow })
-- Identifier/Function → teal/cyan (default: Cyan)
hi(0, "Identifier", { fg = color.teal })
hi(0, "Function", { fg = color.teal })
-- Statement/Keyword → yellow bold (default: Yellow bold)
hi(0, "Statement", { fg = color.yellow, bold = true })
hi(0, "Conditional", { fg = color.yellow, bold = true })
hi(0, "Repeat", { fg = color.yellow, bold = true })
hi(0, "Label", { fg = color.yellow, bold = true })
hi(0, "Operator", { fg = color.light_gray })
hi(0, "Keyword", { fg = color.yellow, bold = true })
hi(0, "Exception", { fg = color.yellow, bold = true })
-- PreProc → pink/magenta (default: Magenta bright)
hi(0, "PreProc", { fg = color.pink })
hi(0, "Include", { fg = color.pink })
hi(0, "Define", { fg = color.pink })
hi(0, "Macro", { fg = color.pink })
-- Type → green bold (default: Green bold)
hi(0, "Type", { fg = color.green, bold = true })
hi(0, "StorageClass",{ fg = color.yellow, bold = true })
hi(0, "Structure", { fg = color.green, bold = true })
hi(0, "Typedef", { fg = color.green, bold = true })
-- Special → light-blue/DarkCyan (default: DarkCyan)
hi(0, "Special", { fg = color.light_blue })
hi(0, "SpecialChar", { fg = color.light_teal })
hi(0, "Delimiter", { fg = color.light_gray })
hi(0, "Debug", { fg = color.red })
hi(0, "Error", { bg = color.red, fg = color.background, bold = true })
hi(0, "Todo", { bg = color.selection, fg = color.yellow, bold = true })
hi(0, "Underlined", { fg = color.teal, underline = true })
hi(0, "Ignore", { fg = color.dark })
hi(0, "Tag", { fg = color.light_yellow })
-- ── Treesitter — respects default's bold/italic conventions ──────────────
hi(0, "TSAnnotation", { fg = color.pink })
hi(0, "TSAttribute", { fg = color.pink })
hi(0, "TSBoolean", { fg = color.purple })
hi(0, "TSCharacter", { fg = color.purple })
hi(0, "TSComment", { fg = color.comment, italic = true })
hi(0, "TSConditional", { fg = color.yellow, bold = true })
hi(0, "TSConstant", { fg = color.purple })
hi(0, "TSConstBuiltin", { fg = color.purple, italic = true })
hi(0, "TSConstantBuiltin",{ fg = color.purple, italic = true })
hi(0, "TSConstMacro", { fg = color.pink })
hi(0, "TSConstructor", { fg = color.light_blue })
hi(0, "TSCurrentScope", { bold = true })
hi(0, "TSDefinition", { sp = color.light_gray, underline = true })
hi(0, "TSDefinitionUsage",{ sp = color.light_gray, underline = true })
hi(0, "TSEmphasis", { fg = color.yellow, italic = true })
hi(0, "TSError", { fg = color.red })
hi(0, "TSException", { fg = color.yellow, bold = true })
hi(0, "TSField", { fg = color.foreground })
hi(0, "TSFloat", { fg = color.light_yellow })
hi(0, "TSFuncBuiltin", { fg = color.light_teal, bold = true })
hi(0, "TSFuncMacro", { fg = color.pink })
hi(0, "TSFunction", { fg = color.teal, bold = true }) -- bold like default Function
hi(0, "TSFunctionCall", { fg = color.teal })
hi(0, "TSMethodCall", { fg = color.teal })
hi(0, "TSInclude", { fg = color.pink })
hi(0, "TSKeyword", { fg = color.yellow, bold = true })
hi(0, "TSKeywordFunction",{ fg = color.yellow, bold = true })
hi(0, "TSKeywordOperator",{ fg = color.yellow, bold = true })
hi(0, "TSLabel", { fg = color.yellow, bold = true })
hi(0, "TSLiteral", { fg = color.purple })
hi(0, "TSMethod", { fg = color.teal, bold = true })
hi(0, "TSNamespace", { fg = color.light_teal })
hi(0, "TSNone", { fg = color.foreground })
hi(0, "TSNumber", { fg = color.light_yellow })
hi(0, "TSOperator", { fg = color.light_gray })
hi(0, "TSParameter", { fg = color.foreground })
hi(0, "TSParameterReference",{ fg = color.foreground })
hi(0, "TSProperty", { fg = color.foreground })
hi(0, "TSPunctBracket", { fg = color.light_gray })
hi(0, "TSPunctDelimiter", { fg = color.light_gray })
hi(0, "TSPunctSpecial", { fg = color.light_teal })
hi(0, "TSRepeat", { fg = color.yellow, bold = true })
hi(0, "TSString", { fg = color.purple }) -- strings=magenta in default
hi(0, "TSStringEscape", { fg = color.light_teal })
hi(0, "TSStringRegex", { fg = color.light_teal })
hi(0, "TSStrong", { bold = true })
hi(0, "TSStrike", { fg = color.dark, strikethrough = true })
hi(0, "TSSymbol", { fg = color.light_green })
hi(0, "TSTag", { fg = color.yellow, bold = true })
hi(0, "TSTagDelimiter", { fg = color.light_gray })
hi(0, "TSText", { fg = color.foreground })
hi(0, "TSTitle", { fg = color.teal, bold = true })
hi(0, "TSType", { fg = color.green, bold = true })
hi(0, "TSTypeBuiltin", { fg = color.green, bold = true, italic = true })
hi(0, "TSTypeDefinition", { fg = color.green, bold = true })
hi(0, "TSURI", { fg = color.teal, underline = true })
hi(0, "TSUnderline", { underline = true })
hi(0, "TSVariable", { fg = color.foreground })
hi(0, "TSVariableBuiltin",{ fg = color.light_teal, italic = true })
-- ── Statement / Identifier overrides ─────────────────────────────────────
hi(0, "Statement", { link = "TSKeyword" })
hi(0, "Comment", { link = "TSComment" })
hi(0, "Number", { link = "TSNumber" })
hi(0, "String", { link = "TSString" })
hi(0, "Identifier", { link = "TSVariable" })
hi(0, "@lsp.type.keyword.go", { link = "TSKeyword" })
hi(0, "@lsp.type.string.go", { link = "TSString" })
hi(0, "@lsp.type.function", { link = "TSFunctionCall" })
hi(0, "@lsp.typemod.function.definition", { link = "TSFunction" })
hi(0, "@lsp.type.method", { link = "TSMethod" })
hi(0, "goBlock", { link = "TSVariable" })
hi(0, "goImportString", { link = "TSString" })
-- ── Diagnostics ───────────────────────────────────────────────────────────
hi(0, "DiagnosticError", { fg = color.red })
hi(0, "DiagnosticWarn", { fg = color.yellow })
hi(0, "DiagnosticInfo", { fg = color.teal })
hi(0, "DiagnosticHint", { fg = color.light_teal })
hi(0, "DiagnosticUnderlineError", { sp = color.red, undercurl = true })
hi(0, "DiagnosticUnderlineWarn", { sp = color.yellow, undercurl = true })
hi(0, "DiagnosticUnderlineInformation",{ sp = color.teal, undercurl = true })
hi(0, "DiagnosticUnderlineHint", { sp = color.light_teal, undercurl = true })
hi(0, "DiagnosticUnderlineWarning", { sp = color.yellow, undercurl = true })
hi(0, "LspDiagnosticsDefaultError", { link = "DiagnosticError" })
hi(0, "LspDiagnosticsDefaultHint", { link = "DiagnosticHint" })
hi(0, "LspDiagnosticsDefaultInformation", { link = "DiagnosticInfo" })
hi(0, "LspDiagnosticsDefaultWarning", { link = "DiagnosticWarn" })
hi(0, "LspDiagnosticsUnderlineError", { link = "DiagnosticUnderlineError" })
hi(0, "LspDiagnosticsUnderlineHint", { link = "DiagnosticUnderlineHint" })
hi(0, "LspDiagnosticsUnderlineInformation",{ link = "DiagnosticUnderlineInformation" })
hi(0, "LspDiagnosticsUnderlineWarning", { link = "DiagnosticUnderlineWarning" })
hi(0, "LspReferenceRead", { sp = color.light_gray, underline = true })
hi(0, "LspReferenceText", { sp = color.light_gray, underline = true })
hi(0, "LspReferenceWrite", { sp = color.light_gray, underline = true })
-- ── nvim-cmp ──────────────────────────────────────────────────────────────
if M.config.opt.integrations.nvim_cmp then
hi(0, "CmpDocumentation", { fg = color.foreground })
hi(0, "CmpDocumentationBorder", { fg = color.comment })
hi(0, "CmpItemAbbr", { fg = color.foreground })
hi(0, "CmpItemAbbrDeprecated", { fg = color.comment, strikethrough = true })
hi(0, "CmpItemAbbrMatch", { fg = color.teal, bold = true })
hi(0, "CmpItemAbbrMatchFuzzy", { fg = color.teal })
hi(0, "CmpItemKindDefault", { fg = color.teal })
hi(0, "CmpItemKindClass", { fg = color.green, bold = true })
hi(0, "CmpItemKindConstant", { fg = color.purple })
hi(0, "CmpItemKindConstructor", { fg = color.light_blue })
hi(0, "CmpItemKindEnum", { fg = color.green, bold = true })
hi(0, "CmpItemKindEnumMember", { fg = color.light_purple })
hi(0, "CmpItemKindEvent", { fg = color.green })
hi(0, "CmpItemKindField", { fg = color.foreground })
hi(0, "CmpItemKindFunction", { fg = color.teal, bold = true })
hi(0, "CmpItemKindInterface", { fg = color.green })
hi(0, "CmpItemKindKeyword", { fg = color.yellow, bold = true })
hi(0, "CmpItemKindMethod", { fg = color.teal, bold = true })
hi(0, "CmpItemKindModule", { fg = color.foreground })
hi(0, "CmpItemKindOperator", { fg = color.light_gray })
hi(0, "CmpItemKindProperty", { fg = color.foreground })
hi(0, "CmpItemKindReference", { fg = color.foreground })
hi(0, "CmpItemKindSnippet", { fg = color.light_gray })
hi(0, "CmpItemKindStruct", { fg = color.green, bold = true })
hi(0, "CmpItemKindTypeParameter",{ fg = color.light_purple })
hi(0, "CmpItemKindUnit", { fg = color.light_yellow })
hi(0, "CmpItemKindValue", { fg = color.purple })
hi(0, "CmpItemKindVariable", { fg = color.foreground })
hi(0, "CmpItemMenu", { fg = color.comment })
end
-- ── DAP ───────────────────────────────────────────────────────────────────
if M.config.opt.integrations.dap_nvim then
hi(0, "DapUIBreakpointsCurrentLine", { bold = true, fg = color.light_green })
hi(0, "DapUIBreakpointsDisabledLine",{ fg = color.comment })
hi(0, "DapUIBreakpointsInfo", { fg = color.light_green })
hi(0, "DapUIBreakpointsPath", { fg = color.light_teal })
hi(0, "DapUIDecoration", { fg = color.light_teal })
hi(0, "DapUIFloatBorder", { fg = color.light_teal })
hi(0, "DapUILineNumber", { fg = color.light_teal })
hi(0, "DapUIModifiedValue", { bold = true, fg = color.light_teal })
hi(0, "DapUIPlayPause", { fg = color.light_green })
hi(0, "DapUIPlayPauseNC", { fg = color.light_green })
hi(0, "DapUIRestart", { fg = color.light_green })
hi(0, "DapUIRestartNC", { fg = color.light_green })
hi(0, "DapUIScope", { fg = color.teal })
hi(0, "DapUISource", { fg = color.light_purple })
hi(0, "DapUIStepBack", { fg = color.teal })
hi(0, "DapUIStepBackNC", { fg = color.teal })
hi(0, "DapUIStepInto", { fg = color.teal })
hi(0, "DapUIStepIntoNC", { fg = color.teal })
hi(0, "DapUIStepOut", { fg = color.teal })
hi(0, "DapUIStepOutNC", { fg = color.teal })
hi(0, "DapUIStepOver", { fg = color.teal })
hi(0, "DapUIStepOverNC", { fg = color.teal })
hi(0, "DapUIStop", { fg = color.red })
hi(0, "DapUIStopNC", { fg = color.red })
hi(0, "DapUIStoppedThread", { fg = color.light_teal })
hi(0, "DapUIThread", { fg = color.light_green })
hi(0, "DapUIType", { fg = color.light_purple })
hi(0, "DapUIUnavailable", { fg = color.comment })
hi(0, "DapUIUnavailableNC", { fg = color.comment })
hi(0, "DapUIWatchesEmpty", { fg = color.red })
hi(0, "DapUIWatchesError", { fg = color.red })
hi(0, "DapUIWatchesValue", { fg = color.light_green })
end
-- ── Git ───────────────────────────────────────────────────────────────────
hi(0, "GitGutterAdd", { fg = color.green })
hi(0, "GitGutterChange", { fg = color.teal })
hi(0, "GitGutterChangeDelete", { fg = color.yellow })
hi(0, "GitGutterDelete", { fg = color.red })
hi(0, "GitSignsCurrentLineBlame", { fg = color.comment, italic = true })
hi(0, "GitSignsStagedAdd", { fg = color.light_green })
hi(0, "GitSignsStagedChange", { fg = color.teal })
hi(0, "GitSignsStagedDelete", { fg = color.red })
hi(0, "gitcommitBranch", { bold = true, fg = color.yellow })
hi(0, "gitcommitComment", { fg = color.comment })
hi(0, "gitcommitDiscarded", { fg = color.comment })
hi(0, "gitcommitDiscardedFile", { bold = true, fg = color.red })
hi(0, "gitcommitDiscardedType", { fg = color.teal })
hi(0, "gitcommitHeader", { fg = color.yellow, bold = true })
hi(0, "gitcommitOverflow", { fg = color.red })
hi(0, "gitcommitSelected", { fg = color.comment })
hi(0, "gitcommitSelectedFile", { bold = true, fg = color.light_green })
hi(0, "gitcommitSelectedType", { fg = color.teal })
hi(0, "gitcommitSummary", { fg = color.light_green })
hi(0, "gitcommitUnmergedFile", { bold = true, fg = color.red })
hi(0, "gitcommitUnmergedType", { fg = color.teal })
hi(0, "gitcommitUntracked", { fg = color.comment })
hi(0, "gitcommitUntrackedFile", { fg = color.light_yellow })
-- ── Notify ────────────────────────────────────────────────────────────────
hi(0, "NotifyDEBUGBody", { link = "Normal" })
hi(0, "NotifyDEBUGBorder", { fg = color.comment })
hi(0, "NotifyDEBUGIcon", { fg = color.comment })
hi(0, "NotifyDEBUGTitle", { fg = color.comment })
hi(0, "NotifyERRORBody", { link = "Normal" })
hi(0, "NotifyERRORBorder", { fg = color.red })
hi(0, "NotifyERRORIcon", { fg = color.red })
hi(0, "NotifyERRORTitle", { fg = color.red })
hi(0, "NotifyINFOBody", { link = "Normal" })
hi(0, "NotifyINFOBorder", { fg = color.light_gray })
hi(0, "NotifyINFOIcon", { fg = color.light_gray })
hi(0, "NotifyINFOTitle", { fg = color.light_gray })
hi(0, "NotifyTRACEBody", { link = "Normal" })
hi(0, "NotifyTRACEBorder", { fg = color.purple })
hi(0, "NotifyTRACEIcon", { fg = color.purple })
hi(0, "NotifyTRACETitle", { fg = color.purple })
hi(0, "NotifyWARNBody", { link = "Normal" })
hi(0, "NotifyWARNBorder", { fg = color.yellow })
hi(0, "NotifyWARNIcon", { fg = color.yellow })
hi(0, "NotifyWARNTitle", { fg = color.yellow })
-- ── Telescope ─────────────────────────────────────────────────────────────
if M.config.opt.integrations.telescope then
hi(0, "TelescopeBorder", { bg = color.dark, fg = color.dark })
hi(0, "TelescopeNormal", { bg = color.dark })
hi(0, "TelescopePreviewLine", { bg = color.cursor_line })
hi(0, "TelescopePreviewTitle", { bg = color.light_green, fg = color.background })
hi(0, "TelescopePromptBorder", { bg = color.medium_gray, fg = color.medium_gray })
hi(0, "TelescopePromptNormal", { bg = color.medium_gray, fg = color.foreground })
hi(0, "TelescopePromptPrefix", { bg = color.medium_gray, fg = color.red })
hi(0, "TelescopePromptTitle", { bg = color.red, fg = color.background })
hi(0, "TelescopeResultsTitle", { bg = color.dark, fg = color.dark })
hi(0, "TelescopeSelection", { bg = color.medium_gray })
end
-- ── Snacks Dashboard ──────────────────────────────────────────────────────
hi(0, "SnacksDashboardHeader", { fg = color.yellow, bold = true })
hi(0, "SnacksDashboardTitle", { fg = color.yellow, bold = true })
hi(0, "SnacksDashboardIcon", { fg = color.teal })
hi(0, "SnacksDashboardDesc", { fg = color.light_gray })
hi(0, "SnacksDashboardFile", { fg = color.light_teal, bold = true })
hi(0, "SnacksDashboardKey", { fg = color.yellow, bold = true })
hi(0, "SnacksDashboardSpecial", { fg = color.light_gray })
hi(0, "SnacksDashboardDir", { fg = color.light_gray })
hi(0, "SnacksDashboardNormal", { fg = color.light_gray })
hi(0, "SnacksDashboardTerminal", { fg = color.light_gray })
hi(0, "SnacksDashboardFooter", { fg = color.comment })
-- ── Neo-Tree ──────────────────────────────────────────────────────────────
hi(0, "NeoTreeFileName", { fg = color.foreground })
hi(0, "NeoTreeDotfile", { fg = color.comment })
hi(0, "NeoTreeDirectoryName", { fg = color.yellow, bold = true })
hi(0, "NeoTreeDirectoryIcon", { fg = color.yellow })
hi(0, "NeoTreeGitModified", { fg = color.yellow })
hi(0, "NeoTreeGitStaged", { fg = color.green })
hi(0, "NeoTreeGitUntracked", { fg = color.purple })
hi(0, "NeoTreeNormal", { fg = color.foreground, bg = color.dark })
hi(0, "NeoTreeNormalNC", { fg = color.foreground, bg = color.dark })
hi(0, "NeoTreeTabActive", { fg = color.foreground, bg = color.dark, bold = true })
hi(0, "NeoTreeTabInactive", { fg = color.comment, bg = color.dark })
hi(0, "NeoTreeTabSeparatorActive", { fg = color.foreground, bg = color.dark })
hi(0, "NeoTreeTabSeparatorInactive", { fg = color.comment, bg = color.dark })
-- ── Copilot ───────────────────────────────────────────────────────────────
hi(0, "CopilotSuggestion", { fg = color.comment })
-- ── Spell ─────────────────────────────────────────────────────────────────
hi(0, "SpellBad", { sp = color.red, undercurl = true })
hi(0, "SpellCap", { sp = color.teal, undercurl = true })
hi(0, "SpellLocal", { sp = color.green, undercurl = true })
hi(0, "SpellRare", { sp = color.yellow, undercurl = true })
-- ── nvim-ts-rainbow ───────────────────────────────────────────────────────
hi(0, "rainbowcol1", { fg = color.foreground })
hi(0, "rainbowcol2", { fg = color.yellow })
hi(0, "rainbowcol3", { fg = color.green })
hi(0, "rainbowcol4", { fg = color.light_purple })
hi(0, "rainbowcol5", { fg = color.teal })
hi(0, "rainbowcol6", { fg = color.pink })
hi(0, "rainbowcol7", { fg = color.light_teal })
-- ── User / StatusLine accents ─────────────────────────────────────────────
hi(0, "User1", { bg = color.selection, fg = color.red })
hi(0, "User2", { bg = color.selection, fg = color.yellow })
hi(0, "User3", { bg = color.selection, fg = color.foreground })
hi(0, "User4", { bg = color.selection, fg = color.teal })
hi(0, "User5", { bg = color.selection, fg = color.light_gray })
hi(0, "User6", { bg = color.dark, fg = color.light_gray })
hi(0, "User7", { bg = color.selection, fg = color.light_gray })
hi(0, "User8", { bg = color.selection, fg = color.background })
hi(0, "User9", { bg = color.selection, fg = color.background })
-- ── Terminal colors ───────────────────────────────────────────────────────
local g = vim.g
g.terminal_color_0 = color.background
g.terminal_color_1 = color.red
g.terminal_color_2 = color.green
g.terminal_color_3 = color.yellow
g.terminal_color_4 = color.teal
g.terminal_color_5 = color.purple
g.terminal_color_6 = color.light_teal
g.terminal_color_7 = color.light_gray
g.terminal_color_8 = color.comment
g.terminal_color_9 = color.pink
g.terminal_color_10 = color.light_green
g.terminal_color_11 = color.light_yellow
g.terminal_color_12 = color.light_blue
g.terminal_color_13 = color.light_purple
g.terminal_color_14 = color.blue
g.terminal_color_15 = color.foreground
end
return M