Cannot find declaration to go to (works, except of custom function.)

0
6 comments

please provide files/code snippets that can be used to recreate the issue

0
Avatar
Permanently deleted user

Sorry, the message was send automatically w/o me pressing the submit button (which is very strange.)

The issue i have with webstorm 2018.2, the click and go to file works with `require` function -> 

But with the function Above, chunk, which is a custom function that we implemented for your needs, does not work -> 

What i have tried is

* add a definition for `chunk` function which is similar to `require`, but that also did not help.

* setup resource folder (as you can see in the picture, the folder is set correctly.)

* invalidate cache and restart 

 

Any ideas on how to fix this ? 

Thank you, and sorry for the empty message before.

 

0

It works for require() as it's treated in a special way (it has file reference auto-injected in its argument).

You can manually inject "File Reference" language in your function calls: put cursor between quotes in argument value, hit Alt+Enter, choose to inject language or references, choose File reference from the list:

 

 

But note that 1) injection is temporal and 2) needs to be done manually when using that function (on every function usage)

0
Avatar
Permanently deleted user

Ah ok.

Is there any way to make it persistent tho, even a non standard way would be great.

 

Thank you !

0
Avatar
Permanently deleted user

Thanks for the help, will track those.

Have a nice day 

0

Please sign in to leave a comment.