Compare commits

...

13 Commits

20 changed files with 218 additions and 119 deletions

View File

@@ -1 +1 @@
{"copilot.lua":"1.393.0"}
{"copilot.lua":"1.417.0"}

View File

@@ -2,6 +2,7 @@ require("olinpin.set")
require("olinpin.lazy")
require("olinpin.remap")
require("olinpin.commands")
require("olinpin.lsp-config")
-- this needs to be set after lazy
vim.o.timeoutlen = 0

View File

@@ -0,0 +1,27 @@
-- LSP error filtering and configuration
-- Filter out noise from LSP logs
local original_handler = vim.lsp.handlers["window/logMessage"]
vim.lsp.handlers["window/logMessage"] = function(err, result, ctx, config)
-- Suppress harper-ls didSave warnings (harmless)
if result and result.message and result.message:match("didSave.*not implemented") then
return
end
-- Call original handler for other messages
if original_handler then
return original_handler(err, result, ctx, config)
end
end
-- Filter publish_diagnostics to exclude minio temp file errors
local original_diagnostics = vim.lsp.handlers["textDocument/publishDiagnostics"]
vim.lsp.handlers["textDocument/publishDiagnostics"] = function(err, result, ctx, config)
if result and result.uri then
if result.uri:match("minio%-data") or result.uri:match("%.minio%.sys") then
return
end
end
if original_diagnostics then
return original_diagnostics(err, result, ctx, config)
end
end

View File

@@ -2,16 +2,24 @@ return {
"numToStr/Comment.nvim",
keys = {
{ "<leader>/", desc = "Toggle comment" },
{ "<leader>/", mode = "v", desc = "Toggle comment" },
},
config = function ()
config = function()
require('Comment').setup({
opleader = {
-- Line-comment toggle keymap
line = '<leader>/'
},
toggler = {
line = "<leader>/"
}
})
-- Set commentstring for SQL
vim.api.nvim_create_autocmd("FileType", {
pattern = { "sql", "mysql", "plsql" },
callback = function()
vim.bo.commentstring = "-- %s"
end,
})
end
}

View File

@@ -52,7 +52,15 @@ return {
{ name = "path" },
}),
})
-- SQL completion with vim-dadbod
cmp.setup.filetype({ "sql", "mysql", "plsql" }, {
sources = cmp.config.sources({
{ name = "vim-dadbod-completion" },
}, {
{ name = "buffer" },
}),
})
end,
},
}

View File

@@ -3,6 +3,7 @@ return {
dependencies = {
{ 'tpope/vim-dadbod', lazy = true },
{ 'kristijanhusak/vim-dadbod-completion', ft = { 'sql', 'mysql' }, lazy = true },
{ 'pbogut/vim-dadbod-ssh' },
},
cmd = {
'DBUI',
@@ -11,7 +12,12 @@ return {
'DBUIFindBuffer',
},
init = function()
-- Your DBUI configuration
vim.g.db_ui_use_nerd_fonts = 1
-- Configure SSH port range to avoid Redis ports (7001-7003, 8001-8003, 9001-9002)
vim.g.db_adapter_ssh_port_range = vim.fn.extend(
vim.fn.range(7010, 7099),
vim.fn.range(8010, 8099)
)
end
}

View File

@@ -3,6 +3,7 @@ return {
keys = {
{ "<leader>dd", function() require("duck").hatch() end, desc = "Duck hatch" },
{ "<leader>dc", function() require("duck").hatch("🐿️", 20) end, desc = "Duck squirrel" },
{ "<leader>db", function() require("duck").hatch("🦋", 20) end, desc = "Duck squirrel" },
{ "<leader>dk", function() require("duck").cook() end, desc = "Duck cook" },
},
}

View File

@@ -122,6 +122,12 @@ return {
init = function()
-- Do not crowd home directory with NPM cache folder
vim.env.npm_config_cache = vim.env.HOME .. "/.cache/npm"
-- Ensure nvm node is in PATH for LSP servers
local nvm_node = vim.env.HOME .. "/.nvm/versions/node/v22.14.0/bin"
if vim.fn.isdirectory(nvm_node) == 1 and not vim.env.PATH:find(nvm_node, 1, true) then
vim.env.PATH = nvm_node .. ":" .. vim.env.PATH
end
end,
opts = {
ui = {
@@ -202,6 +208,23 @@ return {
},
},
},
workspace_folders = {
{
name = "root",
uri = vim.uri_from_fname(vim.fn.getcwd()),
},
},
on_new_config = function(config, root_dir)
config.settings = config.settings or {}
config.settings.typescript = config.settings.typescript or {}
config.settings.typescript.tsserver = config.settings.typescript.tsserver or {}
config.settings.typescript.tsserver.watchOptions = {
excludeDirectories = {
"**/node_modules",
"**/.git",
},
}
end,
})
vim.lsp.enable("ts_ls")
@@ -219,6 +242,14 @@ return {
format = {
enable = true,
},
files = {
exclude = {
"**/.git/**",
"**/node_modules/**",
"**/vendor/**/{Tests,tests}/**",
"**/.history/**",
},
},
},
},
})

View File

@@ -1,17 +0,0 @@
return {
"ravitemer/mcphub.nvim",
event = "VeryLazy",
dependencies = {
"nvim-lua/plenary.nvim",
},
build = "npm install -g mcp-hub@latest", -- Installs `mcp-hub` node binary globally
config = function()
require("mcphub").setup({
extensions = {
avante = {
make_slash_commands = true,
},
},
})
end,
}

View File

@@ -1,6 +1,12 @@
return {
"rcarriga/nvim-notify",
event = "VeryLazy",
opts = {
on_open = function(win)
local buf = vim.api.nvim_win_get_buf(win)
vim.api.nvim_buf_set_option(buf, "filetype", "")
end,
},
config = function(_, opts)
require("notify").setup(opts)
vim.notify = require("notify")

View File

@@ -13,7 +13,12 @@ return {
},
},
dependencies = {
"kkharji/sqlite.lua",
{
"kkharji/sqlite.lua",
config = function()
vim.g.sqlite_clib_path = "/opt/homebrew/opt/sqlite/lib/libsqlite3.dylib"
end,
},
"nvim-telescope/telescope.nvim",
},
}

View File

@@ -44,8 +44,10 @@ end
return {
"nvim-telescope/telescope.nvim",
cmd = "Telescope",
tag = "0.1.8",
dependencies = { "nvim-lua/plenary.nvim" },
dependencies = {
"nvim-lua/plenary.nvim",
"nvim-tree/nvim-web-devicons",
},
keys = {
{ "<leader>ft", grepInFiles, desc = "Live grep by filetype" },
{ "<leader>*", function() require("telescope.builtin").grep_string() end, desc = "Grep current string" },

View File

@@ -1,51 +1,29 @@
return {
'nvim-treesitter/nvim-treesitter',
event = "VeryLazy",
cmd = 'TSUpdate',
lazy = false,
build = ':TSUpdate',
config = function()
require'nvim-treesitter.configs'.setup {
-- A list of parser names, or "all" (the five listed parsers should always be installed)
ensure_installed = {
"vimdoc",
"bash",
"css",
"javascript",
"python",
"c",
"lua",
"vim",
"vimdoc",
"query",
"go",
"markdown",
"markdown_inline",
"regex",
"swift",
"php",
"kotlin",
"rust",
"haskell",
"html"
},
local ensure_installed = {
"lua", "vim", "vimdoc", "javascript", "typescript", "tsx",
"html", "css", "json", "yaml", "markdown", "bash", "python",
"php", "vue", "dockerfile", "go", "rust",
}
-- Install parsers synchronously (only applied to `ensure_installed`)
sync_install = false,
-- Automatically install missing parsers when entering buffer
-- Recommendation: set to false if you don't have `tree-sitter` CLI installed locally
auto_install = true,
highlight = {
enable = true,
-- Setting this to true will run `:h syntax` and tree-sitter at the same time.
-- Set this to `true` if you depend on 'syntax' being enabled (like for indentation).
-- Using this option may slow down your editor, and you may see some duplicate highlights.
-- Instead of true it can also be a list of languages
additional_vim_regex_highlighting = {"markdown"}
},
}
end
-- Auto-install missing parsers
vim.defer_fn(function()
for _, lang in ipairs(ensure_installed) do
local ok = pcall(vim.treesitter.language.inspect, lang)
if not ok then
vim.cmd("TSInstall " .. lang)
end
end
end, 100)
-- Start treesitter highlighting for all buffers with a parser
vim.api.nvim_create_autocmd("FileType", {
callback = function(args)
pcall(vim.treesitter.start, args.buf)
end,
})
end,
}

View File

@@ -177,39 +177,50 @@ function gcmr() {
}
function cmr() {
if [[ "$*" == "--draft" ]]
then
draft="--draft"
else
draft=""
fi
local draft=""
local target_branch=""
local reviewer=""
reviewers=""
if [[ $1 =~ .*",".* ]]; then
reviewers="--reviewer=$1";
fi;
while [[ $# -gt 0 ]]; do
case "$1" in
--draft)
draft="--draft"
;;
--target-branch=*)
target_branch="${1#--target-branch=}"
;;
--target-branch)
target_branch="$2"
shift
;;
*)
reviewer="$1"
;;
esac
shift
done
current_branch=$(git branch --show-current)
if [[ $current_branch == "master" ]] || [[ $current_branch == "beta" ]] || [[ $current_branch == "acceptance" ]] || [[ $current_branch == "main" ]] || [[ $current_branch == "release" ]] ;
then echo "Checkout a feature branch" && return;
fi;
# Check if 'main' branch exists in the remote repository
current_project=$(basename $(pwd))
if [[ ! -z $2 ]]; then
target_branch=$2
elif [[ $current_project =~ "vrm-(front|api)" ]]; then
target_branch="release"
else
target_branch="master"
if [[ $current_branch == "master" ]] || [[ $current_branch == "beta" ]] || [[ $current_branch == "acceptance" ]] || [[ $current_branch == "main" ]] || [[ $current_branch == "release" ]]; then
echo "Checkout a feature branch" && return
fi
if [[ $1 == "--target-branch" ]]; then
target_branch=$2
fi;
if [[ -z "$target_branch" ]]; then
current_project=$(basename $(pwd))
local pattern="vrm-(front|api)"
if [[ $current_project =~ $pattern ]]; then
target_branch="release"
else
target_branch="master"
fi
fi
glab mr create -a oliver $reviewers --target-branch=$target_branch -t "Merge branch: '$(git branch --show-current)' into $target_branch" --fill -y $draft
local reviewers_arg=""
if [[ -n "$reviewer" ]]; then
reviewers_arg="--reviewer=$reviewer"
fi
glab mr create -a oliver $reviewers_arg --target-branch=$target_branch -t "Merge branch: '$(git branch --show-current)' into $target_branch" --fill -y $draft
}
function glisu() {

View File

@@ -1,10 +1,12 @@
# NVM lazy loading (speeds up shell startup significantly)
# NVM setup
export NVM_DIR="$HOME/.nvm"
# Add default node to PATH (for child processes and immediate use)
export PATH="$NVM_DIR/versions/node/v22.14.0/bin:$PATH"
# Lazy load nvm command only (node/npm/npx work directly from PATH)
nvm() {
unset -f nvm node npm npx
unset -f nvm
[ -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 "$@"; }

View File

@@ -9,7 +9,7 @@ die() {
exit 1
}
list_projects() {
list_tmuxinator_projects() {
tmuxinator list 2>/dev/null \
| sed '1{/tmuxinator projects:/d;}' \
| tr -s '[:space:]' '\n' \
@@ -17,9 +17,21 @@ list_projects() {
|| true
}
list_developer_dirs() {
find ~/Developer -mindepth 1 -maxdepth 1 -type d -exec basename {} \; 2>/dev/null \
|| true
}
list_projects() {
{
list_tmuxinator_projects
list_developer_dirs
}
}
# unique + sorted
items="$(list_projects | sort -u)"
[ -n "$items" ] || die "No tmuxinator projects found."
[ -n "$items" ] || die "No projects found."
sel="$(
printf '%s\n' "$items" | fzf \
@@ -37,18 +49,37 @@ 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
# Check if it's a tmuxinator project
tmuxinator_projects="$(list_tmuxinator_projects)"
is_tmuxinator=false
if echo "$tmuxinator_projects" | grep -qxF "$project"; then
is_tmuxinator=true
fi
# Check if it's a ~/Developer directory
developer_dir="$HOME/Developer/$project"
is_developer_dir=false
if [ -d "$developer_dir" ]; then
is_developer_dir=true
fi
if [ "$is_tmuxinator" = true ]; then
tmuxinator start "$project"
elif [ "$is_developer_dir" = true ]; then
# Handle ~/Developer directory - create tmuxinator config if needed
session_name="$project"
tmuxinator_config="$HOME/.config/tmuxinator/${session_name}.yml"
if [ ! -f "$tmuxinator_config" ]; then
cp ~/.config/tmuxinator/template.yml.temp "$tmuxinator_config"
sed -i '' "s|{{\$PROJECT_NAME}}|$session_name|g" "$tmuxinator_config"
sed -i '' "s|{{\$PROJECT_ROOT}}|$developer_dir|g" "$tmuxinator_config"
fi
tmuxinator start "$session_name"
else
die "Project '$project' not found in tmuxinator or ~/Developer"
fi
tmuxinator start "$project"
exit 0

Submodule tmux/plugins/tmux-fzf deleted from 1547f18083

Submodule tmux/plugins/tmux-sessionx updated: c2eb0e19bf...fe704934f8

Submodule tmux/plugins/tmux-which-key updated: 545831eb95...1f419775ca

Submodule tmux/plugins/vim-tmux-navigator updated: 791dacfcfc...e41c431a0c