Sublime Forum

"Goto definition" functionality

#1

I am creating a plugin to support a new language, and I want to add “Goto definition” functionality, but I am not sure where to start with this. Are there any other language plugins that support this kind of thing? Is Sublime even suited for this? Anything would help me at this point.

0 Likes

#2

I believe anything with the scope entity.name.function appears in the GoTo Definition feature.

0 Likes

#3

Oh, are you saying that there is already the GoTo Definition feature available by default? How do you use it?

0 Likes

#4

When creating the language definition, use the scope entity.name.function for anything you’d like to see in the GoTo Definition panel.

0 Likes

#5

A few plugins have this functionality. For example, SublimeCodeIntel, SublimeRope, and SublimeClang have “go to definition.” What nick. is referring to is the “Go To Symbol” panel which displays a list of all the methods in the current file. You can get to this panel by pressing @ in the Go To Anything panel (control+p). This also works for any file in the current project. filename#function_name. I’m assuming you’re referring to highlighting a method and pressing some keystroke to take you the the declaration of said function.

0 Likes

#6

Good call C0D312, I hadn’t understood the question that way. I use CTags for that feature.

0 Likes

#7

This functionality is very important for me.

Are you saying that installing the CTags plugin it can be possible to go to a function definition by a key combination? could this work for Javascript?

0 Likes