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
if TYPE_CHECKING:
from .PyKrita import *
else:
from krita import *
You can check an example here