Peeking doesn't work in spec file
As part of #29 (PR #30) everything works but does not peek into spec files. Oracle PL/SQL code is usually defined in two files: pks (spec) and pkb (body).
"public" constants are defined in the pks file. code-peek doesn't seem to find their definitions in the spec file. Any idea why it doesn't work?
Update
Upon further analysis the code only looks at files of the same file type. In the case of languages that have the spec and body in separate files this may prevent the search from finding the files. For Oracle developers packages are usually named pkg_name.pks (spec) and pkg_name.pkb (body). In the body's code it will only search for other pkb files. This is not necessarily a bad thing but some times I want to search the spec file for global constants and types. This logic is in lib/code-peek.coffee in function constructPathsArray.
This also raises the question: Should we look through all the files with the same extension or use the package name as the search. For example in code is usually referenced as my_package.my_function. Why should I have Atom search through all the *.pkb files when I know that I can determine that it should search for my_function in a file that starts with my_package. This may improve search time as it is currently a bit slow.
Would the above proposal work for other languages as well?
A lot of languages don't have packages like you're describing. It might work for your example, but break everything else unless it was handled specifically. I also can't think of any other language that has spec files as a different file type than the implementation files.
In any case, Atom's built in search mechanism expects an array of paths to search through. The only way I could think for it to work in all cases as well as be somewhat optimized was to search by the same file type.
We might be able to come up with a key-value map of file types to search for specific languages (similar to the supported-files.coffee file).
Feel free to fork it and try something out if you want.