Syntax highlighting doesn't go away when problem fixed
See original GitHub issueParts of the code where there is a problem to be fixed are underlined, and variables that are unused are shadowed. This goes away when the problem is fixed, but NOT if there is still other problems to be fixed in the file.
For example, let’s take the following file with 2 problems:
import os # [Pyright] [H] "os" is not accessed
a = "foo"
b = 2
c = a + b # [Pyright reportGeneralTypeIssues] [E] ...
The os
variable is shadowed, and a+b
is underlined.
If I fix the error [E] by modifying b = 2
into b = "bar"
, then the error [E] goes away but a + b
is style underlined.
Highlighting becomes OK only if I also fix the [H] problem, or if I reload the file.
Any idea on what’s wrong here ?
I also noticed that if only fixing the [E] and writing (:w
), then reloading (:e
) will correctly remove the underlined a + b
, but undoing (u
) will redo the underlining of a + b
(and not any other modificaition).
Edit: Screenshots:
There is 2 problems | One problem fixed, but underlining remains | All problems fixed, underlining goes away |
---|---|---|
What’s the output of :CocCommand pyright.version
[coc.nvim] coc-pyright 1.1.181 with Pyright 1.1.184
What’s the output of :CocCommand workspace.showOutput Pyright
Workspace: /home/p20aime
Using python from /home/p20aime/miniconda3/bin/python
[Warn - 9:08:12 AM] Ignored rootPath /home/p20aime of client "pyright"
[Info - 9:08:12 AM] Pyright language server 1.1.184 starting
[Info - 9:08:12 AM] Server root directory: /home/p20aime/.config/coc/extensions/node_modules/coc-pyright/node_modules/pyright/dist/
[Info - 9:08:12 AM] No pyproject.toml file found.
[Info - 9:08:12 AM] Setting pythonPath for service "<default>": "/home/p20aime/miniconda3/bin/python"
[Warn - 9:08:12 AM] stubPath typings is not a valid directory.
[Info - 9:08:12 AM] Assuming Python version 3.9
[Info - 9:08:12 AM] Assuming Python platform Linux
[Warn - 9:08:12 AM] Exception received when installing file system watcher: TypeError [ERR_FEATURE_UNAVAILABLE_ON_PLATFORM]: The feature watch recursively is unavailable on the current platform, which is being used to run Node.js
[Warn - 9:08:12 AM] Exception received when installing file system watcher: TypeError [ERR_FEATURE_UNAVAILABLE_ON_PLATFORM]: The feature watch recursively is unavailable on the current platform, which is being used to run Node.js
[Warn - 9:08:12 AM] Exception received when installing file system watcher: TypeError [ERR_FEATURE_UNAVAILABLE_ON_PLATFORM]: The feature watch recursively is unavailable on the current platform, which is being used to run Node.js
[Warn - 9:08:12 AM] Exception received when installing file system watcher: TypeError [ERR_FEATURE_UNAVAILABLE_ON_PLATFORM]: The feature watch recursively is unavailable on the current platform, which is being used to run Node.js
[Info - 9:08:12 AM] Searching for source files
[Info - 9:08:12 AM] No source files found.
Issue Analytics
- State:
- Created 2 years ago
- Comments:14 (8 by maintainers)
Top GitHub Comments
So I removed all vim installations and installed vim 8.2 from
ppa:jonathonf/vim
and there is no issue anymoreI’ve tested with Vim 8.2, can’t reproduce.