From 8bf65f5273fecc0fa07bd42111f4fb83c450aac2 Mon Sep 17 00:00:00 2001 From: jason Date: Tue, 21 May 2024 18:56:55 -0600 Subject: add install-pylsp helper function --- bash/.bashrc | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) diff --git a/bash/.bashrc b/bash/.bashrc index 76cdb2d..8ad71a3 100644 --- a/bash/.bashrc +++ b/bash/.bashrc @@ -167,7 +167,21 @@ fi if [[ -x $HOME/.pyenv/bin ]]; then eval "$($HOME/.pyenv/bin/pyenv init -)" export PATH=$HOME/.pyenv/bin:$PATH -fi +fi + +function install-pylsp() { + # a little shortcut for installing the helpers i use for python + # IDE features + [ ! -z "${VIRTUAL_ENV}" ] \ + && pip install -U --upgrade-strategy eager \ + black \ + flake8 \ + flake8-docstrings \ + flake8-import-order \ + mypy \ + jedi-language-server \ + || echo 'Not in a venv.' +} __workon() { source ~/.virtualenvs/$1/bin/activate -- cgit v1.2.1