CTAGS-LANG-JULIA(7)
β¨ ctags-lang-julia β¨
ok so this is a page from Universal-ctags all about tagging Julia source code, and honestly? it's giving niche but essential π
πΈ NAME πΈ
ctags-lang-julia β random notes about tagging Julia source code with Universal-ctags
π¦ SYNOPSIS π¦
ctags ... --languages=+Julia ...
ctags ... --language-force=Julia ...
ctags ... --map-Julia=+.jl ...
π DESCRIPTION π
This man page gathers random notes about tagging Julia source code. bestie it's literally a lil scrapbook of Julia tagging lore π
π TAGGING IMPORT AND USING EXPRESSIONS π
π§ Summary π§
using X
ββββββββ¬βββββββββ¬βββββββ¬βββββββββββββββββββ
β name β kind β role β other noticeable β
β β β β fields β
ββββββββΌβββββββββΌβββββββΌβββββββββββββββββββ€
β X β module β used β N/A β
ββββββββ΄βββββββββ΄βββββββ΄βββββββββββββββββββ
using X: a, b
ββββββββ¬ββββββββββ¬ββββββββββββ¬βββββββββββββββββββ
β name β kind β role β other noticeable β
β β β β fields β
ββββββββΌββββββββββΌββββββββββββΌβββββββββββββββββββ€
β X β module β namespace β N/A β
ββββββββΌββββββββββΌββββββββββββΌβββββββββββββββββββ€
β a, b β unknown β used β scope:module:X β
ββββββββ΄ββββββββββ΄ββββββββββββ΄βββββββββββββββββββ
import X
ββββββββ¬βββββββββ¬βββββββββββ¬βββββββββββββββββββ
β name β kind β role β other noticeable β
β β β β fields β
ββββββββΌβββββββββΌβββββββββββΌβββββββββββββββββββ€
β X β module β imported β N/A β
ββββββββ΄βββββββββ΄βββββββββββ΄βββββββββββββββββββ
import X.a, Y.b
ββββββββ¬ββββββββββ¬ββββββββββββ¬βββββββββββββββββββ
β name β kind β role β other noticeable β
β β β β fields β
ββββββββΌββββββββββΌββββββββββββΌβββββββββββββββββββ€
β X, Y β module β namespace β N/A β
ββββββββΌββββββββββΌββββββββββββΌβββββββββββββββββββ€
β a β unknown β imported β scope:module:X β
ββββββββΌββββββββββΌββββββββββββΌβββββββββββββββββββ€
β b β unknown β imported β scope:module:Y β
ββββββββ΄ββββββββββ΄ββββββββββββ΄βββββββββββββββββββ
import X: a, b
ββββββββ¬ββββββββββ¬ββββββββββββ¬βββββββββββββββββββ
β name β kind β role β other noticeable β
β β β β fields β
ββββββββΌββββββββββΌββββββββββββΌβββββββββββββββββββ€
β X β module β namespace β N/A β
ββββββββΌββββββββββΌββββββββββββΌβββββββββββββββββββ€
β a,b β unknown β imported β scope:module:X β
ββββββββ΄ββββββββββ΄ββββββββββββ΄βββββββββββββββββββ
π Examples π
example one π
"input.jl"
using X0
"output.tags" with "--options=NONE -o - --extras=+r --fields=+rzK input.jl"
X0 input.jl /^using X0$/;" kind:module roles:used
the --extras=+r option (or --extras=+{reference} if you're feeling fancy) is needed for this tag, since it's a reference tag. why? because module X is not defined here. it is defined in another file. and enabling the roles: field with --fields=+r is for recording that the module is "used", i.e., loaded by using. periodt π
example two πΈ
"input.jl"
import X1.a, X2.b, X3
"output.tags" with "--options=NONE -o - --extras=+r --fields=+rzKZ input.jl"
X1 input.jl /^import X1.a, X2.b, X3$/;" kind:module roles:namespace
X2 input.jl /^import X1.a, X2.b, X3$/;" kind:module roles:namespace
X3 input.jl /^import X1.a, X2.b, X3$/;" kind:module roles:imported
a input.jl /^import X1.a, X2.b, X3$/;" kind:unknown scope:module:X1 roles:imported
b input.jl /^import X1.a, X2.b, X3$/;" kind:unknown scope:module:X2 roles:imported
ok so why do X1 and X2 have role "namespace", while X3 have role "imported"? bestie it's because the symbol a in module X1, and b in module X2 are brought to the current scope, but X1 and X2 themselves are not. we use the "namespace" role for such modules. π«Ά
X3 is different. the symbol X3, together with all exported symbols in X3, is brought to current scope. for such modules, we use "imported" or "used" role depending whether they are loaded by import or using. no cap.
also, notice that a and b have the "unknown" kind. this is because we cannot know whether it's a function, constant, or macro, etc. π
π₯ SEE ALSO π₯
and that's the whole page, bestie!! this is from Universal-ctags version 6.2.1, mwah ππ β¨ stay tagging, icon π
π¦ where this page comes from
- alpine 3.24: ctags-doc 6.2.1-r0 Β· GPL-2.0-or-later
- fedora 43: ctags 6.2.1-1.fc43 Β· GPL-2.0-or-later
- fedora 44: ctags 6.2.1-3.fc44 Β· GPL-2.0-or-later
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms