feat: switch to neovim
This commit is contained in:
parent
c510c7f919
commit
17e3a6840f
@ -1,4 +0,0 @@
|
||||
{
|
||||
"name": "idea-demo",
|
||||
"image": "ubuntu:16.04"
|
||||
}
|
15
Containerfile
Normal file
15
Containerfile
Normal file
@ -0,0 +1,15 @@
|
||||
FROM docker.io/fedora:41
|
||||
|
||||
# === setup system ===
|
||||
RUN dnf -y install neovim zoxide unzip git go procps bash-completion
|
||||
|
||||
# === setup container user ===
|
||||
RUN useradd -ms /bin/bash user && usermod -aG wheel user && sed -i '/NOPASSWD/s/^#//g' /etc/sudoers
|
||||
USER user
|
||||
WORKDIR /home/user
|
||||
COPY config/user/bashrc /home/user/.bashrc
|
||||
|
||||
# === setup neovim ===
|
||||
RUN git clone --depth 1 https://github.com/AstroNvim/template ~/.config/nvim
|
||||
COPY config/nvim/lua/community.lua /home/user/.config/nvim/lua/community.lua
|
||||
COPY config/nvim/lua/polish.lua /home/user/.config/nvim/lua/polish.lua
|
5
config/nvim/lua/community.lua
Normal file
5
config/nvim/lua/community.lua
Normal file
@ -0,0 +1,5 @@
|
||||
---@type LazySpec
|
||||
return {
|
||||
"AstroNvim/astrocommunity",
|
||||
{ import = "astrocommunity.completion.copilot-lua-cmp" },
|
||||
}
|
2
config/nvim/lua/polish.lua
Normal file
2
config/nvim/lua/polish.lua
Normal file
@ -0,0 +1,2 @@
|
||||
vim.opt.relativenumber = false
|
||||
vim.opt.textwidth = 60
|
18
config/user/bashrc
Normal file
18
config/user/bashrc
Normal file
@ -0,0 +1,18 @@
|
||||
. /etc/bashrc
|
||||
|
||||
# === environment ===
|
||||
export EDITOR=nvim \
|
||||
WAYLAND_DISPLAY=wayland-0 \
|
||||
XDG_RUNTIME_DIR=/run/user/1000 \
|
||||
SSH_AUTH_SOCK=/run/user/1000/ssh-auth-sock
|
||||
|
||||
if [ -n "$MYVIMRC" ]; then
|
||||
PS1='\[\e[90;42m\] container | \w \[\e[40;32m\]\[\e[m\] '
|
||||
else
|
||||
PS1='\[\e[97;42m\] container | \w \[\e[49;32m\]\[\e[m\] '
|
||||
fi
|
||||
|
||||
# === aliases and functions ===
|
||||
alias vi=nvim
|
||||
post() { curl -sF "content=<-" "https://paste.plabble.org/$2?lang=$1" && echo; }
|
||||
eval "$(zoxide init --cmd cd bash)"
|
11
container.sh
Executable file
11
container.sh
Executable file
@ -0,0 +1,11 @@
|
||||
#!/bin/sh
|
||||
podman run -it \
|
||||
--name "${dev:-dev}" \
|
||||
-v /run/user/1000/wayland-0:/run/user/1000/wayland-0 \
|
||||
-v "$SSH_AUTH_SOCK":/run/user/1000/ssh-auth-sock \
|
||||
-v ~/Documents:/home/user/Documents \
|
||||
-v ~/.ssh:/home/user/.ssh \
|
||||
-v ~/.config/git:/home/user/.config/git \
|
||||
--security-opt label=disable \
|
||||
--userns=keep-id \
|
||||
dev
|
Loading…
Reference in New Issue
Block a user