First, you should understand that jsctags and ctags will probably never be in sync. Even if you have only a simple function, both programs can display slightly different information. Thus, it is recommended to use one or the other, but not both.
Secondly, AFAIK, TagBar does not need to be configured to use jsctags instead of ctags. If you are running JavaScript, it will just use jsctags by default, if available. TagBar should not complain if you have working jsctags.
Thirdly, for its own functions associated with tags ( :tag :tselect , <C-]> , etc.), Vim relies only on the presence of one or more physical tags files. Regardless of whether these ctags, jsctags or whatevertags files are generated, this is not a problem if they are created correctly.
And now we come to the fourth point where the pain really is: neither Tagbar nor its senior smith TagList actually use the physical tags file. They directly relate to ctags or jsctags, without even trying to use or update an existing tags file. Because of this, the fact that TagBar works only with the current buffer, your own physical tags file (and, therefore, the functionality of the Vim tag) and TagBar are almost guaranteed to be out of sync. Even if you use the same index.
So ... I would advise you to use ctags or jsctags and forget something about the synchronization of TagBar and Vim tags, since both things are completely separate:
Random thoughts ...
So that Vim can easily find your tags files, you should put this line in your ~/.vimrc :
set tags=./tags,tags;/
./tags means "search tags file in the directory of the current file", tags means "search tags file in the working directory" ./tags ;/ means "continue searching" until you reach / ".
TagBar wiki says error in jsctags, make sure you don't bother it.
jsctags is better than ctags when you write crazy βmodernβ JavaScript with lots of callbacks and self-executing functions. If your JavaScript is more traditional, ctags might be enough.
source share