Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

FFAP support #29

Closed
swsnr opened this issue Mar 14, 2014 · 0 comments
Closed

FFAP support #29

swsnr opened this issue Mar 14, 2014 · 0 comments
Milestone

Comments

@swsnr
Copy link
Contributor

swsnr commented Mar 14, 2014

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:

  1. Find the first class or type definition in the buffer
  2. Split it by :: to get the file name hierarchy, and traverse upwards to find the top-level module directory
  3. Split the name at point by ::, and traverse downwards from the top level module directory to the target file
  4. 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.

@swsnr swsnr self-assigned this Mar 14, 2014
@swsnr swsnr added this to the 0.5 milestone Mar 14, 2014
@swsnr swsnr removed their assignment Jan 13, 2016
@swsnr swsnr closed this as not planned Won't fix, can't repro, duplicate, stale Aug 30, 2024
@swsnr swsnr reopened this Aug 30, 2024
@swsnr swsnr closed this as not planned Won't fix, can't repro, duplicate, stale Aug 30, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant