Skip to content

Commit

Permalink
fix neovim lazyvim loading
Browse files Browse the repository at this point in the history
  • Loading branch information
usrbinkat committed Nov 14, 2024
1 parent 235ece5 commit 28cdfc8
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 15 deletions.
29 changes: 15 additions & 14 deletions docker/neovim/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -151,27 +151,28 @@ RUN echo \
&& make CMAKE_BUILD_TYPE=Release \
&& make install \
&& rm -rf /tmp/neovim \
&& update-alternatives --install /usr/bin/vim vim /usr/local/bin/nvim 100 \
&& update-alternatives --set vim /usr/local/bin/nvim \
&& rm -rf /bin/nvim \
&& bash -c "${apt_clean}" \
&& ${dir_clean} \
&& ${TEST} \
&& echo

USER vscode
RUN set -ex \
&& git clone https://github.com/LazyVim/starter ~/.config/nvim \
&& (nvim --headless "+Lazy install" +qa || { echo "First Lazy install attempt failed, retrying..."; sleep 2; nvim --headless "+Lazy install" +qa; }) \
&& (nvim --headless "+Lazy load all" +qa || { echo "First Lazy load attempt failed, retrying..."; sleep 2; nvim --headless "+Lazy load all" +qa; }) \
&& (nvim --headless "+Lazy sync" +qa || { echo "First Lazy sync attempt failed, retrying..."; sleep 2; nvim --headless "+Lazy sync" +qa; }) \
&& sudo mkdir -p /etc/skel/.config/nvim/lua/config \
&& sudo mkdir -p /home/vscode/.config/nvim/lua/config \
&& sudo touch /etc/skel/.config/nvim/lua/config/keymaps.lua \
&& sudo touch /home/vscode/.config/nvim/lua/config/keymaps.lua \
&& sudo chown -R vscode:vscode /home/vscode/.config/nvim \
&& echo 'vim.keymap.set("i", "jj", "<ESC>", { silent = true })' | sudo tee -a /etc/skel/.config/nvim/lua/config/keymaps.lua \
&& echo 'vim.keymap.set("i", "jj", "<ESC>", { silent = true })' | tee -a /home/vscode/.config/nvim/lua/config/keymaps.lua \
&& true
&& sudo update-alternatives --install /usr/bin/vim vim /usr/local/bin/nvim 100 \
&& sudo update-alternatives --set vim /usr/local/bin/nvim \
&& git clone https://github.com/LazyVim/starter ~/.config/nvim \
&& (nvim --headless "+Lazy install" +qa || { echo "First Lazy install attempt failed, retrying..."; sleep 2; nvim --headless "+Lazy install" +qa; }) \
&& (nvim --headless "+Lazy load all" +qa || { echo "First Lazy load attempt failed, retrying..."; sleep 2; nvim --headless "+Lazy load all" +qa; }) \
&& (nvim --headless "+Lazy sync" +qa || { echo "First Lazy sync attempt failed, retrying..."; sleep 2; nvim --headless "+Lazy sync" +qa; }) \
&& sudo mkdir -p /etc/skel/.config/nvim/lua/config \
&& sudo mkdir -p /home/vscode/.config/nvim/lua/config \
&& sudo touch /etc/skel/.config/nvim/lua/config/keymaps.lua \
&& sudo touch /home/vscode/.config/nvim/lua/config/keymaps.lua \
&& sudo chown -R vscode:vscode /home/vscode/.config/nvim \
&& echo 'vim.keymap.set("i", "jj", "<ESC>", { silent = true })' | sudo tee -a /etc/skel/.config/nvim/lua/config/keymaps.lua \
&& echo 'vim.keymap.set("i", "jj", "<ESC>", { silent = true })' | tee -a /home/vscode/.config/nvim/lua/config/keymaps.lua \
&& true


# Install Node.js Neovim Package and tree-sitter-cli
Expand Down
1 change: 0 additions & 1 deletion docker/slim/rootfs/etc/skel/.bashrc
Original file line number Diff line number Diff line change
Expand Up @@ -49,4 +49,3 @@ alias ll="ls -lah"
alias rm='rm -i'
alias cp='cp -i'
alias mv='mv -i'
alias cloc="git count | xargs wc -l 2>/dev/null"

0 comments on commit 28cdfc8

Please sign in to comment.