mirror of
https://git.disroot.org/FollieHiyuki/dotfiles.git
synced 2024-12-12 09:08:21 -05:00
c9941850a2
nvim-cmp now uses floating window instead of pumsible. See https://github.com/hrsh7th/nvim-cmp/issues/231
31 lines
974 B
Bash
Executable File
31 lines
974 B
Bash
Executable File
#!/bin/sh
|
|
|
|
if [ "$#" -ne 1 ]; then
|
|
echo "Usage:"
|
|
printf " - %s server_name: install specified server\n" "$0"
|
|
printf " - %s -lsp: install all lsp servers\n" "$0"
|
|
printf " - %s -dap: install all dap servers\n" "$0"
|
|
printf " - %s -lint: install everything\n" "$0"
|
|
exit 1
|
|
fi
|
|
|
|
nvim_script_dir=${XDG_CONFIG_HOME:-$HOME/.config}/nvim/scripts
|
|
|
|
if [ "$1" = "-lsp" ]; then
|
|
find "${nvim_script_dir}/lsp" -type f -exec '{}' \;
|
|
elif [ "$1" = '-dap' ]; then
|
|
find "${nvim_script_dir}/dap" -type f -exec '{}' \;
|
|
elif [ "$1" = '-lint' ]; then
|
|
find "${nvim_script_dir}/lint" -type f -exec '{}' \;
|
|
elif [ "$1" = '-all' ]; then
|
|
find "${nvim_script_dir}" -mindepth 2 -type f -exec '{}' \;
|
|
else
|
|
# Each server should have an unique name
|
|
server_path=$(find "${nvim_script_dir}" -mindepth 2 -type f -name "$1" | head -n 1)
|
|
if [ -z "${server_path}" ]; then
|
|
echo "Incorrect server name."
|
|
exit 1
|
|
fi
|
|
exec ${server_path}
|
|
fi
|