Closed ghost closed 2 years ago
Ok nvm, I have it working.
Install the https://atom.io/packages/symbol-gen package.
In the package settings, click the View Code button and add the following lines to lib/.ctags
(from https://lemmasoft.renai.us/forums/viewtopic.php?t=21622):
--langdef=Renpy
--langmap=Renpy:.rpy
--regex-renpy=/^label[ \t]*([a-zA-Z0-9_]+):/\1/l,label/
--regex-renpy=/^define[ \t]*([a-zA-Z0-9_.]+)/\1/d,definition/
--regex-renpy=/^[ \t]*\$?[ \t]*([a-zA-Z0-9_]+)[ \t]*=/\1/v,variable/
--regex-renpy=/^screen[ \t]*([a-zA-Z0-9_]+)/\1/s,screen/
--regex-renpy=/^style[ \t]*([a-zA-Z0-9_]+)/\1/S,style/
Go back to your project and press ctrl-alt-g
(or use Symbol Gen: Generate in the Command Palette. It will generate a .tags
file in your project root.
And that's it! You can now press ctrl-shift-r
and fuzzy search your game labels, as well as right click on something like jump start
and Go To Declaration.
Is there any way to get
label
s into the symbols view for quickly jumping around a file/project? It looks like Atom uses ctags but I'm not sure how that would work on Windows, or even if language-renpy would benefit from it.