Compare commits

...

9 Commits

10 changed files with 106 additions and 34 deletions

View File

@ -11,13 +11,57 @@ types=(
selected=$(printf '%s\n' "${types[@]}" | fzf --prompt="Select branch type: ") || exit 1
type=${selected%% *}
echo "Fetching Jira tickets..."
jira_data=$(jira issue list --assignee=hektor.misplon@rightcrowd.com --order-by=priority --plain --no-headers 2>/dev/null)
if [[ $? -ne 0 || -z "$jira_data" ]]; then
echo "Warning: Could not fetch Jira tickets or no tickets found."
echo "Proceeding without ticket ID..."
ticket_id=""
else
# Create formatted list for fzf: "TICKET-123 - Issue description"
formatted_tickets=$(echo "$jira_data" | awk '{
ticket_id = $2
$1 = $2 = ""
description = $0
gsub(/^[ \t]+/, "", description)
if (length(description) > 60) {
description = substr(description, 1, 57) "..."
}
print ticket_id " - " description
}')
if [[ -z "$formatted_tickets" ]]; then
echo "No tickets found. Proceeding without ticket ID..."
ticket_id=""
else
# Let user select a ticket or skip
echo ""
selected_ticket=$(echo -e "SKIP - Create branch without ticket ID\n$formatted_tickets" | \
fzf --prompt="Select Jira ticket (or skip): " --height=40%) || exit 1
if [[ "$selected_ticket" == "SKIP"* ]]; then
ticket_id=""
else
ticket_id=${selected_ticket%% -*}
fi
fi
fi
editor="${EDITOR:-vi}"
tmpfile=$(mktemp)
cat > "$tmpfile" << 'EOF'
# Enter your branch description below in kebab case (e.g. `my-description`):
if [[ -n "$ticket_id" ]]; then
cat > "$tmpfile" << EOF
# Selected ticket: $ticket_id
# Enter your branch description below in kebab case (e.g. \`my-description\`):
# The ticket ID will be automatically included in the branch name.
EOF
else
cat > "$tmpfile" << 'EOF'
# Enter your branch description below in kebab case (e.g. `my-description`):
EOF
fi
"$editor" "$tmpfile"
@ -36,6 +80,11 @@ if [[ ! "$desc" =~ ^[a-z0-9]+(-[a-z0-9]+)*$ ]]; then
exit 1
fi
branch="$type/$desc"
if [[ -n "$ticket_id" ]]; then
branch="$type/$ticket_id-$desc"
else
branch="$type/$desc"
fi
echo "Creating branch: $branch"
git checkout -b "$branch"

View File

@ -44,6 +44,7 @@ parallel
pass
pkgbuild-language-server
pnpm
ripgrep
sshfs
stylelint
svelte-language-server

View File

@ -1,5 +0,0 @@
#!/usr/bin/env bash
# Get local IP
ip addr show $@ | awk '/inet / {gsub(/\/.*/,"",$2); print $2}' | tail -n 1

View File

@ -9,20 +9,20 @@ require("conform").setup({
bash = { "shellcheck" },
c = { "clang-format" },
cpp = { "clang-format" },
css = { "prettierd", "prettier" },
css = { "prettierd", "prettier", stop_after_first = true },
gdscript = { "gdformat" },
haskell = { "ormolu" },
html = { "prettierd", "prettier" },
html = { "prettierd", "prettier", stop_after_first = true },
lua = { "stylua" }, -- configured in stylua.toml
markdown = { "prettierd", "prettier" },
javascript = { "prettierd", "prettier" },
javascriptreact = { "prettierd", "prettier" },
json = { "prettierd", "prettier" },
jsonc = { "prettierd", "prettier" },
markdown = { "prettierd", "prettier", stop_after_first = true },
javascript = { "prettierd", "prettier", stop_after_first = true },
javascriptreact = { "prettierd", "prettier", stop_after_first = true },
json = { "prettierd", "prettier", stop_after_first = true },
jsonc = { "prettierd", "prettier", stop_after_first = true },
python = { "isort", "black" },
svelte = { "prettierd", "prettier" },
typescript = { "prettierd", "prettier" },
typescriptreact = { "prettierd", "prettier" },
yaml = { "prettierd", "prettier" },
svelte = { "prettierd", "prettier", stop_after_first = true },
typescript = { "prettierd", "prettier", stop_after_first = true },
typescriptreact = { "prettierd", "prettier", stop_after_first = true },
yaml = { "prettierd", "prettier", stop_after_first = true },
},
})

View File

@ -1,11 +0,0 @@
local gitblame = require("gitblame")
gitblame.setup({
enabled = false,
date_format = "%r",
message_template = " [<date> (<author>) <sha> <summary>]",
message_when_not_committed = " [Uncommitted changes]",
delay = 250,
})
-- vim.g.gitblame_virtual_text_column = 80

View File

@ -0,0 +1,8 @@
local gitsigns = require("gitsigns")
gitsigns.setup({
current_line_blame_opts = { delay = 0 },
current_line_blame_formatter = "<author>, <author_time:%R> - <summary>",
})
vim.api.nvim_create_user_command("Blame", gitsigns.toggle_current_line_blame, { nargs = "?" })

View File

@ -10,9 +10,20 @@ local capabilities = cmp_nvim_lsp.default_capabilities()
local servers = {
bashls = {},
eslint = {},
eslint = {
settings = {
--Assuming prettier/prettierd will handle formatting, we don't need to see these errors
rulesCustomizations = {
{ rule = "prettier/prettier", severity = "off" },
},
format = false,
},
},
emmet_language_server = {},
gdscript = {},
helm_ls = {
filetypes = { "yaml", "helm", "yaml.helm-values" },
},
hls = { filetypes = { "haskell", "lhaskell", "cabal" } },
html = {},
jsonls = {

View File

@ -63,7 +63,7 @@ bootstrap_paq({
{ "JoosepAlviste/nvim-ts-context-commentstring" }, -- commentstring based on cursor position (e.g. for Svelte)
{ "Wansmer/treesj" },
{ "michaelb/sniprun", build = "sh install.sh" },
{ "f-person/git-blame.nvim" },
{ "lewis6991/gitsigns.nvim" },
{ "brenoprata10/nvim-highlight-colors" },
{ "razak17/tailwind-fold.nvim" },
{ "rmagatti/auto-session" },
@ -74,6 +74,7 @@ bootstrap_paq({
{ 'olimorris/codecompanion.nvim' },
{ "ravitemer/mcphub.nvim", build = "pnpm install -g mcp-hub@latest" },
{ "zbirenbaum/copilot.lua" },
{ "zbirenbaum/copilot-cmp" }
{ "zbirenbaum/copilot-cmp" },
{ "qvalentin/helm-ls.nvim", ft = "helm" },
})
-- }}}

View File

@ -0,0 +1,15 @@
local ls = require("luasnip")
local s = ls.snippet
local t = ls.text_node
local i = ls.insert_node
return {
s("host", {
t("Host "),
i(1, "alias"),
t({ "", "\tHostName " }),
i(2, "name"),
t({ "", "\tUser " }),
i(3, "user"),
}),
}

View File

@ -0,0 +1,3 @@
sync.server.url=
sync.server.client_id=
sync.encryption_secret=