Closed fakedrake closed 7 years ago
Symbols in GTAGS are actually generated by ctags. (global-pygments-plugin internally calls ctags.) By default ctags seems to generate 'SerialConnection' and 'writeRaw' symbols separately, but ctags can change its parsing behavior by configuration files. Could you check if you have any special configuration on your ctags?
Never really got into ctags too much. I dont have a ~/.ctags/
if that answers the question...
@fakedrake, Could you run ctags on your source code and check what symbol ctags generate?
$ ctags *.js
$ grep writeRaw tags
writeRaw serial.js /^ SerialConnection.prototype.writeRaw = function(msg, callback) {$/;" m class:SerialConnection
writeRaw serial2.js /^ SerialConnection.prototype.writeRaw = function(msg, callback) {$/;" m class:SerialConnection
Maybe depending on some situation ctags generate symbols like 'SerialConnection.writeRaw'.
@fakedrake, ctags-5.8 seems to have some problem with JavaScript parser. ctags HEAD will work.
$ ctags-5.8 *.js
$ grep writeRaw tags
SerialConnection.writeRaw serial.js /^ SerialConnection.prototype.writeRaw = function(msg, callback) {$/;" m
SerialConnection.writeRaw serial2.js /^ SerialConnection.prototype.writeRaw = function(msg, callback) {$/;" m
$ ctags-HEAD *.js
$ grep writeRaw tags
writeRaw serial.js /^ SerialConnection.prototype.writeRaw = function(msg, callback) {$/;" m class:SerialConnection
writeRaw serial2.js /^ SerialConnection.prototype.writeRaw = function(msg, callback) {$/;" m class:SerialConnection
I try to use emacs ggtags with javascript. The line I was trying to jump from is this:
This is what ggtags runs on the background:
Looked into the
GTAGS
file and made it work like thisBut that's not very useful since ggtags can't know that
this.conn
is of type SerialConnection. You think there is a way to have pygments register only the method name as a GTAGS entry?