mirror of
https://github.com/ViViDboarder/vim-settings.git
synced 2025-02-10 14:37:29 +00:00
Update language server install to fix pip and add rustfmt
This commit is contained in:
parent
acf484c4bd
commit
0ac1019486
@ -1,6 +1,9 @@
|
|||||||
#! /bin/bash
|
#! /bin/bash
|
||||||
set -e
|
set -e
|
||||||
|
|
||||||
|
# Clear explicit PYTHONPATH since this gets confused between py2 and py3
|
||||||
|
export PYTHONPATH=""
|
||||||
|
|
||||||
# Determines if a command exists or not
|
# Determines if a command exists or not
|
||||||
function command_exist() {
|
function command_exist() {
|
||||||
command -v "$1" > /dev/null 2>&1;
|
command -v "$1" > /dev/null 2>&1;
|
||||||
@ -10,6 +13,7 @@ function command_exist() {
|
|||||||
function maybe_run() {
|
function maybe_run() {
|
||||||
if command_exist "$1" ;then
|
if command_exist "$1" ;then
|
||||||
echo "> $*"
|
echo "> $*"
|
||||||
|
# shellcheck disable=2048,2086
|
||||||
eval $*
|
eval $*
|
||||||
else
|
else
|
||||||
echo "ERROR: $1 does not exist. Could not run $*"
|
echo "ERROR: $1 does not exist. Could not run $*"
|
||||||
@ -31,7 +35,7 @@ function install_language_servers() {
|
|||||||
maybe_run pip3 install --user python-language-server
|
maybe_run pip3 install --user python-language-server
|
||||||
|
|
||||||
# Rust
|
# Rust
|
||||||
maybe_run rustup component add rls rust-analysis rust-src
|
maybe_run rustup component add rls rustfmt rust-analysis rust-src
|
||||||
|
|
||||||
echo ""
|
echo ""
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user