I’m using Lua scripts.
F12 goes only to function declarations.
However, I constantly need to go to variable declarations: local myvar
or only myvar
.
How to do that?
Lua: Goto variable declaration
rogeriodec
#1
0 Likes
deathaxe
#2
It would require LUA.sublime-syntax to scope declarations so those could be added to (indexed) symbols.
0 Likes
deathaxe
#4
All features such as Goto Definition depend on syntax definitions providing proper/required information. Those are missing in the currently quite simple implementation of builtin LUA syntax. Thus syntax definition would need to be extended to provide such information.
The principle behind everything is:
- syntax definitions apply
scopes
to tokens - those
scopes
can be used to definesymbol lists
-
symbol lists
define targets for Goto Definition
In short, Sublime Text doesn’t know about what a variable declaration is, atm. Therefore it would need to be teached about them first.
I am not a LUA expert, but if all declarations looked like local myvar
using keyword to initiate declaration, it might probably be not too difficult.
1 Like