summaryrefslogtreecommitdiff
path: root/scripts/pylsp_in_venv
blob: feedcc7743d500c014b1abb1a3e984eae818c8af (plain)
1
2
3
4
5
6
7
8
9
10
11
12
#!/bin/bash
VENV_RELATIVE_PATH="venv"

cd $1
# run the server (python-lsp-server) within the virtualenv
# (i.e. with virtualenv variables setup)
# so source the virtualenv
if [ -d "$VENV_RELATIVE_PATH" ]; then
    source "$VENV_RELATIVE_PATH/bin/activate"
fi
# server mileage or arguments may vary
exec pylsp --check-parent-process