-
Notifications
You must be signed in to change notification settings - Fork 7.6k
Code hints: Support require() calls not in an AMD wrapper #3801
Comments
@dilvie Is the file containing the definition of the function located within your project tree? Or is it elsewhere? If it's within the project tree, Brackets should find it. Can you give an example of (a) the code your put your cursor on, and (b) the code for a function definition you expected it to find? |
Reviewed @peterflynn - need more information to decide on the priority. |
It is in the same project tree. I see this issue intermittently for all functions which have been I have not tried AMD modules, so I don't know about that. file1.js
file2.js
Place the cursor on foo(); in file2 and hit Command+E. Result: Nothing happens -- OR -- inline edit works very slowly. I have not been able to figure out if there's a deterministic repro case. |
@eztierney, any idea about this one? I know we don't grok Node-style require()s (per #3938, Tern's plugin for it isn't used), but I thought we still scan all sibling files regardless. I can repro this even with a less exotic structure such as: moduleA.js:
main.js: (in same folder)
Even there, Jump to Definition on "bar" doesn't do anything, and Quick Edit falls back to simple string search... |
@peterflynn We do scan all sibling files, but the problem is that we don't understand the call to require. The requirejs plugin only understands the synchronous call to require when it's inside a simplified CommonJS wrapper. The node plugin referenced in issue #3938 understands that synchronous require calls could be anywhere, which is one reason why we want to turn that on for node files. |
Any progress on this issue? |
Marking needs review -- closely related to #3938. Whether we move them to the backlog or what, both should probably have the same resolution. |
Clarifying title (was: "Inline Edit Broken for Node Projects") |
Using Build 24
Command-E for inline edit sometimes works, but it's very slow. Usually, it just doesn't work at all.
Opening the developer tools doesn't give me any errors. Just a couple warnings about assigning unrelated hotkeys.
The text was updated successfully, but these errors were encountered: