Code: Select all
#
# Plug-in parser to use Pygments.
#
pygments-parser|Pygments plug-in parser:\
:tc=common:\
:ctagscom=/usr/bin/ctags-exuberant:\
:pygmentslib=$libdir/gtags/pygments-parser.la:\
:langmap=ABAP\:.abap:\
:langmap=ANTLR\:.G.g:\
:langmap=ActionScript3\:.as:\
:langmap=Ada\:.adb.ads.ada:\
:langmap=Python\:.py.pyw.sc.tac.sage:\
< /code>
Ich habe einen einfachen Test nach belly -Schritten durchgeführt: < /p>
/tmp/tmp$ cat test.py
#!/usr/bin//python
def message():
print("Hello World")
if __name__ == "__main__":
message()
/tmp/tmp$ gtags --gtagslabel pygments-parser -v .
[Tue Aug 19 17:57:33 CST 2025] Gtags started.
Using configuration file '/etc/gtags/gtags.conf'.
Using configuration label 'pygments-parser'.
Using plug-in parser.
[Tue Aug 19 17:57:33 CST 2025] Creating 'GTAGS' and 'GRTAGS'.
[1] extracting tags of test.py
[Tue Aug 19 17:57:33 CST 2025] Creating indexes for idutils.
mkid: nothing to do
[Tue Aug 19 17:57:33 CST 2025] Done.
tmp/tmp$ global -v -x message test.py
object not found (using '/tmp/tmp/GTAGS').
/tmp/tmp$
/tmp/tmp$ which ctags
/usr/bin/ctags