Giter VIP home page Giter VIP logo

vim-rtags's People

Contributors

asenac avatar bbannier avatar billydonahue avatar dan-t avatar dawagner avatar flackr avatar joeroback avatar kagerouttepaso avatar leeor avatar lyuts avatar marxin avatar mkwork avatar noscript avatar nullpo-head avatar p4cu avatar pdavydov108 avatar petersohn avatar phcerdan avatar quixotique avatar sasq64 avatar sphaerophoria avatar taku25 avatar varunlakkur avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

vim-rtags's Issues

Automated testing of plugin functionality.

Implement testing automation which will allow to verify plugin functionality.
If someone from community has experience with automated tests I would be glad to get hints/suggestions.

Highlight symbols when renaming

Is it possible to add such functionality? I think it will be nice to see which symbol will be renamed, currently you have to look bottom, then find line, then find symbol.

Redraw is needed after every command

Whenever a command is issued (rs, for instance), there's lots of artefacts left on screen if rdm is running in the same terminal. Until :redraw! is executed. Consider redrawing screen after every command invocation.

Symbol info not showing up in neovim

Hi there,

First of all, thanks for a great plugin! This is definitely a main plugin for me when I'm doing C++ development. I noticed recently that, when working in neovim, calling ri on a symbol to get symbol info doesn't seem to work anymore. All that shows up in the status window is the range. e.g.,

Range: 42:9-42:20

By contrast, doing the same thing in vim shows the full symbol information as expected. I'm running neovim 0.2.

I did a git bisect on the vim-rtags repo and found that commit 646c281 is the one that introduced the regression. My knowledge of vimscript is pretty limited, so I wasn't able to debug the issue.

Hope that helps. The symbol info feature is really useful for me, and I work mostly in neovim, so if it's possible to fix, that would be great :)

libclang.so.3.7: cannot open shared object file

No such file or directory.

~ ❯ clang --version
clang version 3.8.1 (tags/RELEASE_381/final)
Target: x86_64-unknown-linux-gnu
Thread model: posix
InstalledDir: /usr/bin

So what should I do here?

Error detected while processing function rtags#InitPython

This error only can be seen in vim. It can be used with neovim.

Error msg:

Error detected while processing function rtags#InitPython:
line    1:
E319: Sorry, the command is not available in this version: python << endpython
line    2:
E492: Not an editor command: import vim
line    4:
E488: Trailing characters: script_folder = vim.eval('s:script_folder_path')
line    5:
E492: Not an editor command: sys.path.insert(0, script_folder)
line    7:
E492: Not an editor command: import vimrtags
line    9:
E492: Not an editor command: endpython

System: Darwin Vonfry.lan 17.2.0 Darwin Kernel Version 17.2.0: Fri Sep 29 18:27:05 PDT 2017; root:xnu-4570.20.62~3/RELEASE_X86_64 x86_64

Vim version:

VIM - Vi IMproved 8.0 (2016 Sep 12, compiled Nov 13 2017 11:17:39)
macOS version
Included patches: 1-1272
Compiled by Homebrew
Huge version with MacVim GUI.  Features included (+) or not (-):
+acl             +find_in_path    -mouse_sysmouse  -tag_any_white
+arabic          +float           +mouse_urxvt     +tcl
+autocmd         +folding         +mouse_xterm     +termguicolors
+balloon_eval    -footer          +multi_byte      +terminal
+browse          +fork()          +multi_lang      +terminfo
++builtin_terms  +fullscreen      -mzscheme        +termresponse
+byte_offset     -gettext         +netbeans_intg   +textobjects
+channel         -hangul_input    +num64           +timers
+cindent         +iconv           +odbeditor       +title
+clientserver    +insert_expand   +packages        +toolbar
+clipboard       +job             +path_extra      +transparency
+cmdline_compl   +jumplist        +perl            +user_commands
+cmdline_hist    +keymap          +persistent_undo +vertsplit
+cmdline_info    +lambda          +postscript      +virtualedit
+comments        +langmap         +printer         +visual
+conceal         +libcall         +profile         +visualextra
+cryptv          +linebreak       -python          +viminfo
+cscope          +lispindent      +python3         +vreplace
+cursorbind      +listcmds        +quickfix        +wildignore
+cursorshape     +localmap        +reltime         +wildmenu
+dialog_con_gui  +lua             +rightleft       +windows
+diff            +menu            +ruby            +writebackup
+digraphs        +mksession       +scrollbind      -X11
+dnd             +modify_fname    +signs           -xfontset
-ebcdic          +mouse           +smartindent     +xim
+emacs_tags      +mouseshape      +startuptime     -xpm
+eval            +mouse_dec       +statusline      -xsmp
+ex_extra        -mouse_gpm       -sun_workshop    -xterm_clipboard
+extra_search    -mouse_jsbterm   +syntax          -xterm_save
+farsi           +mouse_netterm   +tag_binary
+file_in_path    +mouse_sgr       +tag_old_static
   system vimrc file: "$VIM/vimrc"
     user vimrc file: "$HOME/.vimrc"
 2nd user vimrc file: "~/.vim/vimrc"
      user exrc file: "$HOME/.exrc"
  system gvimrc file: "$VIM/gvimrc"
    user gvimrc file: "$HOME/.gvimrc"
2nd user gvimrc file: "~/.vim/gvimrc"
       defaults file: "$VIMRUNTIME/defaults.vim"
    system menu file: "$VIMRUNTIME/menu.vim"
  fall-back for $VIM: "/Applications/MacVim.app/Contents/Resources/vim"
Compilation: clang -c -I. -Iproto -DHAVE_CONFIG_H -DFEAT_GUI_MACVIM -Wall -Wno-unknown-pragmas -pipe  -DMACOS_X -DMACOS_X_DARWIN  -g -O2 -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=1
Linking: clang   -L.             -L /BuildRoot/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.13.Internal.sdk/usr/local/libressl/lib -L/BuildRoot/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.13.Internal.sdk/usr/local/lib -L.             -L /BuildRoot/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.13.Internal.sdk/usr/local/libressl/lib -L/BuildRoot/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.13.Internal.sdk/usr/local/lib  -L/usr/local/lib -o Vim -framework Cocoa -framework Carbon       -lm  -lncurses -liconv -framework AppKit  -L/usr/local/opt/lua/lib -llua -fstack-protector  -L/System/Library/Perl/5.18/darwin-thread-multi-2level/CORE -lperl  -L/usr/local/opt/python3/Frameworks/Python.framework/Versions/3.6/lib/python3.6/config-3.6m-darwin -lpython3.6m -framework CoreFoundation -F/System/Library/Frameworks -framework Tcl -framework CoreFoundation -framework Ruby

Quoting directory issues

Hi and first of all thank you for your work.

I have a project which is in a directory that contains spaces, and unfortunately, it causes multiple issues with this plugin, ie: following location, completion, and others.

As far as I know, the problem arises from the lack of quoting in the getCurrentLocation function and the parsing of rc's output (like here), but it could be from other places.

I don't know how to parse rc's output reliably so I'm not making a pull request, but I'd be glad to be of help.

jump list cause undotree change

HI dear lyuts,
I find the undo tree will be changed when I using vim-rtags jump some times. I try to find out what cause it. then I think I find a bug about vim-rtags:
in plugin/rtags.vim

rtags#JumpTo() call rtags#getCurrentLocation() to get then current locaition.

rtags#getCurrentLocation() using return printf("%s:%s:%s", expand("%"), lnum, col) to return the location.
here expand("%") will got the relative file path. so then g:rtagsJumpStack list will storage a relative file path.

when We need jump back we call rtags#JumpBack() and it get the last location for g:rtagsJumpStack then call rtags#jumpToLocationInternal(jump_file, lnum, col).

in rtags#jumpToLocationInternal function , there have follow code:

           try
	        if a:file != expand("%:p")
	            exe "e ".a:file
	        endif
	        call cursor(a:line, a:col)
	        return 1
	    catch /.*/
	        echohl ErrorMsg
	        echomsg v:exception
	        echohl None
	        return 0
	    endtry

here using expand("%:p"), then it well get the absolute file path, cause of a:file is relative file path. so this well always ture even if we jump back in a same file, so the exe "e ".a:file will always called. then problam is come from here:

I test in the vim and find that: if we using ":edit" command to reopen the same file which is opening. the undo tree ofen will change even the file do not change any longer. (using the ":echo undotree()" cmd can see it). bacause of it, vim-rtags's jump back function will ofen case undotree change when we jump
back in a same file.

I suggest we can save the absolute file path in the g:rtagsJumpStack, because the relative file path well cause jump back failed when user set the 'autochdir' in the vimrc(the "pwd" path will change when user open a file not in current dir after vim open). the absolate file path will no this probalm.

here have some other suggest:

  1. filter the same posotion when save jump list:
function! rtags#saveLocation()
    let [lnum, col] = getpos('.')[1:2]
    let oldpos = get(g:rtagsJumpStack, -1)
    if oldpos[0] != expand("%:p") || oldpos[1] != lnum
        call rtags#pushToStack([expand("%:p"), lnum, col])
    endif
endfunction
  1. using ’normal zz‘ to let cursor always in the middle of window when jump back.

rtags#InitPython can not work with python3

The rtags#InitPython can not work with python3 , suggest modify:

function! rtags#InitPython()
if has('python')
python << endpython
import vim

script_folder = vim.eval('s:script_folder_path')
sys.path.insert(0, script_folder)

import vimrtags

endpython
elseif has('python3')
python3 << endpython
import vim

script_folder = vim.eval('s:script_folder_path')
sys.path.insert(0, script_folder)

import vimrtags

endpython
endif

Getting compile errors/warnings for a cpp file

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

FindRefs sort

Hi,
Thx for rtags and rtags.vim - totally awesome.
I am wondering about sorting the FindRefs (-r -e) output. I do not see a meaningful sort flag in rc so I am wondering about piping the rc output thru sort. Anyone else done something similar ?
Would I edit the cmd to just add "| sort" ?

Jump to definition or declaration

The vim rtags plugin is very useful for browsing c++ code. Thanks.
In the current implementation rj jumps either to the definition or to the declaration as follows:

  • pressing rj where a symbol is used or on a declaration jumps to the definition
  • pressing rj on a definition jumps to the declaration

I find this a bit confusing as there is a state. It also causes me to press rj twice if I want to jump to a declaration when cursor is where a symbol is used. I wish there were instead 2 mappings:

  • one mapping to jump to definition
  • another one to jump to declaration

Is that possible?

E119: Not enough arguments for function: rtags#CompleteAtCursor

When using "complete at cursor" with the keystroke ESC-6, the error in the issue title is shown.

vim-rtags at commit 4d047a7

vim version information (debian wheezy):

VIM - Vi IMproved 7.3 (2010 Aug 15, compiled Feb 10 2013 02:28:00)
Included patches: 1-547
Modified by [email protected]
Compiled by [email protected]
Huge version with GTK2-GNOME GUI.  Features included (+) or not (-):
+arabic +autocmd +balloon_eval +browse ++builtin_terms +byte_offset +cindent 
+clientserver +clipboard +cmdline_compl +cmdline_hist +cmdline_info +comments 
+conceal +cryptv +cscope +cursorbind +cursorshape +dialog_con_gui +diff 
+digraphs +dnd -ebcdic +emacs_tags +eval +ex_extra +extra_search +farsi 
+file_in_path +find_in_path +float +folding -footer +fork() +gettext 
-hangul_input +iconv +insert_expand +jumplist +keymap +langmap +libcall 
+linebreak +lispindent +listcmds +localmap +lua +menu +mksession +modify_fname 
+mouse +mouseshape +mouse_dec +mouse_gpm -mouse_jsbterm +mouse_netterm 
-mouse_sysmouse +mouse_xterm +mouse_urxvt +multi_byte +multi_lang -mzscheme 
+netbeans_intg +path_extra +perl +persistent_undo +postscript +printer +profile
 +python -python3 +quickfix +reltime +rightleft +ruby +scrollbind +signs 
+smartindent -sniff +startuptime +statusline -sun_workshop +syntax +tag_binary 
+tag_old_static -tag_any_white +tcl +terminfo +termresponse +textobjects +title
 +toolbar +user_commands +vertsplit +virtualedit +visual +visualextra +viminfo 
+vreplace +wildignore +wildmenu +windows +writebackup +X11 -xfontset +xim 
+xsmp_interact +xterm_clipboard -xterm_save 
   system vimrc file: "$VIM/vimrc"
     user vimrc file: "$HOME/.vimrc"
      user exrc file: "$HOME/.exrc"
  system gvimrc file: "$VIM/gvimrc"
    user gvimrc file: "$HOME/.gvimrc"
    system menu file: "$VIMRUNTIME/menu.vim"
  fall-back for $VIM: "/usr/share/vim"
Compilation: gcc -c -I. -Iproto -DHAVE_CONFIG_H -DFEAT_GUI_GTK  -pthread -I/usr/include/gtk-2.0 -I/usr/lib/x86_64-linux-gnu/gtk-2.0/include -I/usr/include/atk-1.0 -I/usr/include/cairo -I/usr/include/gdk-pixbuf-2.0 -I/usr/include/pango-1.0 -I/usr/include/gio-unix-2.0/ -I/usr/include/glib-2.0 -I/usr/lib/x86_64-linux-gnu/glib-2.0/include -I/usr/include/pixman-1 -I/usr/include/freetype2 -I/usr/include/libpng12   -pthread -D_REENTRANT -DORBIT2=1 -I/usr/include/libart-2.0 -I/usr/include/gconf/2 -I/usr/include/gnome-keyring-1 -I/usr/include/gtk-2.0 -I/usr/include/gdk-pixbuf-2.0 -I/usr/include/dbus-1.0 -I/usr/lib/x86_64-linux-gnu/dbus-1.0/include -I/usr/include/glib-2.0 -I/usr/lib/x86_64-linux-gnu/glib-2.0/include -I/usr/include/libxml2 -I/usr/include/pango-1.0 -I/usr/include/gail-1.0 -I/usr/include/freetype2 -I/usr/include/atk-1.0 -I/usr/lib/x86_64-linux-gnu/gtk-2.0/include -I/usr/include/cairo -I/usr/include/gio-unix-2.0/ -I/usr/include/pixman-1 -I/usr/include/libpng12 -I/usr/include/libgnomeui-2.0 -I/usr/include/libgnome-2.0 -I/usr/include/libbonoboui-2.0 -I/usr/include/libgnomecanvas-2.0 -I/usr/include/gnome-vfs-2.0 -I/usr/lib/gnome-vfs-2.0/include -I/usr/include/orbit-2.0 -I/usr/include/libbonobo-2.0 -I/usr/include/bonobo-activation-2.0     -g -O2 -fstack-protector --param=ssp-buffer-size=4 -Wformat -Werror=format-security -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=1     -I/usr/include/tcl8.5  -D_REENTRANT=1  -D_THREAD_SAFE=1  -D_LARGEFILE64_SOURCE=1  
Linking: gcc   -L. -Wl,-z,relro -rdynamic -Wl,-export-dynamic  -Wl,-E  -Wl,-z,relro -Wl,--as-needed -o vim   -lgtk-x11-2.0 -lgdk-x11-2.0 -latk-1.0 -lgio-2.0 -lpangoft2-1.0 -lpangocairo-1.0 -lgdk_pixbuf-2.0 -lcairo -lpango-1.0 -lfreetype -lfontconfig -lgobject-2.0 -lglib-2.0     -lgnomeui-2 -lSM -lICE -lbonoboui-2 -lgnomevfs-2 -lgnomecanvas-2 -lgnome-2 -lpopt -lbonobo-2 -lbonobo-activation -lORBit-2 -lart_lgpl_2 -lgtk-x11-2.0 -lgdk-x11-2.0 -latk-1.0 -lgio-2.0 -lpangoft2-1.0 -lpangocairo-1.0 -lgdk_pixbuf-2.0 -lcairo -lpango-1.0 -lfreetype -lfontconfig -lgconf-2 -lgthread-2.0 -lgmodule-2.0 -lrt -lgobject-2.0 -lglib-2.0   -lSM -lICE -lXpm -lXt -lX11 -lXdmcp -lSM -lICE -lm -ltinfo -lnsl  -lselinux  -lacl -lattr -lgpm  -L/usr/lib -llua5.1  -Wl,-E  -fstack-protector -L/usr/local/lib  -L/usr/lib/perl/5.14/CORE -lperl -ldl -lm -lpthread -lcrypt -L/usr/lib/python2.7/config -lpython2.7 -lpthread -ldl -lutil -lm -Xlinker -export-dynamic -Wl,-O1 -Wl,-Bsymbolic-functions  -L/usr/lib -ltcl8.5 -ldl -lpthread -lieee -lm -lruby-1.9.1 -lpthread -lrt -ldl -lcrypt -lm  -L/usr/lib   

Diagnostics command is not working (master branch).

Invoking rd fails with:
Error detected while processing function rtags#Diagnostics..83_Pyeval:
line 1:
Traceback (most recent call last):
File "", line 1, in
File "/home/user/.vim/bundle/vim-rtags/plugin/vimrtags.py", line 150, in get_diagnostics
content = run_rc_command(cmd, content)
File "/home/user/.vim/bundle/vim-rtags/plugin/vimrtags.py", line 22, in run_rc_command
r = subprocess.run('rc ' + arguments, input = content,
AttributeError: 'module' object has no attribute 'run'
E858: Eval did not return a valid python object

Failed to run asynchronously under Neovim

Hi lyuts,
When I try to use <Leader>rj, I got this error message.

Error detected while processing function rtags#HandleResults:
line 3:
E484: Can't open file /tmp/neovim_async_rtags.tmp.7379.0

Plugin send buffer as --unsaved-file cause rdm update almost all project.

I find send buffer as --unsaved-file command to rdm can cause rdm update almost all project sometimes. this may cause by the file is This file is dependent on a lot of other files. this action cause very bad function problam because update a big project will use up all cpu resourse in a long time. Worse, every time jump to the same file will trigger the entire project update.

make location-list window height based on number of entries

I was wondering if the height of the location-list that shows the results can be configured. I think the default height is 10 lines, but if I have only 3 lines of results, having a location list of 10 lines consumes screen space. Would it be possible to change the height of location list based on number of results? It might also be useful to provide a way for user to configure the height of location list for showing the results.

"E688: More targets than List items" when trying to jump to definition of symbol with \rj

I press \rj to jump to the definition of a c++ symbol and I get:

Error detected while processing function <lambda>6[1]..rtags#HandleResults[11]..rtags#ExecuteHandlers[6]..rtags#JumpToHandler:
line   11:
E688: More targets than List items
line   15:
E121: Undefined variable: jump_file
E116: Invalid arguments for function rtags#jumpToLocation(jump_file, lnum, col)
E15: Invalid expression: rtags#jumpToLocation(jump_file, lnum, col)

It also does not jump to the definition, presumably as a result of the error.
It happens all the time. I used to be able to run vim-rtag without problems
but I've re-created my setup with the latest version of the tools and now it
no longer works.

I'm using the latest vim-rtag plugin version from git (via Vundle):

commit 054cd8970eda8e222fc5b4c7b88d2a8727d34f25
Author: lyuts <[email protected]>
Date:   Mon Jul 10 21:55:38 2017 -0700

    Set s:rtagsAsync to 0 to not break older version of vim when async is
    not available.

I'm also using using the latest version of rtags from git:

commit 65c8f03ff0112ce5c5e11aff6867ad0eb9019e63
Author: Anders Bakken <[email protected]>
Date:   Sat Jul 15 09:19:36 2017 -0700

    Issue #1004. Support regex (-Z) for --find-symbols.

And the latest version of Vim from git on Linux x86_64 (xubuntu-16.04):

:version
VIM - Vi IMproved 8.0 (2016 Sep 12, compiled Jul 17 2017 18:00:30)
Included patches: 1-727
Compiled by dope@pel-desktop
Huge version with GTK3 GUI.  Features included (+) or not (-):
+acl             -ebcdic          +listcmds        +persistent_undo +termresponse
+arabic          +emacs_tags      +localmap        +postscript      +textobjects
+autocmd         +eval            -lua             +printer         +timers
+balloon_eval    +ex_extra        +menu            +profile         +title
+browse          +extra_search    +mksession       -python          +toolbar
++builtin_terms  +farsi           +modify_fname    +python3         +user_commands
+byte_offset     +file_in_path    +mouse           +quickfix        +vertsplit
+channel         +find_in_path    +mouseshape      +reltime         +virtualedit
+cindent         +float           +mouse_dec       +rightleft       +visual
+clientserver    +folding         +mouse_gpm       -ruby            +visualextra
+clipboard       -footer          -mouse_jsbterm   +scrollbind      +viminfo
+cmdline_compl   +fork()          +mouse_netterm   +signs           +vreplace
+cmdline_hist    +gettext         +mouse_sgr       +smartindent     +wildignore
+cmdline_info    -hangul_input    -mouse_sysmouse  +startuptime     +wildmenu
+comments        +iconv           +mouse_urxvt     +statusline      +windows
+conceal         +insert_expand   +mouse_xterm     -sun_workshop    +writebackup
+cryptv          +job             +multi_byte      +syntax          +X11
+cscope          +jumplist        +multi_lang      +tag_binary      -xfontset
+cursorbind      +keymap          -mzscheme        +tag_old_static  +xim
+cursorshape     +lambda          +netbeans_intg   -tag_any_white   +xpm
+dialog_con_gui  +langmap         +num64           -tcl             +xsmp_interact
+diff            +libcall         +packages        +termguicolors   +xterm_clipboard
+digraphs        +linebreak       +path_extra      +terminal        -xterm_save
+dnd             +lispindent      -perl            +terminfo
   system vimrc file: "$VIM/vimrc"
     user vimrc file: "$HOME/.vimrc"
 2nd user vimrc file: "~/.vim/vimrc"
      user exrc file: "$HOME/.exrc"
  system gvimrc file: "$VIM/gvimrc"
    user gvimrc file: "$HOME/.gvimrc"
2nd user gvimrc file: "~/.vim/gvimrc"
       defaults file: "$VIMRUNTIME/defaults.vim"
    system menu file: "$VIMRUNTIME/menu.vim"
  fall-back for $VIM: "/usr/local/share/vim"
Compilation: gcc-7 -c -I. -Iproto -DHAVE_CONFIG_H -DFEAT_GUI_GTK  -pthread -I/usr/inclu
de/gtk-3.0 -I/usr/include/at-spi2-atk/2.0 -I/usr/include/at-spi-2.0 -I/usr/include/dbus
-1.0 -I/usr/lib/x86_64-linux-gnu/dbus-1.0/include -I/usr/include/gtk-3.0 -I/usr/include
/gio-unix-2.0/ -I/usr/include/mirclient -I/usr/include/mircore -I/usr/include/mircookie
 -I/usr/include/cairo -I/usr/include/pango-1.0 -I/usr/include/harfbuzz -I/usr/include/p
ango-1.0 -I/usr/include/atk-1.0 -I/usr/include/cairo -I/usr/include/pixman-1 -I/usr/inc
lude/freetype2 -I/usr/include/libpng12 -I/usr/include/gdk-pixbuf-2.0 -I/usr/include/lib
png12 -I/usr/include/glib-2.0 -I/usr/lib/x86_64-linux-gnu/glib-2.0/include   -g -O2 -U_
FORTIFY_SOURCE -D_FORTIFY_SOURCE=1
Linking: gcc-7   -L/usr/local/lib -Wl,--as-needed -o vim   -lgtk-3 -lgdk-3 -lpangocairo
-1.0 -lpango-1.0 -latk-1.0 -lcairo-gobject -lcairo -lgdk_pixbuf-2.0 -lgio-2.0 -lgobject
-2.0 -lglib-2.0 -lSM -lICE -lXpm -lXt -lX11 -lXdmcp -lSM -lICE  -lm -ltinfo -lnsl  -lse
linux  -lacl -lattr -lgpm -ldl     -L/usr/lib/python3.5/config-3.5m-x86_64-linux-gnu -l
python3.5m -lpthread -ldl -lutil -lm

Any idea what causes the error?

Navigation does not work if vim is started not from project root.

When vim is run from some project subfolder and the rc project uses relative file paths the navigation won't work. Probably this can be fixed by running all commands with --absolute-path argument.
Example:
compile_commands.json contains "file: "../../src""
in a tree structure:
project_root
--src
When vim is run from src and jump to symbol is used, rc will return "src/..", which vim will understand as "src/src/..." and show a new dir.

+python is not needed

Since 754ad20, it does not appear that +python is needed. In the current master, the only function that needs it is Offset2LineCol, and that function isn't called anymore since rc changed their output format (as fixed in 754ad20).

Requiring this isn't too big of a deal, except that Ubuntu 16.04's vim seems to only have +python3.

vim8 can't work

Error detected while processing function
rtags#InitPython:

line 9:

Traceback (most recent call last):

File "", line 6, in

File "C:\Users\Administrator\.cache\vimfiles\re
pos\github.com\lyuts\vim-rtags\plugin\vimrtags
.py", line 7, in

logging.basicConfig(filename='/tmp/vim-rtags-p

ython.log',level=logging.DEBUG)

File "C:\Python27\Lib\logging_init_.py", line
1547, in basicConfig

hdlr = FileHandler(filename, mode)

File "C:\Python27\Lib\logging_init_.py", line 913,

Implement class tree

It will be nice if class hierarchy will be represented as tree instead of simple list of all subclasses

python2 has not subprocess.run function

When I use bd to try call rtags#Diagnostics fuction, it come out error:

Traceback (most recent call last):
File "", line 1, in
File "/home/boddy/.home/.vim/bundle/vim-rtags/plugin/vimrtags.py", line 150, in get_diagnostics
content = run_rc_command(cmd, content)
File "/home/boddy/.home/.vim/bundle/vim-rtags/plugin/vimrtags.py", line 22, in run_rc_command
r = subprocess.run('rc ' + arguments, input = content,
AttributeError: 'module' object has no attribute 'run'
E858: Eval did not return a valid python object

it seem than python2 have not run function, could you change the call method to let this call compatable with python2?

Open tag from command line?

With the built-in ctags support, I can type vim -t someTag to find some tag. Is there some way to have something similar for this project? I'm afraid I know very little about vim plugins so perhaps this is impossible.

Errors parsing rc output

Error detected while processing function rtags#JumpTo:
line    5:
E684: list index out of range: 1
E15: Invalid expression: jump_location[1]
line    8:
E121: Undefined variable: jump_byte_offset
E15: Invalid expression: "e +".jump_byte_offset."go ".jump_file
Press ENTER or type command to continue

I think probably the rc format has changed from when this plugin was made. It's filename:linenumber:columnnumber now.

no function to jumpback

hi,
I am test you plugin in my project with rtags, it running nice. but I find that there is no a way to jumpback . Although the vim's C-o can jump to the before editer point. but this no the simon-pure jumpback function for rtags. I see at Elisp api in rtags github project page. like this:
(rtags-location-stack-back)
(rtags-location-stack-forward)
Whenever RTags jumps somewhere it pushes a location onto its stack. Jump back and forward in this stack
this mean rtags can support jumps stack just like the vim's ctags stack (using with C-t).
so I suggest to add a jumpback fucntion to using stack like the rtags-location-stack-back.
I think this will be a very useful function to the vim-rtags user.
best regards

using 'normal' instead of 'normal!'

This will cause user mappings to modify result of the script which is BAD!
for example using a plugin which maps 'm' to move causes jumplist not to be filled.

I'll commit a fix for that in a minute.

Error in rtags#HandleResults

In neovim, doing any rtags action results in:

Error detected while processing function rtags#HandleResults:
line    3:
E484: Can't open file /tmp/neovim_async_rtags.tmp.15140.6
Press ENTER or type command to continue

find files

Is it possible to provide a new option to find files matching a specific pattern? Basically call "rc -I -P " and show the matching list?

Proper completion

Currently we have no compleion after namespaces ('::'), only followwed by '.' and '->', and there bad filter (probably rtags problem).

Pass unread file contents to `rc`

rc supports the --unsaved-file flag that allows queries to be done in an unsaved file. It would be nice if this feature was integrated in vim-rtags.

Plugin should not send buffer as --unsaved-file unless needed

Sending the buffer contents using --unsaved-file is unnecessary if the buffer has no unsaved changes. rdm tracks and re-indexes any saved files.

I've been using vim-rtags to browse a very large source code base (no changes, being made, just read only). Any time I follow links or find references it's delayed as rdm has to reindex the potentially large file (way worse when it's a header file used by many source files).

It would be nice if this were configurable. An option that takes 3 states:

  • eager would perform the current behavior, always feeding in the buffer before executing the actual rc command. This is useful if rdm's file watch isn't working and missed a saved change.
  • conservative would be the default and would only feed in the buffer is there are unsaved changes
  • none would never feed in the buffer's contents. This is useful if you accidentally make a change to a file when you're only trying to browse the source code and try to follow a reference. This would be a way to ensure that vim-rtags does not interfere with the index.

Don't know if you have any thoughts on this. I was going to implement this, but I was wondering if you had other plans.

gf implementation

it's can be implemented via adding current file include paths to 'path' for buffer
See more details in

:help gf

Make RtagsFindSymbols use tab-completion

RtagsFindSymbols uses rc -F, which finds symbols based on exact name match. It would be useful to be able to search based on prefix. rc -S lists symbols starting with its argument. It would be useful to make RtagsFindSymbols tab-complete based on the result of rc -S.

Undefined variable "ch" with latest vim-rtags

Using latest vim-rtags with vim 7.4.1689(Ubuntu 16.04 default), I get the following errors when I try to "FindRefs" or "JumpTo"(pretty much every command throws a similar error).

Error detected while processing function rtags#JumpTo[7]..rtags#ExecuteThen[2]..rtags#ExecuteRCAsync:
line 41:
E121: Undefined variable: ch
E15: Invalid expression: {ch, data -> rtags#HandleResults(ch_info(ch).id, data, 'vim_stdout')}
line 42:
E121: Undefined variable: ch
E15: Invalid expression: {ch, data -> rtags#HandleResults(ch_info(ch).id, data,'vim_exit')}

Symbol info command works only in sync mode

With my recent VIM:

vim --version
VIM - Vi IMproved 8.0 (2016 Sep 12)

The symbol info command runs, I can verify that in rdm.log file. I can also verify that rtags#SymbolInfoHandler is called. However the editor blinks and not info is displayed.
On the other hand, setting:

s:rtagsAsync = 0

works for me.

class rename destructor issue

Hello @lyuts , I've noticed a weird issue with rename. When I try to change a class name with rw, and then type 'a' to rename it everywhere, destructor is not renamed correctly. I'm not sure if it's an issue with plugin or with rtags itself, but instead of renaming virtual ~MyClass() = default; to virtual ~NewName() = default; it produces virtual NewNameMyClass() = default;. All other symbols are renamed correctly.

Reindexing is never automatically triggered (OSX)

I'm quite new to rtags, so I am not sure how is it supposed to work,
but for me reindexing is basically never triggered when I modify and save the file.
I can trigger reindexing manually with <Leader>rr, but for some reason that also seems to reindex much more than it should.

RTags has support for automatic reindexing, right?

Bring back Python 3 compatibility

AFAIU e92265d changes required python version to 2. I understand that this is preferred setting for most users, but not for all them. Since it's not possible to use both python 2 and 3 simultaneously in vim, many python version-agnostic plugins try to autodetect used version and I believe that this is the proper way.

Location list becomes empty after jumping to one of the targets

Vim-RTags commands such as "find symbols" or "find references" populate the location list with all the results from rtags.
However, for me, after selecting and jumping to one of those targets the location list becomes empty again, making it very hard to e.g. iterate over all usages of a function.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.