Globale GTAGs können keine Tags erstellen und global können die Tags für Python Code nicht finden

Post a reply

Smilies
:) :( :oops: :chelo: :roll: :wink: :muza: :sorry: :angel: :read: *x) :clever:
View more smilies

BBCode is ON
[img] is ON
[flash] is OFF
[url] is ON
Smilies are ON

Topic review
   

Expand view Topic review: Globale GTAGs können keine Tags erstellen und global können die Tags für Python Code nicht finden

by Anonymous » 19 Aug 2025, 12:08

Ich verwende Ubuntu 22.04 und ich habe gesehen, dass es bereits Datei /etc/gtags/gtags.conf vom Ubuntu -Paket "Global" konfiguriert gibt. In der Konfigurationsdatei gibt es bereits die Konfigurationen von Pygments-Parser. So etwas wie belly < /p>

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

Es scheint, dass es nicht funktioniert.>

Top