Error reported
Peek function does not currently support Babel ES6 Javascript files. New to React and Atom so if there's a config file you want to see let me know.
Hey, just send me an example of the function you're trying to peek and I'll see if I can reproduce it. Also, the type of file shown at the bottom matters. If you could tell me what that is or see if it's in this list (https://github.com/DFreds/code-peek-atom/blob/master/lib/supported-files.coffee), that'd be great.
[image1.jpeg]
Tom Hare
On Jul 5, 2018, at 8:33 PM, DFreds <[email protected]mailto:[email protected]> wrote:
Hey, just send me an example of the function you're trying to peek and I'll see if I can reproduce it. Also, the type of file shown at the bottom matters. If you could tell me what that is or see if it's in this list (https://github.com/DFreds/code-peek-atom/blob/master/lib/supported-files.coffeehttps://nam03.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2FDFreds%2Fcode-peek-atom%2Fblob%2Fmaster%2Flib%2Fsupported-files.coffee&data=02%7C01%7C%7Ce2c5daa4d31e4dc4375f08d5e2f136d9%7C84df9e7fe9f640afb435aaaaaaaaaaaa%7C1%7C0%7C636664447983383736&sdata=z4mltbQHDiMyerADMhO5kzg2MPZ4FuGYXkdUTqsYlcE%3D&reserved=0), that'd be great.
— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHubhttps://nam03.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2FDFreds%2Fcode-peek-atom%2Fissues%2F41%23issuecomment-402915646&data=02%7C01%7C%7Ce2c5daa4d31e4dc4375f08d5e2f136d9%7C84df9e7fe9f640afb435aaaaaaaaaaaa%7C1%7C0%7C636664447983383736&sdata=aireInQAIJV4x76uFPXSkWOBiAdEZQd3Vo9yVNSVWc8%3D&reserved=0, or mute the threadhttps://nam03.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fnotifications%2Funsubscribe-auth%2FAMLxFJPby0N0eLqRy47ykrLoME56o-nhks5uDtp9gaJpZM4VENbP&data=02%7C01%7C%7Ce2c5daa4d31e4dc4375f08d5e2f136d9%7C84df9e7fe9f640afb435aaaaaaaaaaaa%7C1%7C0%7C636664447983383736&sdata=CSZH8oU6DFk0Uo2k5yi%2Fu%2B%2FjG9yOttsXE99NivQS3BI%3D&reserved=0.
I think something went wrong there.
If I click one of the references and select peek I get the error.
Tom Hare
On Jul 5, 2018, at 8:53 PM, DFreds <[email protected]mailto:[email protected]> wrote:
I think something went wrong there.
— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHubhttps://nam03.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2FDFreds%2Fcode-peek-atom%2Fissues%2F41%23issuecomment-402918209&data=02%7C01%7C%7C9fba8c2bf943404d8c8908d5e2f41a20%7C84df9e7fe9f640afb435aaaaaaaaaaaa%7C1%7C0%7C636664460385108505&sdata=Iyc3F1xGt%2BEdRPM9FxUkH88eeTw2HtV3zl1PKf35ZCs%3D&reserved=0, or mute the threadhttps://nam03.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fnotifications%2Funsubscribe-auth%2FAMLxFElsJbZ-vijl2_9B04oXEpyzFb8uks5uDt9VgaJpZM4VENbP&data=02%7C01%7C%7C9fba8c2bf943404d8c8908d5e2f41a20%7C84df9e7fe9f640afb435aaaaaaaaaaaa%7C1%7C0%7C636664460385108505&sdata=4S7iG%2Bzpxyj6mewc0w7tQe8sUnrCxlZXySW8IQfrqqc%3D&reserved=0.
I mean that I can't see the image. Please send me some code and a picture of your atom window.
I don't know if I have exactly the same problem, but after a fresh package install of code-peek, the javascript functions should be found I guess, however, when I select the description text of a function or the part where I import it, the ctrl-alt-e shortcut returns an error: "Could not find {functionName} in project".
However if the function is declared within the scope of the same file it does not return an error. It feels like code-peek does not search through all of the files in the project. Is that correct? And if so, would you know a fix?
TLDR; ctrl-alt-e only works within the same file
Hm, I wrote code peek a long time ago. It uses the Atom API to search through all the files for a match based on some regular expressions. It's possible that Atom has updated it's API since I've looked at it. I'll check it out
@HanJoHibender Can you send me an example of the function declaration you're trying to match?
@HanJoHibender Can you send me an example of the function declaration you're trying to match?
These are async functions used in a React environment, async and const are not part of the normal declaration. I think unfilled they are called anonymous functions, but anonymous declarations are out of scope.
Example:
export const functionName = async ( variables ) => { code }