neovim custom invero light-theme #1
@ -1,97 +1 @@
|
||||
-- colors/inStatusLinevero.lua
|
||||
|
||||
local palette = require("utils.palette")
|
||||
|
||||
-- reset highlights
|
||||
vim.cmd("hi clear")
|
||||
if vim.fn.exists("syntax_on") == 1 then
|
||||
vim.cmd("syntax reset")
|
||||
end
|
||||
|
||||
vim.opt.background = "light"
|
||||
vim.g.colors_name = "invero"
|
||||
|
||||
local colors = {
|
||||
-- neutrals
|
||||
base = palette[255], -- #eeeeee, white (bg)
|
||||
surface = palette[253], -- #dadada, light gray (cursor line bg)
|
||||
text = palette[238], -- #444444, dark gray (terminal fg)
|
||||
muted = palette[247], -- #9e9e9e, gray (comments, line numbers, dividers)
|
||||
accent = palette[27], -- #005fff, standard blue (cursor, dirs)
|
||||
accent_light = palette[153], -- #afd7ff light sky blue (selection bg)
|
||||
syntax = palette[60], -- #5f5f87, slate / gray-blue (syntax fg)
|
||||
red = palette[196], -- #ff0000, red
|
||||
orange = palette[166], -- #d75f00, orange
|
||||
orange_light = palette[180], -- #ffd7af, orange light
|
||||
yellow = palette[184], -- #ffd75f, yellow
|
||||
green = palette[34], -- #00af5f, green
|
||||
none = "NONE" -- no color / transparent
|
||||
}
|
||||
|
||||
local theme = {
|
||||
Normal = { fg = colors.text, bg = colors.none },
|
||||
LineNr = { fg = colors.muted },
|
||||
CursorLineNr = { fg = colors.accent, bold = true },
|
||||
CursorLine = { bg = colors.surface },
|
||||
Visual = { bg = colors.accent_light },
|
||||
Search = { fg = colors.orange },
|
||||
CurSearch = { fg = colors.base, bg = colors.orange, bold = true },
|
||||
IncSearch = { fg = colors.base, bg = colors.orange, bold = true },
|
||||
WinSeparator = { fg = colors.muted },
|
||||
StatusLine = { fg = colors.text, bg = colors.none },
|
||||
TabLine = { fg = colors.red },
|
||||
TabLineSel = { fg = colors.red, bold = true },
|
||||
TabLineFill = { bg = colors.red },
|
||||
|
||||
-- Telescope
|
||||
TelescopeBorder = { fg = colors.muted },
|
||||
TelescopePromptPrefix = { fg = colors.accent },
|
||||
TelescopeSelection = { bg = colors.surface },
|
||||
|
||||
-- Neo-tree
|
||||
NeoTreeDirectoryName = { fg = colors.accent },
|
||||
NeoTreeFileName = { fg = colors.text },
|
||||
-- NeoTreeNormal = { bg = colors.muted },
|
||||
-- NeoTreeNormalNC = { bg = colors.muted },
|
||||
}
|
||||
|
||||
-- apply theme groups
|
||||
for group, opts in pairs(theme) do
|
||||
vim.api.nvim_set_hl(0, group, opts)
|
||||
end
|
||||
|
||||
-- apply Tree-sitter defaults: all base4, comments special-case
|
||||
local highlights = vim.fn.getcompletion("@", "highlight")
|
||||
for _, hl in ipairs(highlights) do
|
||||
vim.api.nvim_set_hl(0, hl, { fg = colors.syntax })
|
||||
end
|
||||
|
||||
vim.api.nvim_set_hl(0, "@comment", { fg = colors.muted, italic = true })
|
||||
|
||||
vim.api.nvim_create_autocmd({ "WinEnter" }, {
|
||||
callback = function() vim.wo.cursorline = true end,
|
||||
})
|
||||
vim.api.nvim_create_autocmd({ "WinLeave" }, {
|
||||
callback = function() vim.wo.cursorline = false end,
|
||||
})
|
||||
|
||||
-- TEST >>
|
||||
|
||||
|
||||
vim.opt.laststatus = 3
|
||||
vim.opt.fillchars:append({ stl = '─', stlnc = '─' })
|
||||
|
||||
-- vim.o.statusline = " "
|
||||
-- vim.api.nvim_set_hl(0, "WinSeparator", { bg = colors.surface }) -- vertical bg
|
||||
-- vim.api.nvim_set_hl(0, "StatusLine", { bg = colors.surface }) -- horizontal bg
|
||||
-- vim.api.nvim_set_hl(0, "StatusLineNC", { bg = colors.surface }) -- horizontal bg
|
||||
|
||||
-- vim.api.nvim_create_autocmd("FileType", {
|
||||
-- pattern = "neo-tree",
|
||||
-- callback = function(ev)
|
||||
-- -- force your own winhighlight
|
||||
-- vim.api.nvim_win_set_option(ev.win, "winhighlight", "WinSeparator:WinSeparator")
|
||||
-- -- force fillchars
|
||||
-- vim.wo[ev.win].fillchars = "vert:│,horiz:─,horizup:┴,horizdown:┬,vertleft:├,vertright:┤,verthoriz:┼"
|
||||
-- end,
|
||||
-- })
|
||||
require("themes.invero").load()
|
||||
|
||||
@ -1,3 +1,4 @@
|
||||
require('config.options') -- vim options
|
||||
require('config.keymaps') -- keymaps
|
||||
require('config.lazy') -- plugin manager and plugins
|
||||
require('config.options')
|
||||
require('config.keymaps')
|
||||
require('config.lazy')
|
||||
require("config.autocmds")
|
||||
|
||||
37
config/linux-dev/nvim/lua/config/autocmds.lua
Normal file
37
config/linux-dev/nvim/lua/config/autocmds.lua
Normal file
@ -0,0 +1,37 @@
|
||||
-- Highlight when yanking (copying) text
|
||||
vim.api.nvim_create_autocmd("TextYankPost", {
|
||||
callback = function()
|
||||
vim.highlight.on_yank()
|
||||
end,
|
||||
})
|
||||
|
||||
-- cursorline only on active window
|
||||
vim.api.nvim_create_autocmd({ "WinEnter" }, {
|
||||
callback = function()
|
||||
local ft = vim.bo.filetype
|
||||
if ft ~= "NvimTree" then
|
||||
vim.wo.cursorline = true
|
||||
end
|
||||
end,
|
||||
})
|
||||
vim.api.nvim_create_autocmd({ "WinLeave" }, {
|
||||
callback = function()
|
||||
local ft = vim.bo.filetype
|
||||
if ft ~= "NvimTree" then
|
||||
vim.wo.cursorline = false
|
||||
end
|
||||
end,
|
||||
})
|
||||
|
||||
-- Reload Invero colorscheme without restarting Neovim
|
||||
vim.api.nvim_create_user_command("ReloadInvero", function()
|
||||
-- clear the cached modules so require() reloads them
|
||||
for k in pairs(package.loaded) do
|
||||
if k:match("^themes%.invero") then
|
||||
package.loaded[k] = nil
|
||||
end
|
||||
end
|
||||
|
||||
-- reload the colorscheme
|
||||
vim.cmd("colorscheme invero")
|
||||
end, { desc = "Reload the Invero theme" })
|
||||
@ -3,17 +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.laststatus = 3
|
||||
vim.opt.signcolumn = "no"
|
||||
|
||||
-- Enable TrueColor
|
||||
vim.opt.termguicolors = true
|
||||
|
||||
vim.opt.termguicolors = false
|
||||
|
||||
-- Scroll lines/columns
|
||||
vim.opt.mousescroll = "hor:1,ver:1"
|
||||
@ -40,7 +39,9 @@ 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()
|
||||
@ -76,22 +77,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,
|
||||
}
|
||||
})
|
||||
|
||||
-- Now load the colorscheme (this will trigger the autocmd)
|
||||
-- Load the colorscheme
|
||||
vim.cmd.colorscheme("invero")
|
||||
|
||||
@ -1,79 +0,0 @@
|
||||
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 {
|
||||
renderer = {
|
||||
icons = {
|
||||
show = {
|
||||
file = false,
|
||||
folder = false,
|
||||
folder_arrow = false,
|
||||
git = false,
|
||||
modified = false,
|
||||
hidden = false,
|
||||
diagnostics = false,
|
||||
bookmarks = false,
|
||||
},
|
||||
},
|
||||
},
|
||||
}
|
||||
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,
|
||||
-- }
|
||||
-- },
|
||||
-- },
|
||||
-- }
|
||||
187
config/linux-dev/nvim/lua/plugins/nvim-tree.lua
Normal file
187
config/linux-dev/nvim/lua/plugins/nvim-tree.lua
Normal file
@ -0,0 +1,187 @@
|
||||
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" },
|
||||
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,
|
||||
-- }
|
||||
-- },
|
||||
-- },
|
||||
-- }
|
||||
@ -1,68 +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 },
|
||||
},
|
||||
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 = {
|
||||
width = { 0.95, max = 100 },
|
||||
height = 0.95,
|
||||
preview_cutoff = 1,
|
||||
preview_height = 0.7
|
||||
width = { 0.95, max = 100 },
|
||||
height = 0.95,
|
||||
preview_cutoff = 1,
|
||||
preview_height = 0.7,
|
||||
},
|
||||
mappings = {
|
||||
n = {
|
||||
@ -72,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")
|
||||
|
||||
|
||||
19
config/linux-dev/nvim/lua/themes/invero/colors.lua
Normal file
19
config/linux-dev/nvim/lua/themes/invero/colors.lua
Normal file
@ -0,0 +1,19 @@
|
||||
local M = {}
|
||||
|
||||
function M.get(P)
|
||||
local colors = {
|
||||
base = P.white,
|
||||
surface = P.gray_light,
|
||||
text = P.black,
|
||||
muted = P.gray,
|
||||
accent = P.blue,
|
||||
accent_light = P.blue_light,
|
||||
syntax = 60,
|
||||
none = "NONE",
|
||||
}
|
||||
|
||||
return vim.tbl_extend("force", P, colors)
|
||||
end
|
||||
|
||||
return M
|
||||
|
||||
37
config/linux-dev/nvim/lua/themes/invero/groups/editor.lua
Normal file
37
config/linux-dev/nvim/lua/themes/invero/groups/editor.lua
Normal file
@ -0,0 +1,37 @@
|
||||
local M = {}
|
||||
|
||||
function M.get(C)
|
||||
return {
|
||||
Normal = { fg = C.text, bg = C.none },
|
||||
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.base, bg = C.yellow, bold = true },
|
||||
IncSearch = { fg = C.base, bg = C.yellow, bold = true },
|
||||
|
||||
MatchParen = { fg = C.base, bg = C.accent },
|
||||
EndOfBuffer = { fg = C.base }, -- End-of-buffer marker (~ lines)
|
||||
|
||||
WinSeparator = { fg = C.muted },
|
||||
StatusLine = { fg = C.muted, 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
|
||||
|
||||
-- DiagnosticError = { undercurl = true, sp = C.red },
|
||||
-- DiagnosticWarn = { undercurl = true, sp = C.yellow },
|
||||
-- DiagnosticInfo = { underline = true, sp = C.accent },
|
||||
-- DiagnosticHint = { underline = true, sp = C.green },
|
||||
|
||||
Directory = { fg = C.accent },
|
||||
}
|
||||
end
|
||||
|
||||
return M
|
||||
@ -0,0 +1,13 @@
|
||||
local M = {}
|
||||
|
||||
function M.get(C)
|
||||
return {
|
||||
NvimTreeFolderIcon = { fg = C.accent },
|
||||
NvimTreeRootFolder = { fg = C.text, bold = true },
|
||||
-- NvimTreeOpenedHL = { bg = C.surface },
|
||||
}
|
||||
end
|
||||
|
||||
return M
|
||||
|
||||
|
||||
@ -0,0 +1,13 @@
|
||||
local M = {}
|
||||
|
||||
function M.get(C)
|
||||
return {
|
||||
-- TelescopeBorder = { fg = C.muted, bg = C.green },
|
||||
-- TelescopeNormal = { fg = C.text, bg = C.base, ctermbg = 1 },
|
||||
TelescopePrompt = { fg = C.text, bg = C.base, ctermbg = 1 },
|
||||
-- TelescopePromptPrefix = { fg = C.accent, bg = C.red },
|
||||
-- TelescopeSelection = { bg = C.surface },
|
||||
}
|
||||
end
|
||||
|
||||
return M
|
||||
@ -0,0 +1,19 @@
|
||||
local M = {}
|
||||
|
||||
function M.get(C)
|
||||
local theme = {
|
||||
["@comment"] = { fg = C.muted, italic = true },
|
||||
}
|
||||
|
||||
for _, hl in ipairs(vim.fn.getcompletion("@", "highlight")) do
|
||||
if theme[hl] == nil then
|
||||
theme[hl] = { fg = C.syntax }
|
||||
end
|
||||
end
|
||||
|
||||
return theme
|
||||
end
|
||||
|
||||
return M
|
||||
|
||||
|
||||
@ -0,0 +1,9 @@
|
||||
local M = {}
|
||||
|
||||
-- fallback for vim without tree-sitter
|
||||
function M.get(C)
|
||||
return {}
|
||||
end
|
||||
|
||||
return M
|
||||
|
||||
31
config/linux-dev/nvim/lua/themes/invero/groups/terminal.lua
Normal file
31
config/linux-dev/nvim/lua/themes/invero/groups/terminal.lua
Normal 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
|
||||
12
config/linux-dev/nvim/lua/themes/invero/init.lua
Normal file
12
config/linux-dev/nvim/lua/themes/invero/init.lua
Normal file
@ -0,0 +1,12 @@
|
||||
local M = {
|
||||
name = "invero",
|
||||
variant = "light",
|
||||
}
|
||||
|
||||
function M.load()
|
||||
local setup = require("themes." .. M.name .. ".setup")
|
||||
setup.reset(M)
|
||||
setup.apply(M)
|
||||
end
|
||||
|
||||
return M
|
||||
37
config/linux-dev/nvim/lua/themes/invero/palette.lua
Normal file
37
config/linux-dev/nvim/lua/themes/invero/palette.lua
Normal file
@ -0,0 +1,37 @@
|
||||
local M = {}
|
||||
|
||||
function M.get()
|
||||
return {
|
||||
black = 0,
|
||||
gray = 247,
|
||||
gray_light = 253,
|
||||
red = 1,
|
||||
green = 2,
|
||||
yellow = 3,
|
||||
yellow_light = 180,
|
||||
blue = 4,
|
||||
blue_light = 153,
|
||||
magenta = 5,
|
||||
cyan = 6,
|
||||
white = 7,
|
||||
}
|
||||
|
||||
-- return {
|
||||
-- black = 238,
|
||||
-- gray = 247,
|
||||
-- gray_light = 253,
|
||||
-- red = 196,
|
||||
-- green = 35,
|
||||
-- yellow = 221,
|
||||
-- orange = 166,
|
||||
-- orange_light = 180,
|
||||
-- blue = 27,
|
||||
-- blue_light = 153,
|
||||
-- magenta = 125,
|
||||
-- cyan = 30,
|
||||
-- white = 255,
|
||||
-- }
|
||||
end
|
||||
|
||||
return M
|
||||
|
||||
79
config/linux-dev/nvim/lua/themes/invero/setup.lua
Normal file
79
config/linux-dev/nvim/lua/themes/invero/setup.lua
Normal file
@ -0,0 +1,79 @@
|
||||
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()
|
||||
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 = {}
|
||||
|
||||
-- ALT: Use both scenarios
|
||||
-- if type(v) == "number" then
|
||||
-- hl.ctermfg = v
|
||||
-- else
|
||||
-- hl.fg = v
|
||||
-- end
|
||||
|
||||
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
|
||||
@ -1,51 +0,0 @@
|
||||
local function xterm256_palette()
|
||||
local colors = {}
|
||||
|
||||
-- 0–15: system colors (manual)
|
||||
local ansi = {
|
||||
"#000000", -- 0 black
|
||||
"#d70000", -- 1 red
|
||||
"#5f8700", -- 2 green
|
||||
"#af8700", -- 3 yellow/brown
|
||||
"#005faf", -- 4 blue
|
||||
"#5f5faf", -- 5 magenta/indigo
|
||||
"#008787", -- 6 cyan
|
||||
"#bcbcbc", -- 7 light gray
|
||||
|
||||
"#808080", -- 8 dark gray
|
||||
"#ff5f5f", -- 9 bright red
|
||||
"#87d75f", -- 10 bright green
|
||||
"#ffd700", -- 11 bright yellow
|
||||
"#5f87d7", -- 12 bright blue
|
||||
"#8787ff", -- 13 bright magenta
|
||||
"#5fd7d7", -- 14 bright cyan
|
||||
"#ffffff", -- 15 white
|
||||
}
|
||||
for i, hex in ipairs(ansi) do
|
||||
colors[i-1] = hex
|
||||
end
|
||||
|
||||
-- 16–231: 6x6x6 cube
|
||||
local steps = {0, 95, 135, 175, 215, 255}
|
||||
local idx = 16
|
||||
for r = 1,6 do
|
||||
for g = 1,6 do
|
||||
for b = 1,6 do
|
||||
colors[idx] = string.format("#%02x%02x%02x", steps[r], steps[g], steps[b])
|
||||
idx = idx + 1
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
-- 232–255: grayscale
|
||||
for gray = 0,23 do
|
||||
local level = 8 + gray * 10
|
||||
colors[idx] = string.format("#%02x%02x%02x", level, level, level)
|
||||
idx = idx + 1
|
||||
end
|
||||
|
||||
return colors
|
||||
end
|
||||
|
||||
return xterm256_palette()
|
||||
|
||||
@ -5,9 +5,9 @@ bind-key C-Space send-prefix
|
||||
set-option -g set-clipboard on
|
||||
|
||||
|
||||
#set -g default-terminal "tmux-256color"
|
||||
set -g default-terminal "xterm-256color"
|
||||
#set -as terminal-features ",*:RGB"
|
||||
set-option -a terminal-features 'xterm-256color: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
|
||||
@ -27,6 +27,7 @@ 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
|
||||
# set -g pane-border-format '#[align=centre]╱╲'
|
||||
|
||||
# Window status format - light theme with terminal blue
|
||||
setw -g window-status-format '#[fg=#6c6f85]#I#[fg=#9ca0b0]:#[fg=#4c4f69]#W#[fg=#9ca0b0]#F'
|
||||
@ -35,6 +36,8 @@ setw -g window-status-current-format '#[fg=blue,bold]#I#[fg=#9ca0b0]:#[fg=blue,b
|
||||
# Pane border - light theme
|
||||
set -g pane-border-style fg='#ccd0da'
|
||||
set -g pane-active-border-style fg=blue
|
||||
# set -g pane-border-style "fg=#ccd0da,bg=green"
|
||||
# set -g pane-active-border-style "fg=blue,bg=green"
|
||||
|
||||
# Message text - light theme
|
||||
set -g message-style bg='#eff1f5',fg=blue
|
||||
|
||||
Loading…
Reference in New Issue
Block a user