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

Navigate to classes from yaml files #2868

Open
corretge opened this issue Apr 27, 2024 · 0 comments
Open

Navigate to classes from yaml files #2868

corretge opened this issue Apr 27, 2024 · 0 comments

Comments

@corretge
Copy link

corretge commented Apr 27, 2024

I have an application with a lot of configuration files in yaml, with information about classes, for example:

app/Htech/etc/route/doc_get_one.yml:
---
method: CLI
path: "/htech/doc/get/{hre}*"
description: Get a document site from Redis.
run: 
  class: \Etram2\Htech\App\Service\Hre
  method: getOne
in:
  type: redis
  envvar: CLI_REDIS_HRN_CONFIG
  root: \Etram2\Root
out:
  type: yaml
  template: none
  reserved: none  

When I'm editing this file in vscode, I'm dreaming to press command + click on the classs name, and go to the definition.

I added *.yml files to intelephense associations:

  "intelephense.files.associations": [
    "*.php",
    "*.yml"
  ]

Describe the solution you'd like
Editing this kind of configuration files, if detects a string starting with \ plus one of the namespaces of the application, show the hyperlink to go to the class definition.

Additional context
Several years ago, in 2014, there was a Symfony plugin for PHPStorm that do something like this with service definitions and templates.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant