Compare commits
12 Commits
2a940dbdc2
...
master
| Author | SHA1 | Date | |
|---|---|---|---|
| 08cf0ce23e | |||
| 6f21c293ad | |||
| 6235a2c6eb | |||
| 5a78dc26fa | |||
|
|
12a2e62a9c | ||
|
|
346ebeabbd | ||
|
|
72a88e79e1 | ||
|
|
365c351cdf | ||
| 1d0f50966e | |||
| f0cae6d5b4 | |||
| 26355acb99 | |||
| 3dc499aa86 |
2
.gitignore
vendored
2
.gitignore
vendored
@@ -15,3 +15,5 @@ gcloud/
|
||||
htop/
|
||||
mcphub
|
||||
spicetify
|
||||
gh/hosts.yml
|
||||
raycast
|
||||
|
||||
16
gh/config.yml
Normal file
16
gh/config.yml
Normal file
@@ -0,0 +1,16 @@
|
||||
# What protocol to use when performing git operations. Supported values: ssh, https
|
||||
git_protocol: https
|
||||
# What editor gh should run when creating issues, pull requests, etc. If blank, will refer to environment.
|
||||
editor:
|
||||
# When to interactively prompt. This is a global config that cannot be overridden by hostname. Supported values: enabled, disabled
|
||||
prompt: enabled
|
||||
# A pager program to send command output to, e.g. "less". Set the value to "cat" to disable the pager.
|
||||
pager:
|
||||
# Aliases allow you to create nicknames for gh commands
|
||||
aliases:
|
||||
co: pr checkout
|
||||
# The path to a unix socket through which send HTTP connections. If blank, HTTP traffic will be handled by net/http.DefaultTransport.
|
||||
http_unix_socket:
|
||||
# What web browser gh should use when opening URLs. If blank, will refer to environment.
|
||||
browser:
|
||||
version: "1"
|
||||
@@ -1,102 +1,104 @@
|
||||
return {
|
||||
"yetone/avante.nvim",
|
||||
event = "VeryLazy",
|
||||
lazy = false,
|
||||
config = function(_, opts)
|
||||
require("avante").setup(opts)
|
||||
-- Then remove the default mappings
|
||||
vim.schedule(function()
|
||||
vim.keymap.del({ "n", "v" }, "<leader>aa")
|
||||
vim.keymap.del("n", "<leader>ar")
|
||||
vim.keymap.del("v", "<leader>ae")
|
||||
vim.keymap.del("n", "<leader>ah")
|
||||
vim.keymap.del("n", "<leader>ad")
|
||||
vim.keymap.del("n", "<leader>af")
|
||||
vim.keymap.del("n", "<leader>aR")
|
||||
vim.keymap.del("n", "<leader>as")
|
||||
vim.keymap.del("n", "<leader>at")
|
||||
vim.keymap.del("n", "<leader>a?")
|
||||
vim.keymap.del("n", "<leader>aB")
|
||||
vim.keymap.del("n", "<leader>aS")
|
||||
vim.keymap.del("n", "<leader>an")
|
||||
end)
|
||||
end,
|
||||
opts = {
|
||||
-- add any opts here
|
||||
provider = "copilot",
|
||||
providers = {
|
||||
copilot = {
|
||||
model = "claude-sonnet-4",
|
||||
-- max_tokens = 4096,
|
||||
},
|
||||
},
|
||||
system_prompt = function()
|
||||
local hub = require("mcphub").get_hub_instance()
|
||||
return hub and hub:get_active_servers_prompt() or ""
|
||||
end,
|
||||
-- Using function prevents requiring mcphub before it's loaded
|
||||
custom_tools = function()
|
||||
return {
|
||||
require("mcphub.extensions.avante").mcp_tool(),
|
||||
}
|
||||
end,
|
||||
},
|
||||
build = "make",
|
||||
keys = {
|
||||
{
|
||||
"<leader>ca",
|
||||
function()
|
||||
require("avante.api").ask()
|
||||
end,
|
||||
desc = "avante: ask",
|
||||
mode = { "n", "v" },
|
||||
},
|
||||
{
|
||||
"<leader>cr",
|
||||
function()
|
||||
require("avante.api").refresh()
|
||||
end,
|
||||
desc = "avante: refresh",
|
||||
},
|
||||
{
|
||||
"<leader>ce",
|
||||
function()
|
||||
require("avante.api").edit()
|
||||
end,
|
||||
desc = "avante: edit",
|
||||
mode = "v",
|
||||
},
|
||||
{
|
||||
"<leader>ch",
|
||||
function()
|
||||
require("avante.api").hint()
|
||||
end,
|
||||
desc = "avante: hint",
|
||||
mode = "n",
|
||||
},
|
||||
{
|
||||
"<leader>cd",
|
||||
function()
|
||||
require("avante.api").debug()
|
||||
end,
|
||||
desc = "avante: debug",
|
||||
mode = "n",
|
||||
},
|
||||
},
|
||||
dependencies = {
|
||||
"stevearc/dressing.nvim",
|
||||
"nvim-lua/plenary.nvim",
|
||||
"MunifTanjim/nui.nvim",
|
||||
--- The below dependencies are optional,
|
||||
-- "nvim-tree/nvim-web-devicons", -- or echasnovski/mini.icons
|
||||
{
|
||||
-- Make sure to setup it properly if you have lazy=true
|
||||
"MeanderingProgrammer/render-markdown.nvim",
|
||||
-- "zbirenbaum/copilot.lua", -- for providers='copilot'
|
||||
opts = {
|
||||
file_types = { "markdown", "Avante" },
|
||||
},
|
||||
ft = { "markdown", "Avante" },
|
||||
},
|
||||
},
|
||||
}
|
||||
return {}
|
||||
-- "yetone/avante.nvim",
|
||||
-- event = "VeryLazy",
|
||||
-- lazy = false,
|
||||
-- config = function(_, opts)
|
||||
-- require("avante").setup(opts)
|
||||
-- -- Then remove the default mappings
|
||||
-- vim.schedule(function()
|
||||
-- vim.keymap.del({ "n", "v" }, "<leader>aa")
|
||||
-- vim.keymap.del("n", "<leader>ar")
|
||||
-- vim.keymap.del("v", "<leader>ae")
|
||||
-- vim.keymap.del("n", "<leader>ah")
|
||||
-- vim.keymap.del("n", "<leader>ad")
|
||||
-- vim.keymap.del("n", "<leader>af")
|
||||
-- vim.keymap.del("n", "<leader>aR")
|
||||
-- vim.keymap.del("n", "<leader>as")
|
||||
-- vim.keymap.del("n", "<leader>at")
|
||||
-- vim.keymap.del("n", "<leader>a?")
|
||||
-- vim.keymap.del("n", "<leader>aB")
|
||||
-- vim.keymap.del("n", "<leader>aS")
|
||||
-- vim.keymap.del("n", "<leader>an")
|
||||
-- vim.keymap.del("n", "<leader>aC")
|
||||
-- vim.keymap.del("n", "<leader>az")
|
||||
-- end)
|
||||
-- end,
|
||||
-- opts = {
|
||||
-- -- add any opts here
|
||||
-- provider = "copilot",
|
||||
-- providers = {
|
||||
-- copilot = {
|
||||
-- model = "claude-sonnet-4",
|
||||
-- -- max_tokens = 4096,
|
||||
-- },
|
||||
-- },
|
||||
-- system_prompt = function()
|
||||
-- local hub = require("mcphub").get_hub_instance()
|
||||
-- return hub and hub:get_active_servers_prompt() or ""
|
||||
-- end,
|
||||
-- -- Using function prevents requiring mcphub before it's loaded
|
||||
-- custom_tools = function()
|
||||
-- return {
|
||||
-- require("mcphub.extensions.avante").mcp_tool(),
|
||||
-- }
|
||||
-- end,
|
||||
-- },
|
||||
-- build = "make",
|
||||
-- keys = {
|
||||
-- {
|
||||
-- "<leader>ca",
|
||||
-- function()
|
||||
-- require("avante.api").ask()
|
||||
-- end,
|
||||
-- desc = "avante: ask",
|
||||
-- mode = { "n", "v" },
|
||||
-- },
|
||||
-- {
|
||||
-- "<leader>cr",
|
||||
-- function()
|
||||
-- require("avante.api").refresh()
|
||||
-- end,
|
||||
-- desc = "avante: refresh",
|
||||
-- },
|
||||
-- {
|
||||
-- "<leader>ce",
|
||||
-- function()
|
||||
-- require("avante.api").edit()
|
||||
-- end,
|
||||
-- desc = "avante: edit",
|
||||
-- mode = "v",
|
||||
-- },
|
||||
-- {
|
||||
-- "<leader>ch",
|
||||
-- function()
|
||||
-- require("avante.api").hint()
|
||||
-- end,
|
||||
-- desc = "avante: hint",
|
||||
-- mode = "n",
|
||||
-- },
|
||||
-- {
|
||||
-- "<leader>cd",
|
||||
-- function()
|
||||
-- require("avante.api").debug()
|
||||
-- end,
|
||||
-- desc = "avante: debug",
|
||||
-- mode = "n",
|
||||
-- },
|
||||
-- },
|
||||
-- dependencies = {
|
||||
-- "stevearc/dressing.nvim",
|
||||
-- "nvim-lua/plenary.nvim",
|
||||
-- "MunifTanjim/nui.nvim",
|
||||
-- --- The below dependencies are optional,
|
||||
-- -- "nvim-tree/nvim-web-devicons", -- or echasnovski/mini.icons
|
||||
-- {
|
||||
-- -- Make sure to setup it properly if you have lazy=true
|
||||
-- "MeanderingProgrammer/render-markdown.nvim",
|
||||
-- -- "zbirenbaum/copilot.lua", -- for providers='copilot'
|
||||
-- opts = {
|
||||
-- file_types = { "markdown", "Avante" },
|
||||
-- },
|
||||
-- ft = { "markdown", "Avante" },
|
||||
-- },
|
||||
-- },
|
||||
-- }
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
return {
|
||||
"numToStr/Comment.nvim",
|
||||
event = "VeryLazy",
|
||||
lazy = false,
|
||||
|
||||
keys = {
|
||||
{ "<leader>/", desc = "Toggle comment" },
|
||||
},
|
||||
config = function ()
|
||||
require('Comment').setup({
|
||||
opleader = {
|
||||
|
||||
@@ -1,11 +1,8 @@
|
||||
return {
|
||||
'tamton-aquib/duck.nvim',
|
||||
config = function()
|
||||
local duck = require("duck")
|
||||
vim.keymap.set('n', '<leader>dd', function() duck.hatch() end, {})
|
||||
vim.keymap.set('n', '<leader>dc', function() duck.hatch("🐿️", 20) end, {})
|
||||
vim.keymap.set('n', '<leader>dk', function() duck.cook() end, {})
|
||||
vim.keymap.set('n', '<leader>dk', function() duck.cook("🐿️") end, {})
|
||||
-- duck.hatch("🐿️", 20)
|
||||
end
|
||||
"tamton-aquib/duck.nvim",
|
||||
keys = {
|
||||
{ "<leader>dd", function() require("duck").hatch() end, desc = "Duck hatch" },
|
||||
{ "<leader>dc", function() require("duck").hatch("🐿️", 20) end, desc = "Duck squirrel" },
|
||||
{ "<leader>dk", function() require("duck").cook() end, desc = "Duck cook" },
|
||||
},
|
||||
}
|
||||
|
||||
@@ -1,19 +1,17 @@
|
||||
return {
|
||||
"lewis6991/gitsigns.nvim",
|
||||
event = "VeryLazy",
|
||||
opts = function()
|
||||
return {
|
||||
signs = {
|
||||
add = { text = "│" },
|
||||
change = { text = "│" },
|
||||
delete = { text = "" },
|
||||
topdelete = { text = "‾" },
|
||||
changedelete = { text = "~" },
|
||||
untracked = { text = "│" },
|
||||
}
|
||||
}
|
||||
end,
|
||||
config = function()
|
||||
require("gitsigns").setup()
|
||||
end
|
||||
"lewis6991/gitsigns.nvim",
|
||||
event = "VeryLazy",
|
||||
opts = {
|
||||
signs = {
|
||||
add = { text = "|" },
|
||||
change = { text = "|" },
|
||||
delete = { text = "" },
|
||||
topdelete = { text = "" },
|
||||
changedelete = { text = "~" },
|
||||
untracked = { text = "|" },
|
||||
},
|
||||
},
|
||||
config = function(_, opts)
|
||||
require("gitsigns").setup(opts)
|
||||
end,
|
||||
}
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
return {
|
||||
"https://github.com/plentiform/go-ide",
|
||||
"https://github.com/plentiform/go-ide",
|
||||
ft = "go",
|
||||
}
|
||||
|
||||
@@ -1,14 +1,14 @@
|
||||
return {
|
||||
"nvim-lualine/lualine.nvim",
|
||||
event = "VeryLazy",
|
||||
requires = { "nvim-tree/nvim-web-devicons", opt = true },
|
||||
init = function()
|
||||
dependencies = { "nvim-tree/nvim-web-devicons" },
|
||||
config = function()
|
||||
local lualine = require("lualine")
|
||||
local custom_ayu_mirage = require("lualine.themes.ayu_mirage")
|
||||
custom_ayu_mirage.normal.c.bg = "#172c35"
|
||||
lualine.setup({
|
||||
section_separators = { left = "", right = "" },
|
||||
component_separators = { left = "", right = "" },
|
||||
section_separators = { left = "", right = "" },
|
||||
component_separators = { left = "", right = "" },
|
||||
sections = {
|
||||
lualine_a = { "mode" },
|
||||
lualine_b = { "branch", "diff", "diagnostics" },
|
||||
|
||||
@@ -6,7 +6,6 @@
|
||||
-- https://mason-registry.dev/registry/list
|
||||
local PACKAGES = {
|
||||
-- LSP
|
||||
"angular-language-server",
|
||||
"ansible-language-server",
|
||||
"css-lsp",
|
||||
"cssmodules-language-server",
|
||||
@@ -189,6 +188,20 @@ return {
|
||||
vim.lsp.config("ts_ls", {
|
||||
on_attach = on_attach,
|
||||
capabilities = capabilities,
|
||||
root_markers = { "tsconfig.json", "jsconfig.json", "package.json", ".git" },
|
||||
init_options = {
|
||||
hostInfo = "neovim",
|
||||
preferences = {
|
||||
importModuleSpecifierPreference = "relative",
|
||||
},
|
||||
},
|
||||
settings = {
|
||||
typescript = {
|
||||
preferences = {
|
||||
importModuleSpecifierPreference = "relative",
|
||||
},
|
||||
},
|
||||
},
|
||||
})
|
||||
vim.lsp.enable("ts_ls")
|
||||
|
||||
@@ -196,6 +209,7 @@ return {
|
||||
vim.lsp.config("html", { on_attach = on_attach, capabilities = capabilities })
|
||||
vim.lsp.config("cssls", { on_attach = on_attach, capabilities = capabilities })
|
||||
vim.lsp.config("jsonls", { on_attach = on_attach, capabilities = capabilities })
|
||||
vim.lsp.enable("jsonls")
|
||||
vim.lsp.config("yamlls", { on_attach = on_attach, capabilities = capabilities })
|
||||
vim.lsp.config("intelephense", {
|
||||
on_attach = on_attach,
|
||||
@@ -208,7 +222,15 @@ return {
|
||||
},
|
||||
},
|
||||
})
|
||||
vim.lsp.config("eslint", { on_attach = on_attach, capabilities = capabilities })
|
||||
vim.lsp.config("eslint", {
|
||||
on_attach = on_attach,
|
||||
capabilities = capabilities,
|
||||
root_markers = { "eslint.config.js", ".eslintrc.js", ".eslintrc.json", ".eslintrc", "package.json" },
|
||||
settings = {
|
||||
workingDirectories = { mode = "auto" },
|
||||
},
|
||||
})
|
||||
vim.lsp.enable("eslint")
|
||||
vim.lsp.config("vue_ls", {
|
||||
on_attach = on_attach,
|
||||
capabilities = capabilities,
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
return {
|
||||
"ravitemer/mcphub.nvim",
|
||||
event = "VeryLazy",
|
||||
dependencies = {
|
||||
"nvim-lua/plenary.nvim",
|
||||
},
|
||||
|
||||
@@ -3,6 +3,7 @@ return {
|
||||
"Kurama622/profile.nvim",
|
||||
config = function()
|
||||
local comp = require("profile.components")
|
||||
|
||||
require("profile").setup({
|
||||
avatar_opts = {
|
||||
force_blank = false,
|
||||
@@ -48,15 +49,44 @@ return {
|
||||
end
|
||||
|
||||
comp:separator_render()
|
||||
handle = io.popen("curl -s -m 3 https://vtip.43z.one")
|
||||
result = handle:read("*a")
|
||||
handle:close()
|
||||
comp:text_component_render({
|
||||
comp:text_component("Neovim Tip of the Day:", "center", "ProfileGreen"),
|
||||
comp:text_component(result or "Could not fetch tip.", "center", "ProfileGreen"),
|
||||
})
|
||||
comp:text_component_render({
|
||||
comp:text_component("Neovim Tip of the Day:", "center", "ProfileGreen"),
|
||||
comp:text_component("Loading...", "center", "ProfileGreen"),
|
||||
})
|
||||
end,
|
||||
})
|
||||
|
||||
-- Fetch tip asynchronously and update the buffer
|
||||
vim.fn.jobstart({ "curl", "-s", "-m", "3", "https://vtip.43z.one" }, {
|
||||
stdout_buffered = true,
|
||||
on_stdout = function(_, data)
|
||||
if data and data[1] and data[1] ~= "" then
|
||||
local tip = table.concat(data, "")
|
||||
vim.schedule(function()
|
||||
-- Find the profile buffer
|
||||
for _, buf in ipairs(vim.api.nvim_list_bufs()) do
|
||||
if vim.api.nvim_buf_is_loaded(buf) then
|
||||
local lines = vim.api.nvim_buf_get_lines(buf, 0, -1, false)
|
||||
for i, line in ipairs(lines) do
|
||||
if line:match("Loading%.%.%.") then
|
||||
-- Replace "Loading..." with the actual tip
|
||||
local width = vim.api.nvim_win_get_width(0)
|
||||
local padding = math.floor((width - #tip) / 2)
|
||||
local centered_tip = string.rep(" ", math.max(0, padding)) .. tip
|
||||
vim.api.nvim_buf_set_option(buf, "modifiable", true)
|
||||
vim.api.nvim_buf_set_lines(buf, i - 1, i, false, { centered_tip })
|
||||
vim.api.nvim_buf_set_option(buf, "modifiable", false)
|
||||
vim.api.nvim_buf_set_option(buf, "modified", false)
|
||||
return
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
end)
|
||||
end
|
||||
end,
|
||||
})
|
||||
|
||||
vim.api.nvim_set_keymap("n", "<leader>p", "<cmd>Profile<cr>", { silent = true })
|
||||
end,
|
||||
},
|
||||
|
||||
@@ -1,10 +1,19 @@
|
||||
return {
|
||||
"danielfalk/smart-open.nvim",
|
||||
branch = "0.2.x",
|
||||
config = function()
|
||||
require("telescope").load_extension("smart_open")
|
||||
end,
|
||||
lazy = true,
|
||||
keys = {
|
||||
{
|
||||
"<leader>ff",
|
||||
function()
|
||||
require("telescope").load_extension("smart_open")
|
||||
require("telescope").extensions.smart_open.smart_open()
|
||||
end,
|
||||
desc = "Smart Open",
|
||||
},
|
||||
},
|
||||
dependencies = {
|
||||
"kkharji/sqlite.lua",
|
||||
"nvim-telescope/telescope.nvim",
|
||||
},
|
||||
}
|
||||
|
||||
@@ -19,18 +19,48 @@ local new_maker = function(filepath, bufnr, opts)
|
||||
previewers.buffer_previewer_maker(filepath, bufnr, opts)
|
||||
end
|
||||
|
||||
local function grepInFiles()
|
||||
local builtin = require("telescope.builtin")
|
||||
local actions = require("telescope.actions")
|
||||
local action_state = require("telescope.actions.state")
|
||||
builtin.filetypes({
|
||||
attach_mappings = function(prompt_bufnr, _)
|
||||
actions.select_default:replace(function()
|
||||
actions.close(prompt_bufnr)
|
||||
local selection = action_state.get_selected_entry()
|
||||
local filetype = selection.value
|
||||
|
||||
builtin.live_grep({
|
||||
additional_args = function()
|
||||
return { "--glob", "*." .. filetype }
|
||||
end,
|
||||
})
|
||||
end)
|
||||
return true
|
||||
end,
|
||||
})
|
||||
end
|
||||
|
||||
return {
|
||||
"nvim-telescope/telescope.nvim",
|
||||
event = "VeryLazy",
|
||||
cmd = "Telescope",
|
||||
tag = "0.1.8",
|
||||
dependencies = { "nvim-lua/plenary.nvim" },
|
||||
init = function()
|
||||
local builtin = require("telescope.builtin")
|
||||
keys = {
|
||||
{ "<leader>ft", grepInFiles, desc = "Live grep by filetype" },
|
||||
{ "<leader>*", function() require("telescope.builtin").grep_string() end, desc = "Grep current string" },
|
||||
{ "<leader>fs", function() require("telescope.builtin").find_files() end, desc = "Find files" },
|
||||
{ "<leader>fg", function() require("telescope.builtin").git_branches() end, desc = "Find Git branches" },
|
||||
{ "<leader>fc", function() require("telescope.builtin").git_commits() end, desc = "Find Commits" },
|
||||
{ "<leader>fw", function() require("telescope.builtin").live_grep() end, desc = "Find Words" },
|
||||
},
|
||||
config = function()
|
||||
local telescope = require("telescope")
|
||||
|
||||
telescope.setup({
|
||||
extensions = {
|
||||
smart_open = {
|
||||
cwd_only = true,
|
||||
mappings = {
|
||||
i = {
|
||||
-- works around smart_open overriding ctrl-w keybind for deleting
|
||||
@@ -81,38 +111,5 @@ return {
|
||||
filesize_limit = 0.5, -- MB
|
||||
},
|
||||
})
|
||||
|
||||
local function grepInFiles()
|
||||
local actions = require("telescope.actions")
|
||||
local action_state = require("telescope.actions.state")
|
||||
builtin.filetypes({
|
||||
attach_mappings = function(prompt_bufnr, _)
|
||||
actions.select_default:replace(function()
|
||||
actions.close(prompt_bufnr)
|
||||
local selection = action_state.get_selected_entry()
|
||||
local filetype = selection.value
|
||||
|
||||
builtin.live_grep({
|
||||
additional_args = function()
|
||||
return { "--glob", "*." .. filetype }
|
||||
end,
|
||||
})
|
||||
end)
|
||||
return true
|
||||
end,
|
||||
})
|
||||
end
|
||||
|
||||
local function smart_open()
|
||||
require("telescope").extensions.smart_open.smart_open()
|
||||
end
|
||||
|
||||
vim.keymap.set("n", "<leader>ft", grepInFiles, { desc = "Live grep by filetype" })
|
||||
vim.keymap.set("n", "<leader>*", builtin.grep_string, { desc = "Grep current string" })
|
||||
vim.keymap.set("n", "<leader>fs", builtin.find_files, { desc = "Find files" })
|
||||
vim.keymap.set("n", "<leader>fg", builtin.git_branches, { desc = "Find Git branches" })
|
||||
vim.keymap.set("n", "<leader>fc", builtin.git_commits, { desc = "Find Commits" })
|
||||
vim.keymap.set("n", "<leader>fw", builtin.live_grep, { desc = "Find Words" })
|
||||
vim.keymap.set("n", "<leader>ff", smart_open, { desc = "Smart Open" })
|
||||
end,
|
||||
}
|
||||
|
||||
@@ -1,7 +1,5 @@
|
||||
# Fig pre block. Keep at the top of this file.
|
||||
[[ -f "$HOME/.fig/shell/zshrc.pre.zsh" ]] && builtin source "$HOME/.fig/shell/zshrc.pre.zsh"
|
||||
# Theme
|
||||
fpath+=("$(brew --prefix)/share/zsh/site-functions")
|
||||
fpath+=("/opt/homebrew/share/zsh/site-functions")
|
||||
fpath+=$HOME/.zsh/pure
|
||||
|
||||
autoload -U promptinit; promptinit
|
||||
@@ -12,21 +10,26 @@ prompt pure
|
||||
|
||||
# If you come from bash you might have to change your $PATH.
|
||||
export PATH=$HOME/bin:/usr/local/bin:/opt/homebrew/bin:$PATH
|
||||
export PATH=$(go env GOPATH)/bin:$PATH
|
||||
export PATH="$HOME/go/bin:$PATH"
|
||||
export PATH=/User/oliverhnat/.local/bin/claude:$PATH
|
||||
export EDITOR="/opt/homebrew/bin/nvim"
|
||||
|
||||
|
||||
|
||||
# Path to your oh-my-zsh installation.
|
||||
export ZSH="$HOME/.oh-my-zsh"
|
||||
|
||||
# Skip compaudit (saves ~150ms on cold start)
|
||||
ZSH_DISABLE_COMPFIX=true
|
||||
|
||||
export LC_ALL="en_US.UTF-8"
|
||||
export LC_CTYPE="en_US.UTF-8"
|
||||
export HOMEBREW_NO_AUTO_UPDATE=1
|
||||
export GITLAB_URL=https://gitlab.elnino.tech
|
||||
|
||||
export ANTHROPIC_API_KEY=
|
||||
export GEMINI_API_KEY=
|
||||
export HOMEBREW_NO_AUTO_UPDATE=1
|
||||
export GITLAB_TOKEN=
|
||||
export GITLAB_URL=
|
||||
export TAVILY_API_KEY=
|
||||
|
||||
# Set name of the theme to load --- if set to "random", it will
|
||||
@@ -97,10 +100,11 @@ ZSH_THEME=""
|
||||
# Add wisely, as too many plugins slow down shell startup.
|
||||
|
||||
plugins=(
|
||||
tmuxinator
|
||||
git
|
||||
yarn
|
||||
docker
|
||||
docker-compose
|
||||
# docker
|
||||
# docker-compose
|
||||
zsh-autosuggestions
|
||||
zsh-z
|
||||
zsh-syntax-highlighting # Needs to be the last plugin
|
||||
@@ -135,18 +139,15 @@ source $ZSH/oh-my-zsh.sh
|
||||
# Change colors of the LS command output
|
||||
# export LSCOLORS=Dxfxcxdxbxegedabagacad
|
||||
|
||||
source /Users/oliverhnat/.docker/init-zsh.sh || true # Added by Docker Desktop
|
||||
|
||||
|
||||
# User configuration
|
||||
source ~/.oh-my-zsh/custom/custom_commands.sh
|
||||
source ~/.config/omz-custom/custom_commands.sh
|
||||
source ~/.config/omz-custom/tmux-sessions.sh
|
||||
|
||||
|
||||
[ -f "/Users/oliverhnat/.ghcup/env" ] && . "/Users/oliverhnat/.ghcup/env" # ghcup-env
|
||||
|
||||
. "$HOME/.local/bin/env"
|
||||
|
||||
export NVM_DIR="$HOME/.nvm"
|
||||
[ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh" # This loads nvm
|
||||
[ -s "$NVM_DIR/bash_completion" ] && \. "$NVM_DIR/bash_completion" # This loads nvm bash_completion
|
||||
source ~/.config/omz-custom/nvm.sh
|
||||
export PATH="$HOME/.local/bin:$PATH"
|
||||
|
||||
@@ -103,10 +103,16 @@ function _tat_autocomplete() {
|
||||
'files:files:_files'
|
||||
}
|
||||
|
||||
function _rut() {
|
||||
# Complete with files, preferring tests/ directory
|
||||
_files -g '*.php'
|
||||
}
|
||||
|
||||
# Register the completion function for zsh
|
||||
if [[ -n ${ZSH_VERSION-} ]]; then
|
||||
compdef _tat_autocomplete tat
|
||||
compdef _cmr cmr
|
||||
compdef _rut rut
|
||||
else
|
||||
# Fallback for bash
|
||||
complete -f -F _tat_autocomplete -o default tat
|
||||
|
||||
@@ -86,6 +86,10 @@ function rutvrm () {
|
||||
docker-compose exec -T mysql mysql --host=mysql --password=deadbeef --database=vrm_testing < tests/resources/db/*.sql
|
||||
}
|
||||
|
||||
function rut() {
|
||||
rutvrm && docker compose exec app composer test "$@"
|
||||
}
|
||||
|
||||
alias yas="yarn serve"
|
||||
|
||||
alias yai="yarn install"
|
||||
@@ -162,6 +166,16 @@ function dbar() {
|
||||
}
|
||||
|
||||
|
||||
function gcmr() {
|
||||
if [[ "$*" == "--draft" ]]
|
||||
then
|
||||
draft="--draft"
|
||||
else
|
||||
draft=""
|
||||
fi
|
||||
gh pr create -a "@me" --fill $draft
|
||||
}
|
||||
|
||||
function cmr() {
|
||||
if [[ "$*" == "--draft" ]]
|
||||
then
|
||||
@@ -275,6 +289,7 @@ alias gl="glab"
|
||||
alias glci="glab ci view"
|
||||
alias glciw="glab ci view --web"
|
||||
alias glmr="glab mr view --web"
|
||||
alias mr=glmr
|
||||
|
||||
# get snippets from elnino gitlab
|
||||
function gitlab_snippets() {
|
||||
|
||||
10
omz-custom/nvm.sh
Normal file
10
omz-custom/nvm.sh
Normal file
@@ -0,0 +1,10 @@
|
||||
# NVM lazy loading (speeds up shell startup significantly)
|
||||
export NVM_DIR="$HOME/.nvm"
|
||||
nvm() {
|
||||
unset -f nvm node npm npx
|
||||
[ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh"
|
||||
nvm "$@"
|
||||
}
|
||||
node() { nvm; unset -f node; node "$@"; }
|
||||
npm() { nvm; unset -f npm; npm "$@"; }
|
||||
npx() { nvm; unset -f npx; npx "$@"; }
|
||||
@@ -4,6 +4,17 @@ function tat() {
|
||||
ALL_PROJECTS=$(tls)
|
||||
IS_VALID_PROJECT=$(echo $ALL_PROJECTS | grep -io "[[:<:]]$SAFE_INPUT\w*" | head -1)
|
||||
if [[ $IS_VALID_PROJECT != "" ]]; then
|
||||
if [[ "$IS_VALID_PROJECT" == "vrm-deploy" ]] && tmux has-session -t vrm-deploy 2>/dev/null; then
|
||||
current_session=$(tmux display-message -p '#S' 2>/dev/null)
|
||||
if [[ "$current_session" == "vrm-deploy" ]]; then
|
||||
tmux rename-session -t vrm-deploy vrm-deploy-old
|
||||
tmuxinator start vrm-deploy
|
||||
tmux kill-session -t vrm-deploy-old 2>/dev/null
|
||||
return 0
|
||||
else
|
||||
tmux kill-session -t vrm-deploy 2>/dev/null
|
||||
fi
|
||||
fi
|
||||
tmuxinator start "$IS_VALID_PROJECT"
|
||||
return 1
|
||||
fi
|
||||
|
||||
@@ -37,6 +37,18 @@ choice="$(printf '%s\n' "$sel" | sed -n '3p')"
|
||||
project="${choice:-$query}"
|
||||
[ -n "$project" ] || exit 0
|
||||
|
||||
if [ "$project" = "vrm-deploy" ] && tmux has-session -t vrm-deploy 2>/dev/null; then
|
||||
current_session=$(tmux display-message -p '#S' 2>/dev/null)
|
||||
if [ "$current_session" = "vrm-deploy" ]; then
|
||||
tmux rename-session -t vrm-deploy vrm-deploy-old
|
||||
tmuxinator start vrm-deploy
|
||||
tmux kill-session -t vrm-deploy-old 2>/dev/null
|
||||
exit 0
|
||||
else
|
||||
tmux kill-session -t vrm-deploy 2>/dev/null
|
||||
fi
|
||||
fi
|
||||
|
||||
tmuxinator start "$project"
|
||||
exit 0
|
||||
|
||||
|
||||
@@ -67,7 +67,6 @@ set -g @plugin 'omerxx/tmux-sessionx'
|
||||
set -g @plugin 'christoomey/vim-tmux-navigator'
|
||||
|
||||
bind-key s display-popup -w 30% -h 30% -E "~/.config/tmux/bin/fuzzy-switch.sh"
|
||||
bind-key f display-popup -w 30% -h 30% -E "~/.config/tmux/bin/fuzzy-switch.sh"
|
||||
|
||||
# Initialise tmux plugin manager (needs to be at the bottom of the file)
|
||||
run '~/.config/tmux/plugins/tpm/tpm'
|
||||
|
||||
Reference in New Issue
Block a user