Configuring Python Language Server in Kate Editor for Virtual Environments
This post details configuring a Python language server in the Kate editor to work with virtual environments. The author notes that while Kate's documentation exists, the setup process can be tricky. The article walks through creating a bash script, `pylsp_in_env`, to automatically detect and activate virtual environments. This script is then integrated with `python-lsp-server` and `python-lsp-ruff` (for Ruff linting and formatting). The final configuration is achieved by specifying the `pylsp_in_env` script and the `%{Project:NativePath}` path argument in Kate's LSP configuration file.
Read more