puppet-vscode icon indicating copy to clipboard operation
puppet-vscode copied to clipboard

Ability to open class file by clicking on class reference

Open voiprodrigo opened this issue 4 years ago • 2 comments

Hi,

One of the things I'm missing the most productivity-wise is the ability to click on a class name to open the class file. With a large repo with a lot of modules, it would save a lot of scrolling and searching. I tried to check if this would be possible somehow, but without success.

Thanks.

voiprodrigo avatar Apr 19 '21 11:04 voiprodrigo

Hi @voiprodrigo , can you check that the following is true for the session you are trying to do this in:

  • You must be opening a Folder (aka workspace) in VSCode, not a single file
  • You must be opening a Folder either at the root of, or inside of, the control repo. Not outside of it.
  • The control repo must contain an environment.conf
  • The control repo must NOT contain a metadata,json file. If you have both, the extension will assume it's inside a module (not a control repo)

jpogran avatar Apr 20 '21 16:04 jpogran

Hi @jpogran

What would a "control repo" need to be for this to work?

I'm not using control repo "r10k" style. It's a monolithic repo and there is no Puppetfile. Structure is git root folder / puppet / {manifests,modules}

I can surely add an environment.conf file at the root or in /puppet/. Even a Puppetfile.

What do you think could work for my case?

Btw, should I configure vs code for puppet agent or for PDK?

Thanks!

voiprodrigo avatar Apr 21 '21 01:04 voiprodrigo