Feature: Go to Implementation for control-repo
For control-repo's, we have the ability to right-click and press "Go to Definition" on a type/provider, which brings us into the type file.
It would be nice to have a similar approach, leveraging the Go to Implementation API, to bring us into the provider file.
I often find myself pressing "Go to Definition", just to bring me the the type, so its easier to find the provider. This would save a couple of clicks :)
As a user/developer
I would like to go to my custom providers easier
so that I don't have to click and scroll after it
Thanks @magnuslarsen !!
Previously this wasn't possible as we'd need to load providers which is problematic e.g. Linux providers on Windows, HOWEVER with the work in https://github.com/orgs/lingua-pupuli/projects/23 this should be possible, as long as Puppet-Strings knows which types a provider provides for.
Transferring to editor services, as this it where it would be fixed.
Thanks for your awesome work!
Depending on how the final implementation is going to be, it might be worth looking into replacing "Go to Definition" with Go to Type Definition for custom types only. Leaving "Go to Definition" in place for everything else
Something to watch out for. The link you referenced is for the internal API within VSCode. The Language Server (Puppet Editor Services) implements the Language Server Protocol (LSP) API
https://microsoft.github.io/language-server-protocol/specification
That was added in v3.6 https://microsoft.github.io/language-server-protocol/specification#version_3_6_0
I wonder if there's anything else that needs a Type vs Impl. Definition Provider?
Plans, Functions, Defined Types and Puppet Classes, Data Types, Type Aliases - Nope. Type and Impl. are at the same place Tasks have a separate Type and Impl. (metadata vs actual script)
For later - Link to the differences between the three Goto things
https://code.visualstudio.com/docs/editor/editingevolved#_go-to-definition
Another thing that could be nice, is "Go to Definition" for variables. It would become very handy for module classes referencing other classes, i.e.: $my_class::params::my_variable
I now that Ruby Solargraph has implemented this, and the code might be useful? VS Code plugin Solargraph language server
Hrmm...I think we can do that....
Yet another thing that could be nice, is "Go to Definition" for these functions:
And maybe also for Puppet URI's
Yet another thing that could be nice, is "Go to Definition" for these functions:
The first thing I tried after installing the language server was using go to definition on lookup which ultimately led me to this issue 🙁