fannheyward / coc-pyright

Pyright extension for coc.nvim
MIT License
1.29k stars 47 forks source link

Loading window bottom right of the screen appears after typing anything #790

Closed EnricoSteez closed 2 years ago

EnricoSteez commented 2 years ago

What's the output of :CocCommand pyright.version coc-pyright 1.1.265 with Pyright 1.1.265

What's the output of :CocCommand workspace.showOutput Pyright

Workspace: /Users/enrico/Desktop/THESIS/HybridDB
Using python from /usr/local/bin/python3

[Info  - 17:26:39] Pyright language server 1.1.265 starting
[Info  - 17:26:39] Server root directory: /Users/enrico/.config/coc/extensions/node_modules/coc-pyright/node_modules/pyright/dist/
[Info  - 17:26:39] Starting service instance "HybridDB"
[Info  - 17:26:39] No configuration file found.
[Info  - 17:26:39] No pyproject.toml file found.
[Info  - 17:26:39] Setting pythonPath for service "HybridDB": "/usr/local/bin/python3"
[Warn  - 17:26:39] stubPath /Users/enrico/Desktop/THESIS/HybridDB/typings is not a valid directory.
[Info  - 17:26:39] Assuming Python version 3.10
[Info  - 17:26:39] Assuming Python platform Darwin
[Info  - 17:26:40] Searching for source files
[Info  - 17:26:40] Found 23 source files
[Info  - 17:26:42] [FG] Long operation: analyzing: /Users/enrico/Desktop/THESIS/HybridDB/problem.py (2002ms)

My issue is that the rectangular window (the one that says "loading pyright" or something similar), appears after I type any word in the file, as if it's loading something. I don't know if it's supposed to be like that or not. It is not only annoying to have something popping up constantly at the bottom of the screen, but I feel it might be slowing down stuff. My hoc-settings.json looks as follows:

{
    "python.formatting.provider": "black",
    "python.formatting.blackPath": "/usr/local/bin/black",
    "coc.preferences.formatOnSaveFiletypes": [
        "json",
        "python"
    ],
    "python.pythonPath": "/usr/local/bin/python3",
    "python.linting.enabled": true,
    "python.linting.pylamaArgs": [
        "--ignore E501"
    ],
    "python.linting.pylamaEnabled": true
}

As you can see I am formatting on save, not while typing, so I don't really understand why it would be loading. Since I am also experiencing slow line insert towards the end of python files, I tried to disable vim-polyglot (I installed the python syntax plugins manually) and it helped a lot, but it's still not snappy as I would like it to be (it's probably slower than VSCode...).

fannheyward commented 2 years ago

Set pyright.disableProgressNotifications to true in your coc-settings.json

EnricoSteez commented 2 years ago

Thank you! Do you think it's just a matter of notification to suppress or it is constantly checking/loading/parsing something it's not supposed to?

fannheyward commented 2 years ago

This just hide the progress notifications.

EnricoSteez commented 2 years ago

Yes, I understand what the setting does, I was wondering if in a normal installation (with the default setting) it is supposed to constantly appear or there's something wrong with my config.