From f609e44685cc6a49b713f6660ac7d2954f5d4c2a Mon Sep 17 00:00:00 2001 From: Klesh Wong Date: Mon, 5 Dec 2022 20:55:00 +0800 Subject: [PATCH 1/3] fix: nvim installation in wsl --- cli/vim.sh | 26 ++++++++++++-------------- 1 file changed, 12 insertions(+), 14 deletions(-) diff --git a/cli/vim.sh b/cli/vim.sh index e8cbe24..b7c5de9 100755 --- a/cli/vim.sh +++ b/cli/vim.sh @@ -20,21 +20,16 @@ log 'Setting up vim' export VIM=vim case "$PM" in apt) - # nvim not very compatible with CJK characters and ranger - #sudo add-apt-repository ppa:neovim-ppa/stable -y - #sudo apt update - #sudo apt install -y neovim - #if enhance_vim; then - #sudo pip3 install pyvim neovim - #fi - # gui-common is required for clipboard integration - sudo add-apt-repository ppa:jonathonf/vim -y -n - pm_update - sudo apt install -y vim vim-gui-common - if enhance_vim; then - sudo pip3 install pyvim - fi + # sudo add-apt-repository ppa:jonathonf/vim -y -n + # pm_update + # sudo apt install -y vim vim-gui-common + # if enhance_vim; then + # sudo pip3 install pyvim + # fi + sudo add-apt-repository ppa:neovim-ppa/stable + sudo apt-get update + sudo apt-get install neovim ripgrep ;; pacman) #sudo pacman -S --noconfirm --needed neovim ripgrep @@ -51,6 +46,9 @@ case "$PM" in ;; esac +git clone --depth 1 https://github.com/wbthomason/packer.nvim\ + ~/.local/share/nvim/site/pack/packer/start/packer.nvim + # symlink configuration #sudo ln -sf "$(command -v vim)" /usr/bin/v lnsf "$DIR/vim/neovim/init.lua" "$XDG_CONFIG_HOME/nvim/init.lua" From 06028379942efdb3314f86025e244720f2e74be6 Mon Sep 17 00:00:00 2001 From: Klesh Wong Date: Mon, 5 Dec 2022 21:26:55 +0800 Subject: [PATCH 2/3] docs: add lua-language-server --- cli/vim.sh | 2 ++ 1 file changed, 2 insertions(+) diff --git a/cli/vim.sh b/cli/vim.sh index b7c5de9..4d1dfba 100755 --- a/cli/vim.sh +++ b/cli/vim.sh @@ -49,6 +49,8 @@ esac git clone --depth 1 https://github.com/wbthomason/packer.nvim\ ~/.local/share/nvim/site/pack/packer/start/packer.nvim +# lua-language-server https://github.com/sumneko/lua-language-server/releases + # symlink configuration #sudo ln -sf "$(command -v vim)" /usr/bin/v lnsf "$DIR/vim/neovim/init.lua" "$XDG_CONFIG_HOME/nvim/init.lua" From 381537291fc7b3bb42013c53d6ed13ecc85a235c Mon Sep 17 00:00:00 2001 From: Klesh Wong Date: Mon, 5 Dec 2022 23:08:37 +0800 Subject: [PATCH 3/3] docs: display language server setup instruction for lua and c/c++ --- cli/vim.sh | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/cli/vim.sh b/cli/vim.sh index 4d1dfba..891d6fe 100755 --- a/cli/vim.sh +++ b/cli/vim.sh @@ -49,7 +49,11 @@ esac git clone --depth 1 https://github.com/wbthomason/packer.nvim\ ~/.local/share/nvim/site/pack/packer/start/packer.nvim -# lua-language-server https://github.com/sumneko/lua-language-server/releases +echo "For lua" +echo Download archive from https://github.com/sumneko/lua-language-server/releases and extract the 'lua-language-server' and setup the PATH accordingly +echo +echo "For c/c++" +echo "Insall the 'clang'(language server) and 'bear'(generate compile_commands.json from make command)" # symlink configuration #sudo ln -sf "$(command -v vim)" /usr/bin/v