Skip to content

Commit 7e1349c

Browse files
committed
fix: update
1 parent 6b87598 commit 7e1349c

File tree

4 files changed

+30
-11
lines changed

4 files changed

+30
-11
lines changed

config/nvim/init.vim

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,4 @@
1-
if !exists("g:vscode")
2-
set runtimepath^=$HOME/.vim runtimepath+=$HOME/.vim/after
3-
let &packpath = &runtimepath
4-
" let g:python3_host_prog = $HOME+'/miniconda3/bin/python'
5-
source $HOME/.vimrc
6-
endif
1+
set runtimepath^=$HOME/.vim runtimepath+=$HOME/.vim/after
2+
let &packpath = &runtimepath
3+
let g:python3_host_prog = "PYTHON_PATH"
4+
source $HOME/.vimrc

migrate.sh

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
#!/usr/bin/env bash
2+
3+
source_dir=$1
4+
target_dir=$2
5+
6+
if [ -z "$source_dir" ] || [ -z "$target_dir" ]; then
7+
echo "Usage: $0 <source_dir> <target_dir>"
8+
exit 1
9+
fi
10+
11+
cp -rv $source_dir/.*rc $target_dir
12+
13+
mkdir -p $target_dir/.config
14+
cp -rv $source_dir/.config/* $target_dir/.config
15+
16+
cp -rv $source_dir/.zsh* $target_dir
17+
18+
cp -rv $source_dir/.gitconfig $target_dir

setup.sh

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,13 +3,11 @@
33
go install github.com/mattn/efm-langserver@latest
44

55
echo "Installing nvm ..."
6-
curl -o- https://github.com/raw/nvm-sh/nvm/v0.39.1/install.sh | bash
6+
curl -o- https://github.com/raw/nvm-sh/nvm/v0.40.1/install.sh | bash
77
export NVM_DIR="$HOME/.nvm"
88
[ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh" # This loads nvm
99
[ -s "$NVM_DIR/bash_completion" ] && \. "$NVM_DIR/bash_completion" # This loads nvm bash_completion
1010

11-
echo "Installing vim-plug ..."
12-
curl -fLo ~/.vim/autoload/plug.vim --create-dirs https://github.com/raw/junegunn/vim-plug/master/plug.vim
1311
mkdir ~/.swap-files
1412

1513
echo "Setting up nvm ..."

setup_vim.sh

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,12 @@ python3 -m pip install --user neovim
1010
echo "Install nvim as editor for git ..."
1111
git config --global core.editor "nvim"
1212

13+
echo "Installing vim-plug ..."
14+
curl -fLo ~/.vim/autoload/plug.vim --create-dirs https://github.com/raw/junegunn/vim-plug/master/plug.vim
15+
1316
echo "Setting up configurations ..."
1417
cp $PWD/home/.vimrc $HOME/.vimrc
15-
mkdir -p $HOME/.config/nvim && yes | cp -r $PWD/config/nvim/* $HOME/.config/nvim
16-
nvim -E -s -u "$HOME/.config/nvim/init.vim" +PlugInstall +qa
18+
mkdir -p $HOME/.config/nvim
19+
cp -r $PWD/config/nvim/* $HOME/.config/nvim
20+
cat $HOME/.config/nvim/init.vim | sed "s|PYTHON_PATH|$(which python3)|g" | tee $HOME/.config/nvim/init.vim
21+
nvim --headless -E -s -u "$HOME/.config/nvim/init.vim" +PlugInstall +qa

0 commit comments

Comments
 (0)