neovim custom invero light-theme #1
266
config.json
266
config.json
@ -1,108 +1,166 @@
|
|||||||
{
|
{
|
||||||
"template": {
|
"template": {
|
||||||
"htop": {
|
"htop": {
|
||||||
"link": { "from": "shared/htop", "to": "~/.config/htop" }
|
"link": {
|
||||||
|
"from": "shared/htop",
|
||||||
|
"to": "~/.config/htop"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"bin": {
|
||||||
|
"link": {
|
||||||
|
"from": "shared/bin",
|
||||||
|
"to": "~/bin"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"vim": {
|
||||||
|
"link": {
|
||||||
|
"from": "shared/vim",
|
||||||
|
"to": "~/.vimrc"
|
||||||
|
},
|
||||||
|
"-post-link": "curl -fLo ~/.vim/autoload/plug.vim --create-dirs https://raw.githubusercontent.com/junegunn/vim-plug/master/plug.vim && vim -es -u ~/.vimrc -i NONE -c 'PlugInstall' -c 'qa'"
|
||||||
|
},
|
||||||
|
"nvim": {
|
||||||
|
"link": {
|
||||||
|
"from": "shared/nvim",
|
||||||
|
"to": "~/.config/nvim/init.lua"
|
||||||
|
},
|
||||||
|
"post-link": "(grep -q 'alias vim=nvim' ~/.zshrc || echo 'alias vim=nvim' >> ~/.zshrc) || true"
|
||||||
|
},
|
||||||
|
"zsh": {
|
||||||
|
"link": {
|
||||||
|
"from": "shared/zsh_root",
|
||||||
|
"to": "~/.zshrc"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"zsh_config": {
|
||||||
|
"link": {
|
||||||
|
"from": "shared/zsh_config",
|
||||||
|
"to": "~/.config/zsh"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"tmux": {
|
||||||
|
"link": {
|
||||||
|
"from": "shared/tmux",
|
||||||
|
"to": "~/.tmux.conf"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"git": {
|
||||||
|
"link": {
|
||||||
|
"from": "shared/git",
|
||||||
|
"to": "~/.gitconfig"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"wezterm": {
|
||||||
|
"link": {
|
||||||
|
"from": "shared/wezterm",
|
||||||
|
"to": "~/.wezterm.lua"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"alacritty": {
|
||||||
|
"link": {
|
||||||
|
"from": "shared/alacritty",
|
||||||
|
"to": "~/.alacritty.toml"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"ghostty": {
|
||||||
|
"link": {
|
||||||
|
"from": "shared/ghostty",
|
||||||
|
"to": "~/.config/ghostty"
|
||||||
|
}
|
||||||
|
}
|
||||||
},
|
},
|
||||||
"bin": {
|
"environments": {
|
||||||
"link": { "from": "shared/bin", "to": "~/bin" }
|
"macos": [
|
||||||
},
|
"zsh",
|
||||||
"vim": {
|
"zsh_config",
|
||||||
"link": { "from": "shared/vim", "to": "~/.vimrc" },
|
{
|
||||||
"-post-link": "curl -fLo ~/.vim/autoload/plug.vim --create-dirs https://raw.githubusercontent.com/junegunn/vim-plug/master/plug.vim && vim -es -u ~/.vimrc -i NONE -c 'PlugInstall' -c 'qa'"
|
"package": "bin",
|
||||||
},
|
"link": {
|
||||||
"nvim": {
|
"from": "macos/bin",
|
||||||
"link": { "from": "shared/nvim", "to": "~/.config/nvim/init.lua" },
|
"to": "~/bin"
|
||||||
"post-link": "(grep -q 'alias vim=nvim' ~/.zshrc || echo 'alias vim=nvim' >> ~/.zshrc) || true"
|
}
|
||||||
},
|
},
|
||||||
"zsh": {
|
"tmux",
|
||||||
"link": { "from": "shared/zsh", "to": "~/.zshrc" }
|
"nvim",
|
||||||
},
|
"git",
|
||||||
"tmux": {
|
"ghostty",
|
||||||
"link": { "from": "shared/tmux", "to": "~/.tmux.conf" }
|
"alacritty",
|
||||||
},
|
{
|
||||||
"git": {
|
"package": "karabiner",
|
||||||
"link": { "from": "shared/git", "to": "~/.gitconfig" }
|
"link": {
|
||||||
},
|
"from": "macos/karabiner",
|
||||||
"wezterm": {
|
"to": "~/.config/karabiner"
|
||||||
"link": { "from": "shared/wezterm", "to": "~/.wezterm.lua" }
|
}
|
||||||
},
|
},
|
||||||
"alacritty": {
|
{
|
||||||
"link": { "from": "shared/alacritty", "to": "~/.alacritty.toml" }
|
"package": "linearmouse",
|
||||||
},
|
"link": {
|
||||||
"ghostty": {
|
"from": "macos/linearmouse",
|
||||||
"link": { "from": "shared/ghostty", "to": "~/.config/ghostty" }
|
"to": "~/.config/linearmouse"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"package": "rectangle",
|
||||||
|
"link-comment": "Needs manual import from config/macos/linearmouse"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"linux-vm": [
|
||||||
|
"zsh_config",
|
||||||
|
{
|
||||||
|
"package": "zsh",
|
||||||
|
"install": "sudo apt install -y zsh",
|
||||||
|
"post-link": "./scripts/linux-setup_zsh.sh"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"package": "tmux",
|
||||||
|
"link": {
|
||||||
|
"from": "linux-vm/tmux",
|
||||||
|
"to": "~/.tmux.conf"
|
||||||
|
},
|
||||||
|
"install": "sudo apt install -y tmux"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"package": "nvim",
|
||||||
|
"install": "bash -c 'wget -O nvim.deb https://gitea.tomastm.com/tomas.mirchev/neovim/releases/download/v0.10.0/nvim-linux-$(dpkg --print-architecture).deb && sudo dpkg -i nvim.deb && rm nvim.deb'"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"package": "git",
|
||||||
|
"install": "sudo apt install -y git"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"package": "htop",
|
||||||
|
"install": "sudo apt install -y htop"
|
||||||
|
},
|
||||||
|
"bin"
|
||||||
|
],
|
||||||
|
"linux-dev": [
|
||||||
|
"zsh_config",
|
||||||
|
{
|
||||||
|
"package": "zsh",
|
||||||
|
"install": "sudo apt install -y zsh",
|
||||||
|
"post-link": "./scripts/linux-setup_zsh.sh"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"package": "tmux",
|
||||||
|
"install": "sudo apt install -y tmux"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"package": "nvim",
|
||||||
|
"ignore-template": true,
|
||||||
|
"link": {
|
||||||
|
"from": "linux-dev/nvim",
|
||||||
|
"to": "~/.config/nvim"
|
||||||
|
},
|
||||||
|
"post-link": "nvim --headless '+Lazy! restore' '+MasonUpdate' '+TSUpdate' +qa && (grep -q 'alias vim=nvim' ~/.zshrc || echo 'alias vim=nvim' >> ~/.zshrc) || true"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"package": "git",
|
||||||
|
"install": "sudo apt install -y git"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"package": "htop",
|
||||||
|
"install": "sudo apt install -y htop"
|
||||||
|
}
|
||||||
|
]
|
||||||
}
|
}
|
||||||
},
|
|
||||||
"environments": {
|
|
||||||
"macos": [
|
|
||||||
"zsh",
|
|
||||||
"tmux",
|
|
||||||
"nvim",
|
|
||||||
"git",
|
|
||||||
"ghostty",
|
|
||||||
"alacritty",
|
|
||||||
{
|
|
||||||
"package": "karabiner",
|
|
||||||
"link": { "from": "macos/karabiner", "to": "~/.config/karabiner" }
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"package": "linearmouse",
|
|
||||||
"link": { "from": "macos/linearmouse", "to": "~/.config/linearmouse" }
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"package": "rectangle",
|
|
||||||
"link-comment": "Needs manual import from config/macos/linearmouse"
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"linux-vm": [
|
|
||||||
{
|
|
||||||
"package": "zsh",
|
|
||||||
"install": "sudo apt install -y zsh",
|
|
||||||
"post-link": "./scripts/linux-setup_zsh.sh"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"package": "tmux",
|
|
||||||
"link": { "from": "linux-vm/tmux", "to": "~/.tmux.conf" },
|
|
||||||
"install": "sudo apt install -y tmux"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"package": "nvim",
|
|
||||||
"install": "bash -c 'wget -O nvim.deb https://gitea.tomastm.com/tomas.mirchev/neovim/releases/download/v0.10.0/nvim-linux-$(dpkg --print-architecture).deb && sudo dpkg -i nvim.deb && rm nvim.deb'"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"package": "git",
|
|
||||||
"install": "sudo apt install -y git"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"package": "htop",
|
|
||||||
"install": "sudo apt install -y htop"
|
|
||||||
},
|
|
||||||
"bin"
|
|
||||||
],
|
|
||||||
"linux-dev": [
|
|
||||||
{
|
|
||||||
"package": "zsh",
|
|
||||||
"install": "sudo apt install -y zsh",
|
|
||||||
"post-link": "./scripts/linux-setup_zsh.sh"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"package": "tmux",
|
|
||||||
"install": "sudo apt install -y tmux"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"package": "nvim",
|
|
||||||
"ignore-template": true,
|
|
||||||
"link": { "from": "linux-dev/nvim", "to": "~/.config/nvim" },
|
|
||||||
"post-link": "nvim --headless '+Lazy! restore' '+MasonUpdate' '+TSUpdate' +qa && (grep -q 'alias vim=nvim' ~/.zshrc || echo 'alias vim=nvim' >> ~/.zshrc) || true"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"package": "git",
|
|
||||||
"install": "sudo apt install -y git"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"package": "htop",
|
|
||||||
"install": "sudo apt install -y htop"
|
|
||||||
}
|
|
||||||
]
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|||||||
1
config/linux-dev/nvim/colors/invero.lua
Normal file
1
config/linux-dev/nvim/colors/invero.lua
Normal file
@ -0,0 +1 @@
|
|||||||
|
require("themes.invero").load()
|
||||||
@ -1,3 +1,22 @@
|
|||||||
require('config.options') -- vim options
|
--[[
|
||||||
require('config.keymaps') -- keymaps
|
Neovim Lua config: ways to set things
|
||||||
require('config.lazy') -- plugin manager and plugins
|
|
||||||
|
- 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")
|
||||||
|
|||||||
@ -1,24 +1,22 @@
|
|||||||
{
|
{
|
||||||
"cmp-nvim-lsp": { "branch": "main", "commit": "39e2eda76828d88b773cc27a3f61d2ad782c922d" },
|
"cmp-nvim-lsp": { "branch": "main", "commit": "bd5a7d6db125d4654b50eeae9f5217f24bb22fd3" },
|
||||||
"cmp-path": { "branch": "main", "commit": "91ff86cd9c29299a64f968ebb45846c485725f23" },
|
"cmp-path": { "branch": "main", "commit": "c642487086dbd9a93160e1679a1327be111cbc25" },
|
||||||
"conform.nvim": { "branch": "master", "commit": "d28ccf945374edd9f1c34a82f6c22261dbd8ab98" },
|
"conform.nvim": { "branch": "master", "commit": "b4aab989db276993ea5dcb78872be494ce546521" },
|
||||||
"fidget.nvim": { "branch": "main", "commit": "e2a175c2abe2d4f65357da1c98c59a5cfb2b543f" },
|
"fidget.nvim": { "branch": "main", "commit": "4d5858bd4c471c895060e1b9f3575f1551184dc5" },
|
||||||
"harpoon": { "branch": "harpoon2", "commit": "a84ab829eaf3678b586609888ef52f7779102263" },
|
"harpoon": { "branch": "harpoon2", "commit": "ed1f853847ffd04b2b61c314865665e1dadf22c7" },
|
||||||
"lazy.nvim": { "branch": "main", "commit": "6c3bda4aca61a13a9c63f1c1d1b16b9d3be90d7a" },
|
"lazy.nvim": { "branch": "main", "commit": "6c3bda4aca61a13a9c63f1c1d1b16b9d3be90d7a" },
|
||||||
"mason-lspconfig.nvim": { "branch": "main", "commit": "4d0e5b49363cac187326998b96aa6a2884e0e89b" },
|
"mason-lspconfig.nvim": { "branch": "main", "commit": "25c11854aa25558ee6c03432edfa0df0217324be" },
|
||||||
"mason.nvim": { "branch": "main", "commit": "e2f7f9044ec30067bc11800a9e266664b88cda22" },
|
"mason.nvim": { "branch": "main", "commit": "d66c60e17dd6fd8165194b1d14d21f7eb2c1697a" },
|
||||||
"neo-tree.nvim": { "branch": "main", "commit": "a77af2e764c5ed4038d27d1c463fa49cd4794e07" },
|
"nvim-autopairs": { "branch": "master", "commit": "23320e75953ac82e559c610bec5a90d9c6dfa743" },
|
||||||
"nui.nvim": { "branch": "main", "commit": "b58e2bfda5cea347c9d58b7f11cf3012c7b3953f" },
|
"nvim-cmp": { "branch": "main", "commit": "b5311ab3ed9c846b585c0c15b7559be131ec4be9" },
|
||||||
"nvim-autopairs": { "branch": "master", "commit": "ee297f215e95a60b01fde33275cc3c820eddeebe" },
|
"nvim-lspconfig": { "branch": "master", "commit": "d9879110d0422a566fa01d732556f4d5515e1738" },
|
||||||
"nvim-cmp": { "branch": "main", "commit": "f17d9b4394027ff4442b298398dfcaab97e40c4f" },
|
"nvim-tree.lua": { "branch": "master", "commit": "321bc61580fd066b76861c32de3319c3a6d089e7" },
|
||||||
"nvim-lspconfig": { "branch": "master", "commit": "bc6ada4b0892b7f10852c0b8ca7209fd39a6d754" },
|
"nvim-treesitter": { "branch": "master", "commit": "42fc28ba918343ebfd5565147a42a26580579482" },
|
||||||
"nvim-treesitter": { "branch": "master", "commit": "7dc8aabe86db8c2f23520e8334f7584f83e84342" },
|
"nvim-ts-autotag": { "branch": "main", "commit": "c4ca798ab95b316a768d51eaaaee48f64a4a46bc" },
|
||||||
"nvim-ts-autotag": { "branch": "main", "commit": "1cca23c9da708047922d3895a71032bc0449c52d" },
|
"nvim-web-devicons": { "branch": "master", "commit": "6e51ca170563330e063720449c21f43e27ca0bc1" },
|
||||||
"nvim-web-devicons": { "branch": "master", "commit": "e87554285f581047b1bf236794b0eb812b444b87" },
|
"plenary.nvim": { "branch": "master", "commit": "b9fd5226c2f76c951fc8ed5923d85e4de065e509" },
|
||||||
"plenary.nvim": { "branch": "master", "commit": "2d9b06177a975543726ce5c73fca176cedbffe9d" },
|
"schemastore.nvim": { "branch": "main", "commit": "0fccf9234acfd981867cbd42c4101829e6808790" },
|
||||||
"rose-pine": { "branch": "main", "commit": "91548dca53b36dbb9d36c10f114385f759731be1" },
|
"telescope-fzf-native.nvim": { "branch": "main", "commit": "1f08ed60cafc8f6168b72b80be2b2ea149813e55" },
|
||||||
"schemastore.nvim": { "branch": "main", "commit": "f8d6e9068861888651f68958521b1958314aac41" },
|
|
||||||
"telescope-fzf-native.nvim": { "branch": "main", "commit": "cf48d4dfce44e0b9a2e19a008d6ec6ea6f01a83b" },
|
|
||||||
"telescope-ui-select.nvim": { "branch": "master", "commit": "6e51d7da30bd139a6950adf2a47fda6df9fa06d2" },
|
"telescope-ui-select.nvim": { "branch": "master", "commit": "6e51d7da30bd139a6950adf2a47fda6df9fa06d2" },
|
||||||
"telescope.nvim": { "branch": "0.1.x", "commit": "a0bbec21143c7bc5f8bb02e0005fa0b982edc026" }
|
"telescope.nvim": { "branch": "0.1.x", "commit": "a0bbec21143c7bc5f8bb02e0005fa0b982edc026" }
|
||||||
}
|
}
|
||||||
|
|||||||
128
config/linux-dev/nvim/lua/config/autocmds.lua
Normal file
128
config/linux-dev/nvim/lua/config/autocmds.lua
Normal 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,
|
||||||
|
-- })
|
||||||
@ -8,4 +8,11 @@ if not (vim.uv or vim.loop).fs_stat(lazypath) then
|
|||||||
end ---@diagnostic disable-next-line: undefined-field
|
end ---@diagnostic disable-next-line: undefined-field
|
||||||
vim.opt.rtp:prepend(lazypath)
|
vim.opt.rtp:prepend(lazypath)
|
||||||
|
|
||||||
require('lazy').setup('plugins')
|
require("lazy").setup({
|
||||||
|
spec = { { import = "plugins" } },
|
||||||
|
ui = {
|
||||||
|
backdrop = 100,
|
||||||
|
border = "rounded"
|
||||||
|
},
|
||||||
|
})
|
||||||
|
|
||||||
|
|||||||
@ -3,19 +3,16 @@ vim.g.mapleader = " "
|
|||||||
vim.g.maplocalleader = " "
|
vim.g.maplocalleader = " "
|
||||||
|
|
||||||
-- Use Nerd Font
|
-- Use Nerd Font
|
||||||
vim.g.have_nerd_font = true
|
vim.g.have_nerd_font = false
|
||||||
|
|
||||||
-- Add vertical line
|
-- Add vertical line
|
||||||
-- vim.opt.colorcolumn = "100"
|
-- vim.opt.colorcolumn = "100"
|
||||||
|
|
||||||
|
vim.opt.laststatus = 3
|
||||||
vim.opt.signcolumn = "no"
|
vim.opt.signcolumn = "no"
|
||||||
|
|
||||||
-- Enable TrueColor
|
-- Enable TrueColor
|
||||||
vim.opt.termguicolors = true
|
vim.opt.termguicolors = false
|
||||||
|
|
||||||
-- Disable Neovim background
|
|
||||||
vim.api.nvim_set_hl(0, "Normal", { bg = "none" })
|
|
||||||
vim.api.nvim_set_hl(0, "NormalFloat", { bg = "none" })
|
|
||||||
|
|
||||||
-- Scroll lines/columns
|
-- Scroll lines/columns
|
||||||
vim.opt.mousescroll = "hor:1,ver:1"
|
vim.opt.mousescroll = "hor:1,ver:1"
|
||||||
@ -42,7 +39,8 @@ vim.opt.relativenumber = true
|
|||||||
vim.opt.mouse = "a"
|
vim.opt.mouse = "a"
|
||||||
|
|
||||||
-- Full path on status line
|
-- 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
|
-- Sync clipboard between OS and Neovim
|
||||||
vim.schedule(function()
|
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
|
-- Minimal number of screen lines to keep above and below the cursor
|
||||||
vim.opt.scrolloff = 10
|
vim.opt.scrolloff = 10
|
||||||
|
|
||||||
-- Highlight when yanking (copying) text
|
-- Load the colorscheme
|
||||||
vim.api.nvim_create_autocmd("TextYankPost", {
|
vim.cmd.colorscheme("invero")
|
||||||
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,
|
|
||||||
}
|
|
||||||
})
|
|
||||||
|
|||||||
@ -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,
|
|
||||||
}
|
|
||||||
@ -21,14 +21,20 @@ return {
|
|||||||
|
|
||||||
"neovim/nvim-lspconfig",
|
"neovim/nvim-lspconfig",
|
||||||
dependencies = {
|
dependencies = {
|
||||||
{ "williamboman/mason.nvim", config = true },
|
{ "williamboman/mason.nvim", version = "1.8.0", config = true },
|
||||||
"williamboman/mason-lspconfig.nvim",
|
{ "williamboman/mason-lspconfig.nvim", version = "1.31.0"},
|
||||||
{ "j-hui/fidget.nvim", opts = {} }, -- side fidget showing status
|
{ "j-hui/fidget.nvim", opts = {} }, -- side fidget showing status
|
||||||
"hrsh7th/cmp-nvim-lsp", -- completion
|
"hrsh7th/cmp-nvim-lsp", -- completion
|
||||||
"b0o/schemastore.nvim",
|
"b0o/schemastore.nvim",
|
||||||
},
|
},
|
||||||
config = function()
|
config = function()
|
||||||
require("mason").setup()
|
require("mason").setup({
|
||||||
|
ui = {
|
||||||
|
border = "rounded",
|
||||||
|
backdrop = 0
|
||||||
|
},
|
||||||
|
})
|
||||||
|
|
||||||
require("mason-lspconfig").setup()
|
require("mason-lspconfig").setup()
|
||||||
|
|
||||||
local lspconfig = require("lspconfig")
|
local lspconfig = require("lspconfig")
|
||||||
|
|||||||
@ -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",
|
|
||||||
},
|
|
||||||
},
|
|
||||||
},
|
|
||||||
},
|
|
||||||
}
|
|
||||||
188
config/linux-dev/nvim/lua/plugins/nvim-tree.lua
Normal file
188
config/linux-dev/nvim/lua/plugins/nvim-tree.lua
Normal 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,
|
||||||
|
-- }
|
||||||
|
-- },
|
||||||
|
-- },
|
||||||
|
-- }
|
||||||
@ -1,69 +1,30 @@
|
|||||||
local remap = require("utils.remap")
|
local remap = require("utils.remap")
|
||||||
|
|
||||||
return { -- Fuzzy Finder (files, lsp, etc)
|
return {
|
||||||
"nvim-telescope/telescope.nvim",
|
"nvim-telescope/telescope.nvim",
|
||||||
event = "VimEnter",
|
event = "VimEnter",
|
||||||
branch = "0.1.x",
|
branch = "0.1.x",
|
||||||
dependencies = {
|
dependencies = {
|
||||||
"nvim-lua/plenary.nvim",
|
"nvim-lua/plenary.nvim",
|
||||||
{ -- If encountering errors, see telescope-fzf-native README for installation instructions
|
{
|
||||||
"nvim-telescope/telescope-fzf-native.nvim",
|
"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",
|
build = "make",
|
||||||
|
|
||||||
-- `cond` is a condition used to determine whether this plugin should be
|
|
||||||
-- installed and loaded.
|
|
||||||
cond = function()
|
cond = function()
|
||||||
return vim.fn.executable("make") == 1
|
return vim.fn.executable("make") == 1
|
||||||
end,
|
end,
|
||||||
},
|
},
|
||||||
{ "nvim-telescope/telescope-ui-select.nvim" },
|
{ "nvim-telescope/telescope-ui-select.nvim" },
|
||||||
|
-- { "nvim-tree/nvim-web-devicons", enabled = vim.g.have_nerd_font },
|
||||||
-- Useful for getting pretty icons, but requires a Nerd Font.
|
|
||||||
{ "nvim-tree/nvim-web-devicons", enabled = vim.g.have_nerd_font },
|
|
||||||
},
|
},
|
||||||
config = function()
|
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({
|
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 = {
|
defaults = {
|
||||||
layout_strategy = "vertical",
|
layout_strategy = "vertical",
|
||||||
layout_config = {
|
layout_config = {
|
||||||
-- vertical = { width = 0.5 }
|
width = { 0.95, max = 100 },
|
||||||
-- horizontal = {
|
height = 0.95,
|
||||||
-- width = 0.9,
|
preview_cutoff = 1,
|
||||||
-- preview_width = 0.5,
|
preview_height = 0.7,
|
||||||
-- },
|
|
||||||
},
|
},
|
||||||
mappings = {
|
mappings = {
|
||||||
n = {
|
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, "fzf")
|
||||||
pcall(require("telescope").load_extension, "ui-select")
|
pcall(require("telescope").load_extension, "ui-select")
|
||||||
|
|
||||||
|
|||||||
@ -1,34 +1,32 @@
|
|||||||
return {
|
return {
|
||||||
'nvim-treesitter/nvim-treesitter',
|
"nvim-treesitter/nvim-treesitter",
|
||||||
build = 'TSUpdate',
|
build = "TSUpdate",
|
||||||
main = 'nvim-treesitter.configs',
|
main = "nvim-treesitter.configs",
|
||||||
opts = {
|
opts = {
|
||||||
ensure_installed = {
|
ensure_installed = {
|
||||||
'diff',
|
"diff",
|
||||||
'lua',
|
"lua",
|
||||||
'html',
|
"html",
|
||||||
'css',
|
"css",
|
||||||
'javascript',
|
"javascript",
|
||||||
'typescript',
|
"typescript",
|
||||||
'tsx',
|
"tsx",
|
||||||
'markdown',
|
"markdown",
|
||||||
'markdown_inline'
|
"markdown_inline",
|
||||||
},
|
},
|
||||||
auto_install = true,
|
auto_install = true,
|
||||||
highlight = {
|
highlight = {
|
||||||
enable = true,
|
enable = true,
|
||||||
},
|
},
|
||||||
indent = { enable = true }
|
indent = { enable = true },
|
||||||
},
|
},
|
||||||
config = function(_, opts)
|
config = function(_, opts)
|
||||||
require('nvim-treesitter.configs').setup(opts)
|
require("nvim-treesitter.configs").setup(opts)
|
||||||
-- Add MDX filetype detection
|
-- Add MDX filetype detection
|
||||||
vim.filetype.add({
|
vim.filetype.add({
|
||||||
extension = {
|
extension = {
|
||||||
mdx = 'markdown.mdx',
|
mdx = "markdown.mdx",
|
||||||
},
|
},
|
||||||
})
|
})
|
||||||
end,
|
end,
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
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,
|
||||||
|
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
|
||||||
32
config/linux-dev/nvim/lua/themes/invero/groups/editor.lua
Normal file
32
config/linux-dev/nvim/lua/themes/invero/groups/editor.lua
Normal 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
|
||||||
@ -0,0 +1,7 @@
|
|||||||
|
local M = {}
|
||||||
|
|
||||||
|
function M.get(C)
|
||||||
|
return {}
|
||||||
|
end
|
||||||
|
|
||||||
|
return M
|
||||||
@ -0,0 +1,9 @@
|
|||||||
|
local M = {}
|
||||||
|
|
||||||
|
function M.get(C)
|
||||||
|
return {
|
||||||
|
TelescopeMatching = { fg = C.yellow, bg = C.none, bold = true },
|
||||||
|
}
|
||||||
|
end
|
||||||
|
|
||||||
|
return M
|
||||||
@ -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
|
||||||
38
config/linux-dev/nvim/lua/themes/invero/groups/syntax.lua
Normal file
38
config/linux-dev/nvim/lua/themes/invero/groups/syntax.lua
Normal 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
|
||||||
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
|
||||||
14
config/linux-dev/nvim/lua/themes/invero/init.lua
Normal file
14
config/linux-dev/nvim/lua/themes/invero/init.lua
Normal 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
|
||||||
53
config/linux-dev/nvim/lua/themes/invero/palette.lua
Normal file
53
config/linux-dev/nvim/lua/themes/invero/palette.lua
Normal 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
|
||||||
72
config/linux-dev/nvim/lua/themes/invero/setup.lua
Normal file
72
config/linux-dev/nvim/lua/themes/invero/setup.lua
Normal 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
71
config/linux-dev/tmux
Normal 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!"
|
||||||
@ -1,7 +1,7 @@
|
|||||||
# Change the prefix from 'C-b' to 'C-Space'
|
# Change the prefix from 'C-b' to 'C-Space'
|
||||||
unbind C-b
|
unbind C-b
|
||||||
set-option -g prefix C-f
|
set-option -g prefix C-Space
|
||||||
bind-key C-f send-prefix
|
bind-key C-Space send-prefix
|
||||||
|
|
||||||
set-option -g set-clipboard on
|
set-option -g set-clipboard on
|
||||||
|
|
||||||
@ -19,20 +19,24 @@ setw -g pane-base-index 1
|
|||||||
# Increase scrollback buffer size
|
# Increase scrollback buffer size
|
||||||
set -g history-limit 10000
|
set -g history-limit 10000
|
||||||
|
|
||||||
# Customize the status bar
|
# Customize the status bar for Catppuccin Latte
|
||||||
set -g status-style bg=default,fg=white
|
set -g status-style bg=default,fg='#4c4f69' # Catppuccin Latte text color
|
||||||
set -g status-left '#[fg=cyan,bold][#S] '
|
set -g status-left '#[fg=#1e66f5,bold][#S] ' # Catppuccin Latte blue for session
|
||||||
set -g status-left-length 50
|
set -g status-left-length 50
|
||||||
set -g status-right ''
|
set -g status-right ''
|
||||||
|
|
||||||
# Window status format
|
# Optional: Style the window tabs to match
|
||||||
setw -g window-status-format '#[fg=white,dim]#I#[fg=grey]:#[fg=white]#W#[fg=grey]#F'
|
set -g window-status-current-style 'fg=#4c4f69,bold' # Active window - dark text, bold
|
||||||
setw -g window-status-current-format '#[fg=cyan,bold]#I#[fg=blue]:#[fg=cyan]#W#[fg=grey]#F'
|
set -g window-status-style 'fg=#6c6f85' # Inactive windows - lighter text
|
||||||
|
set -g window-status-separator ' | ' # Clean separator
|
||||||
|
|
||||||
# Pane border
|
# Optional: Style the borders to match (if you use pane borders)
|
||||||
set -g pane-border-style fg=colour240
|
set -g pane-border-style 'fg=#ccd0da' # Light border for inactive panes
|
||||||
set -g pane-active-border-style fg=cyan
|
set -g pane-active-border-style 'fg=#1e66f5' # Blue border for active pane
|
||||||
|
|
||||||
|
set -g status-left-length 20
|
||||||
|
set -g status-right-length 20
|
||||||
|
set -g pane-border-format ""
|
||||||
# Message text
|
# Message text
|
||||||
set -g message-style bg=default,fg=cyan
|
set -g message-style bg=default,fg=cyan
|
||||||
|
|
||||||
@ -45,6 +49,7 @@ bind-key -T copy-mode-vi WheelDownPane send -N1 -X scroll-down
|
|||||||
|
|
||||||
# Update terminal titles
|
# Update terminal titles
|
||||||
set-option -g set-titles on
|
set-option -g set-titles on
|
||||||
|
set-option -g set-titles-string "#S"
|
||||||
|
|
||||||
# Use vim keybindings in copy mode
|
# Use vim keybindings in copy mode
|
||||||
setw -g mode-keys vi
|
setw -g mode-keys vi
|
||||||
|
|||||||
71
config/macos/bin/vm
Executable file
71
config/macos/bin/vm
Executable file
@ -0,0 +1,71 @@
|
|||||||
|
#!/usr/bin/env bash
|
||||||
|
# ~/bin/vm
|
||||||
|
#
|
||||||
|
# SSH helper script for connecting to VMs or workstations.
|
||||||
|
# Usage:
|
||||||
|
# vm [--no-tmux] <host>
|
||||||
|
#
|
||||||
|
# Host patterns:
|
||||||
|
# personal-orb -> ssh $USER@personal@orb
|
||||||
|
# personal-utm -> ssh $USER@personal.utm.local
|
||||||
|
# personal-workstation -> ssh $USER@personal.workstation.lan
|
||||||
|
#
|
||||||
|
# Optional:
|
||||||
|
# --no-tmux -> skips attaching to tmux session
|
||||||
|
|
||||||
|
skip_tmux=0
|
||||||
|
|
||||||
|
# Check for --no-tmux flag
|
||||||
|
if [[ "$1" == "--no-tmux" ]]; then
|
||||||
|
skip_tmux=1
|
||||||
|
shift
|
||||||
|
fi
|
||||||
|
|
||||||
|
full="$1"
|
||||||
|
user="$USER"
|
||||||
|
host="$full"
|
||||||
|
|
||||||
|
# Split user@host if explicitly specified
|
||||||
|
if [[ "$full" == *@* ]]; then
|
||||||
|
user="${full%@*}"
|
||||||
|
host="${full#*@}"
|
||||||
|
fi
|
||||||
|
|
||||||
|
# Map host patterns to SSH target and tmux session
|
||||||
|
case "$host" in
|
||||||
|
*-orb)
|
||||||
|
ssh_host="${host%-orb}@orb"
|
||||||
|
tmux_session="$host"
|
||||||
|
;;
|
||||||
|
*-utm)
|
||||||
|
ssh_host="${host%-utm}.utm.local"
|
||||||
|
tmux_session="$host"
|
||||||
|
ssh_identity="$HOME/.ssh/id_ed25519_internal"
|
||||||
|
;;
|
||||||
|
*-workstation)
|
||||||
|
ssh_host="${host%-workstation}.workstation.lan"
|
||||||
|
tmux_session="$host"
|
||||||
|
ssh_identity="$HOME/.ssh/id_ed25519_internal"
|
||||||
|
;;
|
||||||
|
*)
|
||||||
|
echo "Error: unknown host pattern '$host'" >&2
|
||||||
|
exit 1
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
|
||||||
|
# Build SSH command safely using an array
|
||||||
|
ssh_cmd=(ssh -t)
|
||||||
|
|
||||||
|
# Include identity file if needed
|
||||||
|
[[ -n "$ssh_identity" ]] && ssh_cmd+=(-i "$ssh_identity" -o IdentitiesOnly=yes)
|
||||||
|
|
||||||
|
# Add target user and host
|
||||||
|
ssh_cmd+=("$user@$ssh_host")
|
||||||
|
|
||||||
|
# Add tmux session unless skipped
|
||||||
|
[[ $skip_tmux -eq 0 ]] && ssh_cmd+=("tmux" "new" "-A" "-s" "$tmux_session")
|
||||||
|
|
||||||
|
# Replace current shell with SSH command
|
||||||
|
# echo "Executing: ${ssh_cmd[*]}" >&2
|
||||||
|
exec "${ssh_cmd[@]}"
|
||||||
|
|
||||||
@ -0,0 +1,43 @@
|
|||||||
|
{
|
||||||
|
"profiles": [
|
||||||
|
{
|
||||||
|
"devices": [
|
||||||
|
{
|
||||||
|
"identifiers": { "is_keyboard": true },
|
||||||
|
"simple_modifications": [
|
||||||
|
{
|
||||||
|
"from": { "key_code": "non_us_backslash" },
|
||||||
|
"to": [{ "key_code": "grave_accent_and_tilde" }]
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"identifiers": {
|
||||||
|
"is_keyboard": true,
|
||||||
|
"product_id": 49164,
|
||||||
|
"vendor_id": 7276
|
||||||
|
},
|
||||||
|
"simple_modifications": [
|
||||||
|
{
|
||||||
|
"from": { "key_code": "left_command" },
|
||||||
|
"to": [{ "key_code": "left_option" }]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"from": { "key_code": "left_option" },
|
||||||
|
"to": [{ "key_code": "left_command" }]
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"name": "Default profile",
|
||||||
|
"selected": true,
|
||||||
|
"simple_modifications": [
|
||||||
|
{
|
||||||
|
"from": { "key_code": "caps_lock" },
|
||||||
|
"to": [{ "key_code": "left_control" }]
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"virtual_hid_keyboard": { "keyboard_type_v2": "ansi" }
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
@ -1,4 +1,5 @@
|
|||||||
{
|
{
|
||||||
|
"global": { "show_in_menu_bar": false },
|
||||||
"profiles": [
|
"profiles": [
|
||||||
{
|
{
|
||||||
"devices": [
|
"devices": [
|
||||||
|
|||||||
@ -1,4 +1,4 @@
|
|||||||
theme = catppuccin-frappe
|
theme = catppuccin-latte
|
||||||
|
|
||||||
# Terminal
|
# Terminal
|
||||||
term = "xterm-256color"
|
term = "xterm-256color"
|
||||||
@ -9,9 +9,9 @@ font-size = 14
|
|||||||
font-thicken = true
|
font-thicken = true
|
||||||
|
|
||||||
# Cell width (affects letter spacing)
|
# Cell width (affects letter spacing)
|
||||||
adjust-cell-width = -1
|
# adjust-cell-width = -1
|
||||||
adjust-cell-height = -1
|
# adjust-cell-height = -1
|
||||||
adjust-font-baseline = -1
|
# adjust-font-baseline = -1
|
||||||
|
|
||||||
# Cursor
|
# Cursor
|
||||||
cursor-style-blink = false
|
cursor-style-blink = false
|
||||||
@ -32,8 +32,8 @@ window-width = 100
|
|||||||
window-height = 26
|
window-height = 26
|
||||||
window-padding-x = 4
|
window-padding-x = 4
|
||||||
window-padding-y = 2
|
window-padding-y = 2
|
||||||
window-colorspace = display-p3
|
# window-colorspace = display-p3
|
||||||
macos-titlebar-style = native
|
# macos-titlebar-style = native
|
||||||
#macos-titlebar-style = transparent
|
#macos-titlebar-style = transparent
|
||||||
|
|
||||||
|
|
||||||
@ -42,8 +42,8 @@ macos-titlebar-style = native
|
|||||||
#window-padding-balance = true
|
#window-padding-balance = true
|
||||||
|
|
||||||
# Background
|
# Background
|
||||||
background-opacity = 1
|
# background-opacity = 1
|
||||||
background-blur-radius = 0
|
# background-blur-radius = 0
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@ -20,6 +20,8 @@ local function nmap(lhs, rhs, opts) map("n", lhs, rhs, opts) end
|
|||||||
local function imap(lhs, rhs, opts) map("i", lhs, rhs, opts) end
|
local function imap(lhs, rhs, opts) map("i", lhs, rhs, opts) end
|
||||||
local function vmap(lhs, rhs, opts) map("v", lhs, rhs, opts) end
|
local function vmap(lhs, rhs, opts) map("v", lhs, rhs, opts) end
|
||||||
local function tmap(lhs, rhs, opts) map("t", lhs, rhs, opts) end
|
local function tmap(lhs, rhs, opts) map("t", lhs, rhs, opts) end
|
||||||
|
vim.opt.signcolumn = "no"
|
||||||
|
|
||||||
|
|
||||||
-- Map Leader
|
-- Map Leader
|
||||||
vim.g.mapleader = " "
|
vim.g.mapleader = " "
|
||||||
|
|||||||
@ -1,81 +0,0 @@
|
|||||||
# Add /bin to path
|
|
||||||
export PATH="$PATH:$HOME/bin"
|
|
||||||
|
|
||||||
# Set locales
|
|
||||||
export LANGUAGE="en_US:en"
|
|
||||||
export LANG=en_US.UTF-8
|
|
||||||
export LC_ALL=en_US.UTF-8
|
|
||||||
|
|
||||||
autoload -Uz compinit && compinit # Autocomplete
|
|
||||||
zstyle ':completion:*' matcher-list 'm:{a-zA-Z}={A-Za-z}' # Case Insensitive
|
|
||||||
|
|
||||||
setopt autocd # cd without it
|
|
||||||
setopt share_history
|
|
||||||
|
|
||||||
# Set terminal title to hostname
|
|
||||||
echo -n -e "\033]0;SSH: $(hostname)\007"
|
|
||||||
|
|
||||||
# Git prompt function
|
|
||||||
git_prompt_info() {
|
|
||||||
if git rev-parse --is-inside-work-tree >/dev/null 2>&1; then
|
|
||||||
local branch=$(git symbolic-ref --short HEAD 2>/dev/null || git rev-parse --short HEAD)
|
|
||||||
echo " %F{green}($branch)%f"
|
|
||||||
fi
|
|
||||||
}
|
|
||||||
|
|
||||||
# Set up the prompt
|
|
||||||
setopt PROMPT_SUBST # Dyna
|
|
||||||
PROMPT='%n@%m%f %F{blue}%~%f$(git_prompt_info) $ '
|
|
||||||
|
|
||||||
# Disable the log builtin, so we don't conflict with /usr/bin/log
|
|
||||||
disable log
|
|
||||||
|
|
||||||
# Save command history
|
|
||||||
HISTFILE=${ZDOTDIR:-$HOME}/.zsh_history
|
|
||||||
HISTSIZE=2000
|
|
||||||
SAVEHIST=1000
|
|
||||||
setopt HIST_IGNORE_ALL_DUPS
|
|
||||||
|
|
||||||
# Load functions
|
|
||||||
autoload -U up-line-or-beginning-search
|
|
||||||
autoload -U down-line-or-beginning-search
|
|
||||||
zle -N up-line-or-beginning-search
|
|
||||||
zle -N down-line-or-beginning-search
|
|
||||||
|
|
||||||
# Bind both common escape sequences
|
|
||||||
bindkey '^[[A' up-line-or-beginning-search # normal mode
|
|
||||||
bindkey '^[OA' up-line-or-beginning-search # application mode
|
|
||||||
bindkey '^[[B' down-line-or-beginning-search # normal mode
|
|
||||||
bindkey '^[OB' down-line-or-beginning-search # application mode
|
|
||||||
|
|
||||||
# Aliases for ls
|
|
||||||
OS_TYPE=$(uname)
|
|
||||||
if [[ "$OS_TYPE" == "Linux" ]]; then
|
|
||||||
alias ls='ls --color=auto --group-directories-first'
|
|
||||||
elif [[ "$OS_TYPE" == "Darwin" ]]; then
|
|
||||||
alias ls='ls --color=auto'
|
|
||||||
fi
|
|
||||||
alias ll='ls -lF'
|
|
||||||
alias lla='ll -a'
|
|
||||||
alias ld='ls -ld */' # List only directories
|
|
||||||
|
|
||||||
# Aliases for git
|
|
||||||
alias g='git'
|
|
||||||
alias ga='git add'
|
|
||||||
alias gaa='git add --all'
|
|
||||||
alias gb='git branch'
|
|
||||||
alias gcm='git commit -m'
|
|
||||||
alias gam='git commit -am'
|
|
||||||
alias gco='git checkout'
|
|
||||||
alias gd='git diff'
|
|
||||||
alias gf='git fetch'
|
|
||||||
alias gl='git pull'
|
|
||||||
alias gp='git push'
|
|
||||||
alias gst='git status'
|
|
||||||
alias glg='git log --graph --oneline --decorate --all'
|
|
||||||
alias gm='git merge'
|
|
||||||
alias grb='git rebase'
|
|
||||||
alias grs='git reset'
|
|
||||||
alias grv='git remote -v'
|
|
||||||
|
|
||||||
alias tree='tree -I node_modules'
|
|
||||||
45
config/shared/zsh_config/aliases
Normal file
45
config/shared/zsh_config/aliases
Normal file
@ -0,0 +1,45 @@
|
|||||||
|
# -----------------------------
|
||||||
|
# OS-specific aliases for ls
|
||||||
|
# -----------------------------
|
||||||
|
OS_TYPE=$(uname)
|
||||||
|
if [[ "$OS_TYPE" == "Linux" ]]; then
|
||||||
|
alias ls='ls --color=auto --group-directories-first'
|
||||||
|
elif [[ "$OS_TYPE" == "Darwin" ]]; then
|
||||||
|
alias ls='ls --color=auto'
|
||||||
|
fi
|
||||||
|
|
||||||
|
alias ll='ls -lF'
|
||||||
|
alias lla='ll -a'
|
||||||
|
alias ld='ls -ld */'
|
||||||
|
|
||||||
|
# -----------------------------
|
||||||
|
# Vim / Neovim
|
||||||
|
# -----------------------------
|
||||||
|
if command -v nvim >/dev/null 2>&1; then
|
||||||
|
alias vim='nvim'
|
||||||
|
else
|
||||||
|
alias vim='vim'
|
||||||
|
fi
|
||||||
|
|
||||||
|
# -----------------------------
|
||||||
|
# Git aliases
|
||||||
|
# -----------------------------
|
||||||
|
alias g='git'
|
||||||
|
alias ga='git add'
|
||||||
|
alias gaa='git add --all'
|
||||||
|
alias gb='git branch'
|
||||||
|
alias gcm='git commit -m'
|
||||||
|
alias gam='git commit -am'
|
||||||
|
alias gco='git checkout'
|
||||||
|
alias gd='git diff'
|
||||||
|
alias gf='git fetch'
|
||||||
|
alias gl='git pull'
|
||||||
|
alias gp='git push'
|
||||||
|
alias gst='git status'
|
||||||
|
alias glg='git log --graph --oneline --decorate --all'
|
||||||
|
alias gm='git merge'
|
||||||
|
alias grb='git rebase'
|
||||||
|
alias grs='git reset'
|
||||||
|
alias grv='git remote -v'
|
||||||
|
alias tree='tree -I node_modules'
|
||||||
|
|
||||||
16
config/shared/zsh_config/keybindings
Normal file
16
config/shared/zsh_config/keybindings
Normal file
@ -0,0 +1,16 @@
|
|||||||
|
# -----------------------------
|
||||||
|
# ZLE functions
|
||||||
|
# -----------------------------
|
||||||
|
autoload -U up-line-or-beginning-search
|
||||||
|
autoload -U down-line-or-beginning-search
|
||||||
|
zle -N up-line-or-beginning-search
|
||||||
|
zle -N down-line-or-beginning-search
|
||||||
|
|
||||||
|
# -----------------------------
|
||||||
|
# Bind keys for history search
|
||||||
|
# -----------------------------
|
||||||
|
bindkey '^[[A' up-line-or-beginning-search
|
||||||
|
bindkey '^[OA' up-line-or-beginning-search
|
||||||
|
bindkey '^[[B' down-line-or-beginning-search
|
||||||
|
bindkey '^[OB' down-line-or-beginning-search
|
||||||
|
|
||||||
15
config/shared/zsh_config/prompt
Normal file
15
config/shared/zsh_config/prompt
Normal file
@ -0,0 +1,15 @@
|
|||||||
|
# -----------------------------
|
||||||
|
# Git prompt function
|
||||||
|
# -----------------------------
|
||||||
|
git_prompt_info() {
|
||||||
|
if git rev-parse --is-inside-work-tree >/dev/null 2>&1; then
|
||||||
|
local branch=$(git symbolic-ref --short HEAD 2>/dev/null || git rev-parse --short HEAD)
|
||||||
|
echo " %F{green}($branch)%f"
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
|
||||||
|
# -----------------------------
|
||||||
|
# Set prompt
|
||||||
|
# -----------------------------
|
||||||
|
PROMPT='%n@%m%f %F{blue}%~%f$(git_prompt_info) $ '
|
||||||
|
|
||||||
48
config/shared/zsh_config/zshrc
Normal file
48
config/shared/zsh_config/zshrc
Normal file
@ -0,0 +1,48 @@
|
|||||||
|
# -----------------------------
|
||||||
|
# PATH
|
||||||
|
# -----------------------------
|
||||||
|
export PATH="$PATH:$HOME/bin"
|
||||||
|
|
||||||
|
# -----------------------------
|
||||||
|
# Locales
|
||||||
|
# -----------------------------
|
||||||
|
export LANGUAGE="en_US:en"
|
||||||
|
export LANG=en_US.UTF-8
|
||||||
|
export LC_ALL=en_US.UTF-8
|
||||||
|
|
||||||
|
# -----------------------------
|
||||||
|
# Autocomplete
|
||||||
|
# -----------------------------
|
||||||
|
autoload -Uz compinit && compinit
|
||||||
|
zstyle ':completion:*' matcher-list 'm:{a-zA-Z}={A-Za-z}' # Case insensitive
|
||||||
|
|
||||||
|
# -----------------------------
|
||||||
|
# Shell options
|
||||||
|
# -----------------------------
|
||||||
|
setopt autocd
|
||||||
|
setopt share_history
|
||||||
|
setopt interactivecomments
|
||||||
|
setopt PROMPT_SUBST # Enable dynamic prompt expansion
|
||||||
|
|
||||||
|
# -----------------------------
|
||||||
|
# Disable conflicting builtins
|
||||||
|
# -----------------------------
|
||||||
|
disable log
|
||||||
|
|
||||||
|
# -----------------------------
|
||||||
|
# History
|
||||||
|
# -----------------------------
|
||||||
|
HISTFILE=${ZDOTDIR:-$HOME}/.zsh_history
|
||||||
|
HISTSIZE=2000
|
||||||
|
SAVEHIST=1000
|
||||||
|
setopt HIST_IGNORE_ALL_DUPS
|
||||||
|
|
||||||
|
# -----------------------------
|
||||||
|
# Source modular components
|
||||||
|
# -----------------------------
|
||||||
|
CONFIG_DIR="$HOME/.config/zsh"
|
||||||
|
|
||||||
|
[ -f "$CONFIG_DIR/aliases" ] && source "$CONFIG_DIR/aliases"
|
||||||
|
[ -f "$CONFIG_DIR/prompt" ] && source "$CONFIG_DIR/prompt"
|
||||||
|
[ -f "$CONFIG_DIR/keybindings" ] && source "$CONFIG_DIR/keybindings"
|
||||||
|
|
||||||
6
config/shared/zsh_root
Normal file
6
config/shared/zsh_root
Normal file
@ -0,0 +1,6 @@
|
|||||||
|
if [ -f "$HOME/.config/zsh/zshrc" ]; then
|
||||||
|
source "$HOME/.config/zsh/zshrc"
|
||||||
|
else
|
||||||
|
echo "Warning: ~/.config/zsh/zshrc not found, skipping custom Zsh configuration."
|
||||||
|
fi
|
||||||
|
|
||||||
Loading…
Reference in New Issue
Block a user