Open ghost opened 4 years ago
Minimal reproduction steps for me.
Flake8 installed with pip install --user flake8
mini.vim:
set nocompatible
set runtimepath^=/home/ash/etc/vim/plugged/coc.nvim
filetype plugin indent on
syntax on
set hidden
call coc#config('python', {
\ "linting.flake8Enabled":1,
\ "linting.flake8Path": "~/.local/bin/flake8",
\ "linting.pylintEnabled": 0,
\ "linting.mypyEnabled": 0,
\})
call coc#config('diagnostic', {
\ "refreshAfterSave": 1
\})
example.py
fooc this is not valid
import os
os.path.
Edit with VIMINIT= nvim -u mini.vim example.py
, wait a few moments for the python interpreter to be found. No diagnostic icons will appear. Edit config to set refreshAfterSave to 0 and they appear.
workspaceOutput:
##########Linting Output - flake8##########
1,9,E,E999:SyntaxError: invalid syntax
2,1,E,E402:module level import not at top of file
18,1,W,W391:blank line at end of file
Result from CocInfo
Describe the bug
in
:CocConfig
, when"diagnostic.refreshAfterSave": false
(default value), the diagnostic error icon properly shows on the left of the line number.However, when
"diagnostic.refreshAfterSave": true
, the diagnostic error icon does not show. As you can see, the error text still shows. However, without this icon it is not easy to spot errors in the file.Reproduce the bug
:CocConfig
diagnostic.refreshAfterSave": true
tococ-settings.json
. Save file.Expected result: icon showing which line has the error Actual result: no icons on the left side. Error message still appears when hovering over line.