Compare commits
2 commits
24fa4d22a0
...
bde737b037
| Author | SHA1 | Date | |
|---|---|---|---|
| bde737b037 | |||
| 53dfef6c9e |
8 changed files with 51 additions and 3 deletions
1
stowers/nvim/dot-config/nvim/after/plugin/lualine.lua
Normal file
1
stowers/nvim/dot-config/nvim/after/plugin/lualine.lua
Normal file
|
|
@ -0,0 +1 @@
|
||||||
|
require("lualine").setup {}
|
||||||
|
|
@ -1,6 +1,6 @@
|
||||||
require'nvim-treesitter.configs'.setup {
|
require'nvim-treesitter.configs'.setup {
|
||||||
-- A list of parser names, or "all"
|
-- A list of parser names, or "all"
|
||||||
ensure_installed = {},
|
ensure_installed = { "jsonc" },
|
||||||
|
|
||||||
-- Install parsers synchronously (only applied to `ensure_installed`)
|
-- Install parsers synchronously (only applied to `ensure_installed`)
|
||||||
sync_install = false,
|
sync_install = false,
|
||||||
|
|
|
||||||
|
|
@ -36,6 +36,10 @@ return require("packer").startup(function(use)
|
||||||
"rose-pine/neovim", tag = "v3.0.1",
|
"rose-pine/neovim", tag = "v3.0.1",
|
||||||
}
|
}
|
||||||
|
|
||||||
|
use {
|
||||||
|
"nvim-lualine/lualine.nvim", branch = "master",
|
||||||
|
}
|
||||||
|
|
||||||
-- TreeSitter
|
-- TreeSitter
|
||||||
use {
|
use {
|
||||||
"nvim-treesitter/nvim-treesitter", tag = "v0.9.2",
|
"nvim-treesitter/nvim-treesitter", tag = "v0.9.2",
|
||||||
|
|
@ -85,7 +89,7 @@ return require("packer").startup(function(use)
|
||||||
requires = { { "nvim-lua/plenary.nvim" } }
|
requires = { { "nvim-lua/plenary.nvim" } }
|
||||||
}
|
}
|
||||||
|
|
||||||
-- Git BLAME
|
-- Git stuff
|
||||||
use {
|
use {
|
||||||
"APZelos/blamer.nvim", tag = "v1.3.0",
|
"APZelos/blamer.nvim", tag = "v1.3.0",
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -3,7 +3,7 @@ vim.opt.nu = true
|
||||||
vim.opt.relativenumber = true
|
vim.opt.relativenumber = true
|
||||||
vim.opt.ruler = true
|
vim.opt.ruler = true
|
||||||
vim.opt.wrap = true
|
vim.opt.wrap = true
|
||||||
vim.opt.textwidth = 79
|
vim.opt.textwidth = 0
|
||||||
vim.opt.fillchars = { eob = " " }
|
vim.opt.fillchars = { eob = " " }
|
||||||
vim.opt.showmode = true
|
vim.opt.showmode = true
|
||||||
vim.opt.showcmd = true
|
vim.opt.showcmd = true
|
||||||
|
|
|
||||||
27
stowers/shell-utils/dot-local/bin/devc-ssh
Executable file
27
stowers/shell-utils/dot-local/bin/devc-ssh
Executable file
|
|
@ -0,0 +1,27 @@
|
||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
CONTAINER="docker"
|
||||||
|
if ! command -v docker &>/dev/null; then
|
||||||
|
CONTAINER="podman"
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [[ "$#" -lt 1 ]]; then
|
||||||
|
echo "Usage: $0 <container id>" >&2
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
|
container_id="$1"; shift
|
||||||
|
|
||||||
|
# We expect a devcontainer to run an SSH server on 2222/tcp
|
||||||
|
# and to have this port exposed. We find the host binding
|
||||||
|
# to SSH to that container.
|
||||||
|
|
||||||
|
if ! ssh_port="$(${CONTAINER} inspect --format '{{ (index (index .NetworkSettings.Ports "2222/tcp") 0).HostPort }}' "${container_id}" 2>/dev/null)"; then
|
||||||
|
echo "[!] Could not get SSH host port for container '${container_id}'" >&2
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
|
ssh -o UserKnownHostsFile=/dev/null \
|
||||||
|
-o StrictHostKeyChecking=false \
|
||||||
|
-p "${ssh_port}" \
|
||||||
|
dev@localhost "$@"
|
||||||
9
stowers/zsh/dot-bash_completion
Normal file
9
stowers/zsh/dot-bash_completion
Normal file
|
|
@ -0,0 +1,9 @@
|
||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
_devc_ssh() {
|
||||||
|
if [[ "${#COMP_WORDS[@]}" -eq 2 ]]; then
|
||||||
|
COMPREPLY=( $(compgen -W "$(docker ps --format '{{ .Names }}' | tr '\n' ' ')" -- "${cur}" ) )
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
|
||||||
|
complete -F _devc_ssh devc-ssh
|
||||||
|
|
@ -112,3 +112,8 @@ if [[ -d "${HOME}/.zshrc.d" ]]; then
|
||||||
source "${ext}"
|
source "${ext}"
|
||||||
done
|
done
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
# Custom command completions
|
||||||
|
if [[ -f "${HOME}/.bash_completion" ]]; then
|
||||||
|
source "${HOME}"/.bash_completion
|
||||||
|
fi
|
||||||
|
|
|
||||||
|
|
@ -8,3 +8,5 @@ function cdp() {
|
||||||
cd -- "$(_cdp_path "$@")"
|
cd -- "$(_cdp_path "$@")"
|
||||||
}
|
}
|
||||||
|
|
||||||
|
alias devcontainer-nvim="devcontainer up --mount 'type=bind,source=${HOME}/.config/nvim,target=/home/dev/.config/nvim' --workspace-folder ."
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue