Sign inSign up

laserattack/nvimd

By laserattack

•Updated about 1 year ago

neovim, xclip, ripgrep, xkb-switch

Image
Developer tools
0

338

laserattack/nvimd repository overview

see https://github.com/laserattack/nvim⁠

in short add something like this into your ~/.bashrc:

n() {
    if [ ! $# -eq 0 ]; then
        [[ -d "$1" ]] || [[ -f "$1" ]] || touch "$1"
        local target_path=$(realpath "$1")
        local mount_dir=$(dirname "$target_path")

        docker run -it --rm \
            --hostname="$(hostname)" \
            --env "DISPLAY=$DISPLAY" \
            --volume "/tmp/.X11-unix:/tmp/.X11-unix:ro" \
            --volume "${XAUTHORITY:-${HOME}/.Xauthority}:/root/.Xauthority:ro" \
            --volume "${HOME}/.config/nvim:/root/.config/nvim" \
            --volume "$mount_dir:/VIRTUAL$mount_dir" \
            --workdir "/VIRTUAL$mount_dir" \
            laserattack/nvimd \
            nvim "/VIRTUAL$target_path"
    else
        local current_dir=$(pwd)
        
        docker run -it --rm \
            --hostname="$(hostname)" \
            --env "DISPLAY=$DISPLAY" \
            --volume "/tmp/.X11-unix:/tmp/.X11-unix:ro" \
            --volume "${XAUTHORITY:-${HOME}/.Xauthority}:/root/.Xauthority:ro" \
            --volume "${HOME}/.config/nvim:/root/.config/nvim" \
            --volume "$current_dir:/VIRTUAL$current_dir" \
            --workdir "/VIRTUAL$current_dir" \
            laserattack/nvimd \
            nvim
    fi
}

and use neovim by n <PATH> (your config is mounted from ~/.config/nvim)

Tag summary

Content type

Image

Digest

sha256:4551a7f97…

Size

211.7 MB

Last updated

about 1 year ago

docker pull laserattack/nvimd