From 617193ac5c0a3493b030ac93cf3f2ea0a6333d01 Mon Sep 17 00:00:00 2001 From: dogeystamp Date: Sun, 3 Mar 2024 11:39:44 -0500 Subject: [PATCH] migrate from pyright back to pylsp --- README.md | 9 +++++++-- dotinstall.sh | 2 +- programs | 2 -- programs-python | 16 ++++++++++++---- src/.config/nvim/lua/init.lua | 11 ++++++++++- 5 files changed, 30 insertions(+), 10 deletions(-) mode change 100644 => 100755 programs-python diff --git a/README.md b/README.md index d8b8578..755dda9 100644 --- a/README.md +++ b/README.md @@ -7,14 +7,19 @@ My dotfiles. Symlink all the files in src/ to your home directory using the provided dotinstall.sh script, or manually. Otherwise, copy them manually to your home directory. -After, install some packages. A list is provided in the programs file. +After, install some packages. A list is provided in the `programs` file. This list encompasses all packages needed for a full system, including utilities and games. Feel free to pick and choose which packages you want. +A script is also provided with `programs-python` to install Python packages via pipx. +Package availability and their names **differ based on the distribution**: these are for Arch Linux and its derivatives. For a full desktop experience, -you should also build the programs in `suckless/` by runningn `./compile-suckless.sh` as root. +you should also build the programs in `suckless/` by running `./compile-suckless.sh` as root. Alternatively, build the programs with the README instructions in the directory. +Some features are enabled or disabled based on a "system profile": +once the dotfiles are installed, see `~/.config/dot_profile.example` for more information. + ### Notes `.local/bin/keyboard.sh` provides changes I like, such as swapping escape and caps lock, which you should remove if you don't need. diff --git a/dotinstall.sh b/dotinstall.sh index 73e29bf..402692e 100755 --- a/dotinstall.sh +++ b/dotinstall.sh @@ -102,7 +102,7 @@ printf "Symlinked dotfiles.\n" >&2 if [ "$INSTALL_PYTHON" = "Y" ]; then if command -v pipx > /dev/null; then printf "Installing Python packages via pipx...\n" >&2 - cat "$PYREQS" | sed "/#.*/d" | xargs -I{} pipx install {} + "$PYREQS" else printf "'pipx' is missing. Not installing Python packages...\n" >&2 fi diff --git a/programs b/programs index 0431572..56c22b4 100644 --- a/programs +++ b/programs @@ -125,8 +125,6 @@ blender audacity syncthing inkscape -pyright -python-black typescript typescript-language-server bash-language-server diff --git a/programs-python b/programs-python old mode 100644 new mode 100755 index 9783ebf..fc21b35 --- a/programs-python +++ b/programs-python @@ -1,4 +1,12 @@ -animdl -td-watson -cppman -git+https://github.com/dogeystamp/testr +#!/bin/sh +# install python packages via pipx + +pipx install \ + animdl \ + cppman \ + git+https://github.com/dogeystamp/testr + +pipx install python-lsp-server +pipx inject python-lsp-server \ + python-lsp-black \ + pylsp-mypy diff --git a/src/.config/nvim/lua/init.lua b/src/.config/nvim/lua/init.lua index 9ef4823..30dceaa 100644 --- a/src/.config/nvim/lua/init.lua +++ b/src/.config/nvim/lua/init.lua @@ -49,7 +49,16 @@ end -- settings per server (overrides defaults) local servers = { - pyright = {}, + --pyright = {}, + pylsp = { + settings = { + plugins = { + ['python-lsp-black'] = {}, + ['python-pyflakes'] = {}, + ['pylsp-mypy'] = {}, + }, + }, + }, clangd = {}, tsserver = {}, bashls = {},