Open feltech opened 6 years ago
@feltech It appears you've put a lot of effort on this pull request -- it really looks excellent work. I'll try it and give some feedback.
Haven't been able to test on my workstation. Vim is compiled to support only python2 and sadly most plugins I use work only with python 2 -- so recompiling for python 3 support will kinda make my system not really usable for developing. Do you have plans, @feltech , to also support python2?
Hey, thanks for taking a look. I'll try to find some time to ensure it's python2 compatible. I've also done some follow-up work that I'm yet to PR, since it's based on this stuff, so it would be nice to get this reviewed.
In fact @feltech I was mistaken thinking that your pull request isn't Python 2 compatible. After paying attention to the errors I received, I was able to make it work with a couple of tweaks in your code and it works pretty ok so far. I'll open an issue on your side of things regarding those tweaks.
I did some testing with this (rtags 2.33) and saw some minor issues;
rc -J
, vim hangs for some time on trying to query rdm
(without me having done any changes to warrant a query for status)W
/E
markers disappears.Note: If it matters, I was running with this branch rebased on top of the current master.
Background
vim-rtags is the only vim plugin I could find that has the killer "rename symbol" feature for C++, as well as other great features, e.g. class hierarchy. However, diagnostics and completions were nowhere near as friendly as YouCompleteMe and ALE.
Because of the aforementioned two plugins, I already had two clang builds of my project(s) going on at any one time, and with vim-rtags that made three, which is just plain wasteful. vim-rtags was close to replacing all three with a single solution, so I set about adding some tweaks here and there. It's culminated in quite a refactor, especially for the python code (which I am much more familiar with than vimscript).
Highlights
<leader>rx
. Errors with fixits available are marked in the sign column byFx
and suffixed in the diagnostics lists by[FIXIT]
.omnifunc
by default. This allows for trivial compatibility with YouCompleteMe by simply disabling their built-in cpp completion.--diagnostics-all
via<leader>rD
, to show all errors for the entire project.Fixes
shell=True
for python 3.5+ subprocess, sinceshell=True
means arguments are passed to the shell process, rather than RTags.subprocess
rather thansplit
ing a string, which is better for e.g. filenames with spaces.Tweaks
tempname
s by default.Misc
g:rtagsAutoDiagnostics
,g:rtagsDiagnosticsPollingInterval
,g:rtagsCppOmnifunc
,g:rtagsRdmLog
.