Closed jwverzijden closed 7 years ago
Hey, thanks for reporting this.
The reason you get this error is because Code Peek attempts to make the search process faster by only finding functions in files with the same extension (https://github.com/DFreds/code-peek-atom/blob/master/lib/code-peek.coffee#L113).
I could add some undefined error handling around this so you don't get this issue.
I suggest that if the extention is "" (none) you actually do search all files, or something similar, otherwise it is fair to assume that a function will be in the same type of file
That's what I was planning on. I'll work on it and get something pushed up soon.
Hey @crostine,
I was only able to reproduce this when the grammar type was not set, which is the default case when there is no file extension. Code Peek needs the grammar type in order to pick the appropriate regular expression. I went ahead and added an if check that displays a warning if the grammar type is null. I think this "fixes" the issue.
I also made it so that it will search the entire project if there is no file extension. So again, no need for a file extension, just the grammar.
Check it out (version 1.4.16): https://github.com/DFreds/code-peek-atom/pull/20
Let me know if you're still seeing an issue after choosing the grammar.
Thanks!
steps to reproduce:
Atom Version: 1.13.1 Electron Version: 1.3.13 System: Microsoft Windows 10 Pro Thrown From: code-peek package, v1.4.15
Stack Trace
Uncaught TypeError: Cannot read property 'ignoreCase' of undefined
Commands
Config
Installed Packages