Open dan-t opened 8 years ago
I would need to do some investigation in order to determine if this is doable for vim. Thanks for bringing this to my attention.
On Sun, Jun 26, 2016 at 05:54:49PM -0700, lyuts wrote:
I would need to some some investigating in order to determine if this is doable for vim. Thanks for bringing this to my attention.
Oh, it's not --diagnostics
but --diagnose
.
Sorry for the confusion, it's '--diagnostics' :/.
Reading the doc again:
(rtags-diagnostics)
Start an async process in a buffer to receive warnings/errors from clang whenever a file gets reindexed. It integrates with flymake to put highlighting on code with warnings and errors
Which most likely will be a bit hard to integrate into vim.
I asked the developer of 'rtags' and currently there's no synchronous version of '--diagnostics' which is callable for one specific file, but he might have a look about it.
I asked the developer of 'rtags' and currently there's no synchronous version of '--diagnostics' which is callable for one specific file, but he might have a look about it.
For it to be usable, it has to be asynchronous anyway, as it would be annoying for Vim to block for several seconds while compiling the file. Latest Vim from github (which will soon be vim-8.0) has support for asynchronous plugins, see :help channel. It would be great to highlight syntax errors and warnings via rtags while editing in Vim, in a asynchronous way.
For it to be usable, it has to be asynchronous anyway, as it would be annoying for Vim to block for several seconds while compiling the file.
It highly depends on your workflow. If you want on the fly checking as you type, then a synchronous solution isn't an option. But if you just want to check if you're writing the file, then the synchronous solution is more than enough, and also the asynchronous solution wouldn't be really faster in this use case.
It highly depends on your workflow. If you want on the fly checking as you type, then a synchronous solution isn't an option. But if you just want to check if you're writing the file, then the synchronous solution is more than enough, and also the asynchronous solution wouldn't be really faster in this use case.
OK, that can be true. Although still, compiling a single c++ file can take several seconds and waiting for several seconds when saving can be annoying. Asynchronous will not be faster, but would feel faster as it does not block. In any case, if we want to highlight errors while typing (without explicitly saving) then asynchronous is a must I think.
I guess this can be closed.
Can you @lyuts please close it?
Hi lyuts,
thanks for the nice vim plugin!
The emacs plugin for rtags supports flycheck, which seems to be running
rc --diagnostics
, so can there be something similar on the vim side?In the doc of
--diagnostics
something about async formatting is mentioned, which might be the problem on the vim side.Greetings, Daniel