Issue about ‘Goto Definition’ and on hover ‘Definition’ tooltip for lua function defined on a table or module.
Here is a sample case of this issue:
one lua code file: util.lua
local util = {} function util.foo() print("did foo") end function global_bar() print("did bar") end
and another lua code file: app.lua
local util = require "util" util.doSomething() global_bar()
Currently the on hover ‘Definition’ tooltip feature, shows tooltip for the global_bar()
call in line 3 of app.lua, whose definition does not have any preceding [object.]
or [object:]
.
But the on hover ‘Definition’ tooltip feature is not working for the util.doSomething()
call in line 2 of app.lua, whose definition has a preceding [object.]
or [object:]
And the menu item: ‘Goto…’ -> ‘Goto Definition…’ (shortcut F12), also does not work if user’s cursor is in any character among util.doSomething()
. Well at the same, I found that it could work by only such approach, that you select the whole texts of util.doSomething()
and press shortcut F12, it goes to the definition correctly, however, which is quite inconvenient.
Any idea about this issue?
(And, curiously, how can I make the sublime text indexing for functions also parse the function definitions like object.foo(...)
and object:foo(...)
?)