Closed jonasreitemeyer closed 5 years ago
The behavior you are describing is not coming from this plugin. Perhaps you have another plugin installed which is doing this? Sounds like maybe ale?
This plugin does not analyze on every write and has no option to do so. It does have an option to format on write and that could open the quickfix list if there are syntax errors, but it wouldn't show general analysis errors. Format on write is optional and is defaulted to off.
We also don't use the sign column at all in this plugin so if you're seeing line markers they are coming from somewhere else and makes me think this probably isn't coming from dartfmt on write.
Thanks for the fast answer. I figured out that the analyze call came from syntastic. But the point i made with the quickfix list, which doesnt update itself is still there. Additionally i can't close the quickfix list with :q as normal. This only opens the quickfix list in fullscreen and i can jump through the errors. And this comes from the dartfmt call on save. Sure, i could disable it, but i like it. :)
The problem doesnt exist if i call :DartFmt. There the behaviour of the quickfix list is as i expect it.
There isn't any difference between calling :DartFmt
and when it automatically formats on save.
Additionally i can't close the quickfix list with :q as normal. This only opens the quickfix list in fullscreen and i can jump through the errors.
We definitely don't do anything that would make the window behave differently. We use cexpr
and copen
Nothing that would change the behavior of :q
or cause it to be fullscreen.
You are likely still hitting some behavior of syntastic or some other plugin.
Thanks for the time, help and the plugin. :)
@jonasreitemeyer I have the same problem and fix it by change line 23 of file dart-lang/dart-vim-plugin/autoload/dart.vim
:
"if buffer_content ==# joined_lines[:-2] | return | endif
if buffer_content ==# joined_lines[:-2]
execute 'cclose'
return
endif
Updated the issue name to reflect my current understanding of the request.
An unconditional cclose
is probably not what we want because the quickfix list could be open for another reason. I wonder if it would be feasible to track and have an understanding of whether the current quickfix list is open because of dartfmt.
Nothing is coming to mind, I don't think we necessarily have visibility into all the reasons that the quickfix list might get populated with something else. Will keep the issue open to consider possibilities.
Hey,
im writing an app with flutter using your plugin and maybe its not your fault but i didnt find a solution. The dartanalyzer binary is in my path, so it is called on every save by your plugin. If there are syntax errors a quickfix list is opened. But when i fix the errors and the analyzer runs through the code the quickfix list wont update itself. It still shows the previous error.
I have two more points:
Greetings and keep up the great Work :)