OPTION: Simple eglot/flymake/rass

This is the current approach. The premise of this approach is to reinstall all of the IDE support stuff in each project's virtual package. reason: lots of debugging, doc, and other stuff assumes that we are in the environment that the program is running in, so it's not practical to have one clean environment with emacs and Python IDE stuff, another with the specific program and its stuff, and have the emacs from the first do complicated things with the code from the second. The downside is that the project virtualenv is cluttered with dev stuff, but that should be isolatable depending on the packaging tool.

  1. What works

    • Syntax formatting works

    • C-next and C-prev navigate through errors

    • C- brings up company completion

  2. What to try

    xref-find-definitions
        M-. to find the definition of the identifier at point.
    xref-go-back
        M-, to return back to where you invoked the xref-find-definitions command.
    xref-find-references
        M-? to find references to the identifier at point.
                

  3. Start virtual environment.

    source ~/.config/venv/myproject/bin/activate

  4. Install Python packages

    pip install rassumfrassum ty ruff isort black

  5. Configure emacs to use eglot/rass for python

    This is all done in the standard init.el in 'use-package eglot.

  6. Configure pyproject so ty can find modules

    For each project, configure pyproject.toml to find project modules for import.

    [tool.ty.environment]
    extra-paths = ["./src/myproject"]

    Note

    Source: astral.sh

  7. Configure pyproject so isort and black work together

    Put some stuff in every pyproject.toml so that isort and black cooperate.

    [tool.isortk
    profile = "black"

    Note

    Source: isort readthedocs.io