neovim custom invero light-theme (#1)

Reviewed-on: #1
Co-authored-by: Tomas Mirchev <contact@tomastm.com>
Co-committed-by: Tomas Mirchev <contact@tomastm.com>
This commit is contained in:
Tomas Mirchev 2025-09-26 03:06:12 +00:00
parent 32258d3b7f
commit b8e96240ab
23 changed files with 783 additions and 172 deletions

View File

@ -0,0 +1 @@
require("themes.invero").load()

View File

@ -1,3 +1,22 @@
require('config.options') -- vim options
require('config.keymaps') -- keymaps
require('config.lazy') -- plugin manager and plugins
--[[
Neovim Lua config: ways to set things
- vim.opt : preferred modern API for options (handles lists, cleaner syntax)
- vim.g : global variables (leader key, plugin settings, disable builtins, etc.)
- vim.o : global-only option (rarely needed directly)
- vim.wo : window-local option (applies to current window only, use in autocmds)
- vim.bo : buffer-local option (applies to current buffer only, use in autocmds)
- vim.env : set environment variables (like PATH, LANG)
- vim.fn : call Vimscript functions (e.g. vim.fn.getcwd())
- vim.cmd : run raw Vimscript/Ex commands (e.g. vim.cmd("colorscheme desert"))
- vim.api : low-level Neovim API (create autocmds, keymaps, buffer/window ops, etc.)
TL;DR -> use vim.opt + vim.g in options.lua for defaults.
Use vim.wo/vim.bo only in context-specific tweaks (autocmds).
Use vim.env, vim.fn, vim.cmd, vim.api as needed for scripting.
]]
require("config.options")
require("config.keymaps")
require("config.lazy")
require("config.autocmds")

View File

@ -1,24 +1,22 @@
{
"cmp-nvim-lsp": { "branch": "main", "commit": "39e2eda76828d88b773cc27a3f61d2ad782c922d" },
"cmp-path": { "branch": "main", "commit": "91ff86cd9c29299a64f968ebb45846c485725f23" },
"conform.nvim": { "branch": "master", "commit": "d28ccf945374edd9f1c34a82f6c22261dbd8ab98" },
"fidget.nvim": { "branch": "main", "commit": "e2a175c2abe2d4f65357da1c98c59a5cfb2b543f" },
"harpoon": { "branch": "harpoon2", "commit": "a84ab829eaf3678b586609888ef52f7779102263" },
"cmp-nvim-lsp": { "branch": "main", "commit": "bd5a7d6db125d4654b50eeae9f5217f24bb22fd3" },
"cmp-path": { "branch": "main", "commit": "c642487086dbd9a93160e1679a1327be111cbc25" },
"conform.nvim": { "branch": "master", "commit": "b4aab989db276993ea5dcb78872be494ce546521" },
"fidget.nvim": { "branch": "main", "commit": "4d5858bd4c471c895060e1b9f3575f1551184dc5" },
"harpoon": { "branch": "harpoon2", "commit": "ed1f853847ffd04b2b61c314865665e1dadf22c7" },
"lazy.nvim": { "branch": "main", "commit": "6c3bda4aca61a13a9c63f1c1d1b16b9d3be90d7a" },
"mason-lspconfig.nvim": { "branch": "main", "commit": "4d0e5b49363cac187326998b96aa6a2884e0e89b" },
"mason.nvim": { "branch": "main", "commit": "e2f7f9044ec30067bc11800a9e266664b88cda22" },
"neo-tree.nvim": { "branch": "main", "commit": "a77af2e764c5ed4038d27d1c463fa49cd4794e07" },
"nui.nvim": { "branch": "main", "commit": "b58e2bfda5cea347c9d58b7f11cf3012c7b3953f" },
"nvim-autopairs": { "branch": "master", "commit": "ee297f215e95a60b01fde33275cc3c820eddeebe" },
"nvim-cmp": { "branch": "main", "commit": "f17d9b4394027ff4442b298398dfcaab97e40c4f" },
"nvim-lspconfig": { "branch": "master", "commit": "bc6ada4b0892b7f10852c0b8ca7209fd39a6d754" },
"nvim-treesitter": { "branch": "master", "commit": "7dc8aabe86db8c2f23520e8334f7584f83e84342" },
"nvim-ts-autotag": { "branch": "main", "commit": "1cca23c9da708047922d3895a71032bc0449c52d" },
"nvim-web-devicons": { "branch": "master", "commit": "e87554285f581047b1bf236794b0eb812b444b87" },
"plenary.nvim": { "branch": "master", "commit": "2d9b06177a975543726ce5c73fca176cedbffe9d" },
"rose-pine": { "branch": "main", "commit": "91548dca53b36dbb9d36c10f114385f759731be1" },
"schemastore.nvim": { "branch": "main", "commit": "f8d6e9068861888651f68958521b1958314aac41" },
"telescope-fzf-native.nvim": { "branch": "main", "commit": "cf48d4dfce44e0b9a2e19a008d6ec6ea6f01a83b" },
"mason-lspconfig.nvim": { "branch": "main", "commit": "25c11854aa25558ee6c03432edfa0df0217324be" },
"mason.nvim": { "branch": "main", "commit": "d66c60e17dd6fd8165194b1d14d21f7eb2c1697a" },
"nvim-autopairs": { "branch": "master", "commit": "23320e75953ac82e559c610bec5a90d9c6dfa743" },
"nvim-cmp": { "branch": "main", "commit": "b5311ab3ed9c846b585c0c15b7559be131ec4be9" },
"nvim-lspconfig": { "branch": "master", "commit": "d9879110d0422a566fa01d732556f4d5515e1738" },
"nvim-tree.lua": { "branch": "master", "commit": "321bc61580fd066b76861c32de3319c3a6d089e7" },
"nvim-treesitter": { "branch": "master", "commit": "42fc28ba918343ebfd5565147a42a26580579482" },
"nvim-ts-autotag": { "branch": "main", "commit": "c4ca798ab95b316a768d51eaaaee48f64a4a46bc" },
"nvim-web-devicons": { "branch": "master", "commit": "6e51ca170563330e063720449c21f43e27ca0bc1" },
"plenary.nvim": { "branch": "master", "commit": "b9fd5226c2f76c951fc8ed5923d85e4de065e509" },
"schemastore.nvim": { "branch": "main", "commit": "0fccf9234acfd981867cbd42c4101829e6808790" },
"telescope-fzf-native.nvim": { "branch": "main", "commit": "1f08ed60cafc8f6168b72b80be2b2ea149813e55" },
"telescope-ui-select.nvim": { "branch": "master", "commit": "6e51d7da30bd139a6950adf2a47fda6df9fa06d2" },
"telescope.nvim": { "branch": "0.1.x", "commit": "a0bbec21143c7bc5f8bb02e0005fa0b982edc026" }
}

View File

@ -0,0 +1,128 @@
-- Highlight when yanking (copying) text
vim.api.nvim_create_autocmd("TextYankPost", {
callback = function()
vim.highlight.on_yank()
end,
})
----------------------------------------------
-- Reload ColorScheme by clearing cached modules
vim.api.nvim_create_user_command("ReloadColorscheme", function()
local current = vim.g.colors_name
if not current then
vim.notify("No colorscheme is currently set", vim.log.levels.WARN)
return
end
-- clear only the cached modules for this theme
for k in pairs(package.loaded) do
if k:match("^themes%." .. current) then
package.loaded[k] = nil
end
end
-- reload it
vim.cmd("colorscheme " .. current)
vim.notify("Reloaded " .. current .. " colorscheme", vim.log.levels.INFO)
end, { desc = "Reload the current colorscheme" })
----------------------------------------------
--[[
Command :TSHighlightRoots (works but uncomment only when used)
Description:
Collects all Tree-sitter highlight groups, resolves their links,
and outputs the unique root groups actually used (for theming/debugging).
Usage:
:TSHighlightRoots -> prints roots in the command line
:TSHighlightRoots <filename> -> writes roots into <filename> (overwrites)
(filename supports ~ and tab-completion)
]]
-- local function resolve_link(name)
-- local seen = {}
-- while name and not seen[name] do
-- seen[name] = true
-- local hl = vim.api.nvim_get_hl(0, { name = name })
-- if hl.link then
-- name = hl.link
-- else
-- return name
-- end
-- end
-- end
--
-- vim.api.nvim_create_autocmd("VimEnter", {
-- callback = function()
-- vim.api.nvim_create_user_command("TSHighlightRoots", function(opts)
-- local roots = {}
-- for _, group in ipairs(vim.fn.getcompletion("@", "highlight")) do
-- local root = resolve_link(group)
-- if root then
-- roots[root] = true
-- end
-- end
--
-- local output = { "Unique root highlight groups used by Tree-sitter:" }
-- for root in pairs(roots) do
-- table.insert(output, " " .. root)
-- end
--
-- if opts.args ~= "" then
-- -- write to file
-- local filename = vim.fn.expand(opts.args)
-- local fd = assert(io.open(filename, "w"))
-- fd:write(table.concat(output, "\n"))
-- fd:close()
-- print("Wrote roots to " .. filename)
-- else
-- -- default: print to command line
-- for _, line in ipairs(output) do
-- print(line)
-- end
-- end
-- end, {
-- nargs = "?", -- allow 0 or 1 argument
-- complete = "file", -- tab-complete filenames
-- })
-- end,
-- })
----------------------------------------------
-- Useful tricks that do not fully work
----------------------------------------------
-- -- Show cursorline only in the active window
--
-- vim.api.nvim_create_autocmd({ "WinEnter", "BufEnter" }, {
-- callback = function()
-- local ft = vim.bo.filetype
-- vim.notify("enter: " .. ft .. " - " .. vim.bo.buftype)
-- -- if not ft:match("^Telescope") and ft ~= "NvimTree" then
-- -- vim.wo.cursorline = true
-- -- end
-- end,
-- })
-- vim.api.nvim_create_autocmd({ "WinLeave", "BufLeave" }, {
-- callback = function()
-- local ft = vim.bo.filetype
-- vim.notify("exit: " .. ft .. " - " .. vim.bo.buftype)
-- -- if not ft:match("^Telescope") and ft ~= "NvimTree" then
-- -- vim.wo.cursorline = false
-- -- end
-- end,
-- })
----------------------------------------------
-- -- Associate filetype
--
-- vim.api.nvim_create_autocmd("FileType", {
-- pattern = "text",
-- callback = function()
-- vim.bo.filetype = "markdown"
-- end,
-- })

View File

@ -8,4 +8,11 @@ if not (vim.uv or vim.loop).fs_stat(lazypath) then
end ---@diagnostic disable-next-line: undefined-field
vim.opt.rtp:prepend(lazypath)
require('lazy').setup('plugins')
require("lazy").setup({
spec = { { import = "plugins" } },
ui = {
backdrop = 100,
border = "rounded"
},
})

View File

@ -3,19 +3,16 @@ vim.g.mapleader = " "
vim.g.maplocalleader = " "
-- Use Nerd Font
vim.g.have_nerd_font = true
vim.g.have_nerd_font = false
-- Add vertical line
-- vim.opt.colorcolumn = "100"
vim.opt.laststatus = 3
vim.opt.signcolumn = "no"
-- Enable TrueColor
vim.opt.termguicolors = true
-- Disable Neovim background
vim.api.nvim_set_hl(0, "Normal", { bg = "none" })
vim.api.nvim_set_hl(0, "NormalFloat", { bg = "none" })
vim.opt.termguicolors = false
-- Scroll lines/columns
vim.opt.mousescroll = "hor:1,ver:1"
@ -42,7 +39,8 @@ vim.opt.relativenumber = true
vim.opt.mouse = "a"
-- Full path on status line
vim.opt.statusline = "%F%m%r%h%w%=%l,%c %P"
vim.opt.statusline = "%= %F%m%r%h%w ─ (%l,%c %P) %="
vim.opt.fillchars:append({ stl = "", stlnc = "" })
-- Sync clipboard between OS and Neovim
vim.schedule(function()
@ -78,19 +76,5 @@ vim.opt.guicursor = "n-v-i-c:block"
-- Minimal number of screen lines to keep above and below the cursor
vim.opt.scrolloff = 10
-- Highlight when yanking (copying) text
vim.api.nvim_create_autocmd("TextYankPost", {
callback = function()
vim.highlight.on_yank()
end,
})
vim.diagnostic.config({
severity_sort = true,
severities = {
[vim.diagnostic.severity.ERROR] = 4,
[vim.diagnostic.severity.WARN] = 3,
[vim.diagnostic.severity.INFO] = 2,
[vim.diagnostic.severity.HINT] = 1,
}
})
-- Load the colorscheme
vim.cmd.colorscheme("invero")

View File

@ -1,11 +0,0 @@
return {
"rose-pine/neovim",
name = "rose-pine",
config = function()
require("rose-pine").setup({
disable_background = true,
disable_float_background = true,
})
vim.cmd("colorscheme rose-pine")
end,
}

View File

@ -21,14 +21,20 @@ return {
"neovim/nvim-lspconfig",
dependencies = {
{ "williamboman/mason.nvim", config = true },
"williamboman/mason-lspconfig.nvim",
{ "williamboman/mason.nvim", version = "1.8.0", config = true },
{ "williamboman/mason-lspconfig.nvim", version = "1.31.0"},
{ "j-hui/fidget.nvim", opts = {} }, -- side fidget showing status
"hrsh7th/cmp-nvim-lsp", -- completion
"b0o/schemastore.nvim",
},
config = function()
require("mason").setup()
require("mason").setup({
ui = {
border = "rounded",
backdrop = 0
},
})
require("mason-lspconfig").setup()
local lspconfig = require("lspconfig")

View File

@ -1,33 +0,0 @@
return {
"nvim-neo-tree/neo-tree.nvim",
version = "*",
dependencies = {
"nvim-lua/plenary.nvim",
"nvim-tree/nvim-web-devicons",
"MunifTanjim/nui.nvim",
},
cmd = "Neotree",
keys = {
{ "<Leader>et", ":Neotree position=left toggle<CR>", desc = "Explorer Toggle", silent = true },
{ "<Leader>E", ":Neotree focus<CR>", desc = "Explorer Focus", silent = true },
{ "<Leader>ef", ":Neotree float<CR>", desc = "Explorer Float", silent = true },
{ "<Leader>eb", ":Neotree buffers<CR>", desc = "Explorer Buffers", silent = true },
{ "<Leader>eg", ":Neotree git_status<CR>", desc = "Explorer Git", silent = true },
},
opts = {
filesystem = {
follow_current_file = {
enabled = true, -- Enable this feature
leave_dirs_open = true, -- Leave directories open when following
},
filtered_items = {
visible = true,
},
window = {
mappings = {
["<Leader>e"] = "close_window",
},
},
},
},
}

View File

@ -0,0 +1,188 @@
return {
"nvim-tree/nvim-tree.lua",
version = "*",
lazy = false,
keys = {
{ "<Leader>et", ":NvimTreeToggle<CR>", desc = "Explorer Toggle", silent = true },
},
config = function()
require("nvim-tree").setup({
hijack_cursor = true,
disable_netrw = true,
hijack_netrw = true,
hijack_unnamed_buffer_when_opening = true,
root_dirs = { ".git", "package.json" },
prefer_startup_root = true,
sync_root_with_cwd = true,
reload_on_bufenter = true,
respect_buf_cwd = true,
view = {
centralize_selection = false,
cursorline = true,
cursorlineopt = "both",
debounce_delay = 15,
side = "left",
preserve_window_proportions = false,
number = false,
relativenumber = false,
signcolumn = "no",
width = 30,
},
renderer = {
add_trailing = false,
group_empty = false,
full_name = false,
root_folder_label = false,
-- special_files = { "Cargo.toml", "Makefile", "README.md", "readme.md" },
special_files = {}, -- keep to overwrite defaults
symlink_destination = true,
icons = {
padding = "",
glyphs = {
folder = {
arrow_closed = "+",
arrow_open = "-",
},
},
show = {
file = false,
folder = false,
folder_arrow = true,
git = false,
modified = false,
hidden = false,
diagnostics = false,
bookmarks = false,
},
},
},
hijack_directories = {
enable = true,
auto_open = true,
},
update_focused_file = {
enable = true,
update_root = {
enable = true,
ignore_list = {},
},
exclude = false,
},
filters = {
enable = true,
git_ignored = true,
dotfiles = false,
git_clean = false,
no_buffer = false,
no_bookmark = false,
custom = {},
exclude = {},
},
live_filter = {
prefix = "[FILTER]: ",
always_show_folders = true,
},
filesystem_watchers = {
enable = true,
debounce_delay = 50,
ignore_dirs = {
-- C / C++
"/.ccls-cache",
"/build",
"/out",
"/cmake-build-*",
-- Node.js / Web
"/node_modules",
"/dist",
"/.next",
"/.nuxt",
"/coverage",
"/storybook-static",
-- Rust
"/target",
-- Java / JVM
"/target", -- (Maven)
"/build", -- (Gradle)
"/out", -- (IDEA / javac)
-- Python
"/.venv",
"/venv",
"/__pycache__",
"/.mypy_cache",
"/.pytest_cache",
-- Go
"/bin",
"/pkg",
-- General
"/tmp",
"/.cache",
"/.idea",
"/.vscode",
"/logs",
},
},
trash = {
cmd = "gio trash",
},
})
end,
}
-- return {
-- "nvim-neo-tree/neo-tree.nvim",
-- version = "*",
-- dependencies = {
-- "nvim-lua/plenary.nvim",
-- "nvim-tree/nvim-web-devicons",
-- "MunifTanjim/nui.nvim",
-- },
-- cmd = "Neotree",
-- keys = {
-- { "<Leader>et", ":Neotree position=left toggle<CR>", desc = "Explorer Toggle", silent = true },
-- { "<Leader>E", ":Neotree focus<CR>", desc = "Explorer Focus", silent = true },
-- { "<Leader>ef", ":Neotree float<CR>", desc = "Explorer Float", silent = true },
-- { "<Leader>eb", ":Neotree buffers<CR>", desc = "Explorer Buffers", silent = true },
-- { "<Leader>eg", ":Neotree git_status<CR>", desc = "Explorer Git", silent = true },
-- },
-- opts = {
-- event_handlers = {
-- {
-- event = require("neo-tree.ui.events").NEO_TREE_WINDOW_AFTER_OPEN,
-- handler = function(args)
-- if args and args.winid and vim.api.nvim_win_is_valid(args.winid) then
-- vim.api.nvim_win_set_option(args.winid, "colorcolumn", "")
-- vim.api.nvim_win_set_option(args.winid, "signcolumn", "no")
-- end
-- end,
-- },
-- },
-- popup_border_style = "single",
-- window = {
-- mappings = {
-- ["<Leader>e"] = "close_window",
-- },
-- },
-- default_component_configs = {
-- icon = { enabled = false },
-- git_status = { symbols = {}, align = "none" },
-- name = { trailing_slash = true }
-- },
-- enable_git_status = false,
-- enable_diagnostics = false,
-- filesystem = {
-- follow_current_file = {
-- enabled = true, -- Enable this feature
-- leave_dirs_open = true, -- Leave directories open when following
-- },
-- filtered_items = {
-- visible = true,
-- }
-- },
-- },
-- }

View File

@ -1,69 +1,30 @@
local remap = require("utils.remap")
return { -- Fuzzy Finder (files, lsp, etc)
return {
"nvim-telescope/telescope.nvim",
event = "VimEnter",
branch = "0.1.x",
dependencies = {
"nvim-lua/plenary.nvim",
{ -- If encountering errors, see telescope-fzf-native README for installation instructions
{
"nvim-telescope/telescope-fzf-native.nvim",
-- `build` is used to run some command when the plugin is installed/updated.
-- This is only run then, not every time Neovim starts up.
build = "make",
-- `cond` is a condition used to determine whether this plugin should be
-- installed and loaded.
cond = function()
return vim.fn.executable("make") == 1
end,
},
{ "nvim-telescope/telescope-ui-select.nvim" },
-- Useful for getting pretty icons, but requires a Nerd Font.
{ "nvim-tree/nvim-web-devicons", enabled = vim.g.have_nerd_font },
-- { "nvim-tree/nvim-web-devicons", enabled = vim.g.have_nerd_font },
},
config = function()
-- Telescope is a fuzzy finder that comes with a lot of different things that
-- it can fuzzy find! It's more than just a "file finder", it can search
-- many different aspects of Neovim, your workspace, LSP, and more!
--
-- The easiest way to use Telescope, is to start by doing something like:
-- :Telescope help_tags
--
-- After running this command, a window will open up and you're able to
-- type in the prompt window. You'll see a list of `help_tags` options and
-- a corresponding preview of the help.
--
-- Two important keymaps to use while in Telescope are:
-- - Insert mode: <c-/>
-- - Normal mode: ?
--
-- This opens a window that shows you all of the keymaps for the current
-- Telescope picker. This is really useful to discover what Telescope can
-- do as well as how to actually do it!
-- [[ Configure Telescope ]]
-- See `:help telescope` and `:help telescope.setup()`
require("telescope").setup({
-- You can put your default mappings / updates / etc. in here
-- All the info you're looking for is in `:help telescope.setup()`
--
-- defaults = {
-- mappings = {
-- i = { ['<c-enter>'] = 'to_fuzzy_refine' },
-- },
-- },
-- pickers = {}
defaults = {
layout_strategy = "vertical",
layout_config = {
-- vertical = { width = 0.5 }
-- horizontal = {
-- width = 0.9,
-- preview_width = 0.5,
-- },
width = { 0.95, max = 100 },
height = 0.95,
preview_cutoff = 1,
preview_height = 0.7,
},
mappings = {
n = {
@ -73,7 +34,6 @@ return { -- Fuzzy Finder (files, lsp, etc)
},
})
-- Enable Telescope extensions if they are installed
pcall(require("telescope").load_extension, "fzf")
pcall(require("telescope").load_extension, "ui-select")

View File

@ -1,34 +1,32 @@
return {
'nvim-treesitter/nvim-treesitter',
build = 'TSUpdate',
main = 'nvim-treesitter.configs',
opts = {
ensure_installed = {
'diff',
'lua',
'html',
'css',
'javascript',
'typescript',
'tsx',
'markdown',
'markdown_inline'
},
auto_install = true,
highlight = {
enable = true,
},
indent = { enable = true }
},
config = function(_, opts)
require('nvim-treesitter.configs').setup(opts)
-- Add MDX filetype detection
vim.filetype.add({
extension = {
mdx = 'markdown.mdx',
},
})
end,
"nvim-treesitter/nvim-treesitter",
build = "TSUpdate",
main = "nvim-treesitter.configs",
opts = {
ensure_installed = {
"diff",
"lua",
"html",
"css",
"javascript",
"typescript",
"tsx",
"markdown",
"markdown_inline",
},
auto_install = true,
highlight = {
enable = true,
},
indent = { enable = true },
},
config = function(_, opts)
require("nvim-treesitter.configs").setup(opts)
-- Add MDX filetype detection
vim.filetype.add({
extension = {
mdx = "markdown.mdx",
},
})
end,
}

View File

@ -0,0 +1,19 @@
local M = {}
function M.get(P)
local colors = {
base = P.white,
surface = P.gray_light,
outline = P.gray_dark,
text = P.black,
muted = P.gray,
accent = P.blue,
accent_light = P.blue_light,
syntax = P.slate_indigo,
none = "NONE",
}
return vim.tbl_extend("force", P, colors)
end
return M

View File

@ -0,0 +1,32 @@
local M = {}
function M.get(C)
return {
Normal = { fg = C.text, bg = C.none },
Directory = { fg = C.accent },
Question = { fg = C.text },
LineNr = { fg = C.muted },
CursorLineNr = { fg = C.accent, bold = true },
CursorLine = { bg = C.surface },
Visual = { bg = C.accent_light },
Search = { fg = C.yellow },
CurSearch = { fg = C.yellow, bg = C.none, bold = true },
IncSearch = { fg = C.yellow, bg = C.none, bold = true },
MatchParen = { fg = C.accent, bg = C.accent_light, bold = true },
EndOfBuffer = { fg = C.base }, -- End-of-buffer marker (~ lines)
WinSeparator = { fg = C.outline },
StatusLine = { fg = C.outline, bg = C.none }, -- Active statusline (where filename)
MsgArea = { fg = C.text, bg = C.none }, -- Command-line / message area
MsgSeparator = { fg = C.text, bg = C.surface }, -- Separator for messages
ModeMsg = { fg = C.text },
TabLine = { fg = C.muted }, -- Unselected tab
TabLineSel = { fg = C.text, bold = true }, -- Selected tab
TabLineFill = { bg = C.none }, -- Empty space in the tabline
}
end
return M

View File

@ -0,0 +1,7 @@
local M = {}
function M.get(C)
return {}
end
return M

View File

@ -0,0 +1,9 @@
local M = {}
function M.get(C)
return {
TelescopeMatching = { fg = C.yellow, bg = C.none, bold = true },
}
end
return M

View File

@ -0,0 +1,20 @@
local M = {}
function M.get(C)
return {
["@constant.macro"] = { fg = C.syntax },
["@function.method"] = { fg = C.syntax },
["@type.qualifier"] = { fg = C.syntax },
["@variable.parameter"] = { fg = C.syntax },
["@variable"] = { fg = C.syntax },
["@type.definition"] = { fg = C.syntax },
["@markup.italic"] = { fg = C.syntax },
["@markup.strong"] = { fg = C.syntax },
["@markup.underline"] = { fg = C.syntax },
["@markup.strikethrough"] = { fg = C.syntax },
["@_jsx_attribute"] = { link = "Constant" },
}
end
return M

View File

@ -0,0 +1,38 @@
local M = {}
function M.get(C)
return {
Comment = { fg = C.muted, italic = true },
String = { fg = C.green },
Boolean = { fg = C.accent, bold = true, italic = true },
Number = { fg = C.accent },
-- syntax color
Constant = { fg = C.syntax },
Function = { fg = C.syntax },
Type = { fg = C.syntax },
Statement = { fg = C.syntax },
Identifier = { fg = C.syntax },
Operator = { fg = C.syntax },
PreProc = { fg = C.syntax },
Special = { fg = C.syntax },
Delimiter = { fg = C.syntax },
Todo = { fg = C.syntax },
Title = { fg = C.syntax },
Underlined = { fg = C.syntax },
-- diffs
Added = { fg = C.green },
Removed = { fg = C.red },
Changed = { fg = C.yellow },
-- diagnostics
DiagnosticInfo = { fg = C.blue },
DiagnosticWarn = { fg = C.yellow },
DiagnosticError = { fg = C.red },
DiagnosticDeprecated = { fg = C.magenta },
DiagnosticUnderlineError = { fg = C.syntax, underline = true },
}
end
return M

View File

@ -0,0 +1,31 @@
local M = {}
function M.get(C)
return {
terminal_color_0 = { fg = C.black },
terminal_color_8 = { fg = C.black },
terminal_color_1 = { fg = C.red },
terminal_color_9 = { fg = C.red },
terminal_color_2 = { fg = C.green },
terminal_color_10 = { fg = C.green },
terminal_color_3 = { fg = C.yellow },
terminal_color_11 = { fg = C.yellow },
terminal_color_4 = { fg = C.blue },
terminal_color_12 = { fg = C.blue },
terminal_color_5 = { fg = C.magenta },
terminal_color_13 = { fg = C.magenta },
terminal_color_6 = { fg = C.cyan },
terminal_color_14 = { fg = C.cyan },
terminal_color_7 = { fg = C.white },
terminal_color_15 = { fg = C.white },
}
end
return M

View File

@ -0,0 +1,14 @@
local M = {
name = "invero",
variant = "light",
mode = "ansi",
exclude_integrations = {},
}
function M.load()
local setup = require("themes." .. M.name .. ".setup")
setup.reset(M)
setup.apply(M)
end
return M

View File

@ -0,0 +1,53 @@
local M = {}
local modes = {
ansi = {
black = 0,
red = 1,
green = 2,
yellow = 3,
blue = 4,
magenta = 5,
cyan = 6,
white = 7,
},
default = {
black = 238,
red = 196,
green = 35,
yellow = 221,
blue = 27,
magenta = 125,
cyan = 30,
white = 255,
},
}
local shared_palette = {
gray_dark = 245,
gray = 247,
gray_light = 253,
orange = 166,
orange_light = 180,
yellow_light = 180,
blue_light = 153,
slate_indigo = 60,
}
---Get color palette
---@param mode '"ansi"'|'"default"'
---@return table
function M.get(mode)
local mode_palette = modes[mode]
if not mode_palette then
vim.notify(
string.format('Invalid palette mode: "%s" (valid: ansi, default)', tostring(mode)),
vim.log.levels.WARN,
{ title = "palette" }
)
mode_palette = modes.default
end
return vim.tbl_extend("force", mode_palette, shared_palette)
end
return M

View File

@ -0,0 +1,72 @@
local M = {}
function M.reset(theme)
vim.opt.background = (theme.variant == "light") and "light" or "dark"
vim.g.colors_name = theme.name
end
local function list_integrations(theme_name)
local path = vim.fn.stdpath("config") .. "/lua/themes/" .. theme_name .. "/groups/integrations/"
local files = {}
for name, type in vim.fs.dir(path) do
if type == "file" then
local mod_name = vim.fn.fnamemodify(name, ":r")
table.insert(files, mod_name)
end
end
return files
end
function M.apply(theme)
local base = "themes." .. theme.name
local P = require(base .. ".palette").get(theme.mode)
local C = require(base .. ".colors").get(P)
local modules = {
require(base .. ".groups.editor"),
require(base .. ".groups.syntax"),
require(base .. ".groups.terminal"),
}
local exclude = theme.exclude_integrations or {}
local function should_load(name)
return not vim.tbl_contains(exclude, name)
end
-- auto-discover integrations
for _, plugin in ipairs(list_integrations(theme.name)) do
if should_load(plugin) then
local ok_mod, mod = pcall(require, base .. ".groups.integrations." .. plugin)
if ok_mod then
table.insert(modules, mod)
end
end
end
-- Apply highlights
for _, mod in ipairs(modules) do
local groups = mod.get(C) or {}
for group, opts in pairs(groups) do
if type(opts) ~= "table" then
print("Non-table opts detected in group:", group, "value:", vim.inspect(opts))
end
local hl = {}
for k, v in pairs(opts) do
if k == "fg" then
hl.ctermfg = v
elseif k == "bg" then
hl.ctermbg = v
else
hl[k] = v -- bold, italic, underline, sp, etc.
end
end
vim.api.nvim_set_hl(0, group, hl)
end
end
end
return M

71
config/linux-dev/tmux Normal file
View File

@ -0,0 +1,71 @@
# Change the prefix from 'C-b' to 'C-Space'
unbind C-b
set-option -g prefix C-Space
bind-key C-Space send-prefix
set-option -g set-clipboard on
set -g default-terminal "xterm-256color"
#set -as terminal-features ",*:RGB"
# set-option -a terminal-features 'xterm-256color:RGB'
set-option -sg escape-time 10
set-option -g repeat-time 0
set-option -g focus-events on
# Set the base index for windows and panes to 1 instead of 0
set -g base-index 1
setw -g pane-base-index 1
# Increase scrollback buffer size
set -g history-limit 10000
# Light theme with transparent background
set -g status-style bg=default,fg='#4c4f69'
set -g status-left '#[fg=blue,bold][#S] '
set -g status-left-length 50
set -g status-right ''
# set -g pane-border-status bottom # or 'bottom' if status is at top
# set -g pane-border-format '─' # This will fill the entire width automatically
# Window status format - light theme with terminal blue
setw -g window-status-format '#[fg=#6c6f85]#I#[fg=#9ca0b0]:#[fg=#4c4f69]#W#[fg=#9ca0b0]#F'
setw -g window-status-current-format '#[fg=blue,bold]#I#[fg=#9ca0b0]:#[fg=blue,bold]#W#[fg=#9ca0b0]#F'
# Pane border - light theme
set -g pane-border-style fg='#ccd0da'
set -g pane-active-border-style fg=blue
# Message text - light theme
set -g message-style bg='#eff1f5',fg=blue
# Copy mode colors - light theme
setw -g mode-style bg='#acb0be',fg='#4c4f69'
# Enable mouse support
setw -g mouse on
# Fix scroll. Use N3 instead of N1 to make it quicker
bind-key -T copy-mode-vi WheelUpPane send -N1 -X scroll-up
bind-key -T copy-mode-vi WheelDownPane send -N1 -X scroll-down
# Update terminal titles
set-option -g set-titles off
# Use vim keybindings in copy mode
setw -g mode-keys vi
# Setup 'v' to begin selection as in Vim
bind -T copy-mode-vi v send-keys -X begin-selection
# Pane navigation using vim-like keys
bind -r k select-pane -U
bind -r j select-pane -D
bind -r h select-pane -L
bind -r l select-pane -R
# Automatically renumber windows when one is closed
set -g renumber-windows on
# Reload tmux config
bind r source-file ~/.tmux.conf \; display "Reloaded!"