"krita" import can't be resolved outside of Krita Scripter

Hello! I use Emacs 28.1. How to get hints for available krita module classes and methods? I have the following plugins installed: soft-stone-theme, flycheck, markdown-mode, json-mode, yaml-mode, format-all, lsp-mode, lsp-pyright, company.

The easiest way i found to get autocomplete was to use the plugin developer tools to export the pykrita.py and import it in on the file i am using like

# For autocomplete
from typing import TYPE_CHECKING
    from .PyKrita import *
    from krita import *

You can check an example here

1 Like