clang_complete icon indicating copy to clipboard operation
clang_complete copied to clipboard

Apply suggestions in quickfix window on request

Open tobiasgrosser opened this issue 14 years ago • 3 comments

clang is pretty good in suggesting the right fixes for some typos. The best example is a missing ";". It would be great if it is possible to apply the suggested quickfix on request without any further user interacton. Do you have any idea how to achieve this in vim?

tobiasgrosser avatar Dec 14 '10 00:12 tobiasgrosser

Maybe you could use clang -fdiagnostics-parseable-fixits, combined with vim's setline().

xavierd avatar Dec 14 '10 08:12 xavierd

I just decided the easies way to go is to use libclang directly, as it has a nice library interface and can easily be integrated using python. No need to compile anything.

I tried it yesterday and created a working patchset which uses libclang to run the quickfix window. Besides very nice performance improvements it gives us the ability to access the needed information easily.

I sent out a pull request for this. The support is still very limited, but for the limited cases it supports pretty stable and a good start to base further work on.

tobiasgrosser avatar Dec 14 '10 21:12 tobiasgrosser

I actually did not close this one, as this is still work in progress. But it seems I cannot reopen it.

tobiasgrosser avatar Dec 14 '10 21:12 tobiasgrosser