Sublime Forum

ST3 Build 3103: Goto JavaScript variable definition not working

#1

The GoTo definition feature does not seem to be working with variables. I see a couple of posts regarding this in C/C++ but none in JS

A top level declaration like

let bar = 5;

does not bring up any matches when using Goto definition and typing ‘bar’

but a function definition like

let foo = () => {}

does match.

I was on build 3114 but then downgraded to 3103 since 3114 had a problem with finding function definitions in ExtJS class definitions

0 Likes

#2

I saw in another post that the Babel plugin can mess with the Goto definitions and so I upgraded to build# 3114 and removed the Babel plugin. I do see functions defined in ExtJS classes now being populated in the Cmd-R list, so that’s great.

But I still do not see any variable definitions being listed :frowning:

0 Likes

#3

This is almost certainly a bug in the JavaScript mode. You should file a bug here: https://github.com/sublimehq/Packages/issues Be sure to include some reproducing snippets.

0 Likes

#4

Thank you. I will post an issue there.

0 Likes

#5

We don’t index variables in any of the default packages. We index functions, classes, methods, structs, traits, etc. In some languages we index constants.

0 Likes