CTAGS-LANG-JULIA(7)

πŸ“¦
version 6.2.1 Β· 6 versions
, in alpine 3.24, fedora 43, fedora 44

✨ 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