You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
We should support ffap, to find the declaration of the class or type at point.
Shouldn't be too difficult, since Puppet has this super-easy autoload hierarchy, which nicely maps resource names to file names. Also, there's no scope import, so names in puppet are always fully qualified.
So essentially:
Find the first class or type definition in the buffer
Split it by :: to get the file name hierarchy, and traverse upwards to find the top-level module directory
Split the name at point by ::, and traverse downwards from the top level module directory to the target file
Visit the target file and search for the matching class or type definition
For use cases with multiple module directories, we should add a new option puppet-module-path, as a list of module directories for Puppet. ffap would look for the target file in all these directories additionally.
The text was updated successfully, but these errors were encountered:
We should support
ffap
, to find the declaration of the class or type at point.Shouldn't be too difficult, since Puppet has this super-easy autoload hierarchy, which nicely maps resource names to file names. Also, there's no scope import, so names in puppet are always fully qualified.
So essentially:
::
to get the file name hierarchy, and traverse upwards to find the top-level module directory::
, and traverse downwards from the top level module directory to the target fileFor use cases with multiple module directories, we should add a new option
puppet-module-path
, as a list of module directories for Puppet.ffap
would look for the target file in all these directories additionally.The text was updated successfully, but these errors were encountered: