I am wondering if there is a way to activate VScode peek definition function for a custom language.
I am writing cadence skill using it, but I can highlight the syntax but not be able to use this to locate the definition quickly.
I am wondering if there is a way to activate VScode peek definition function for a custom language.
I am writing cadence skill using it, but I can highlight the syntax but not be able to use this to locate the definition quickly.
"Peek Definition" uses the same funcionality under the hood as the regular "Go to Definition". You need to implement a DefinitionProvider
using vscode.languages.registerDefinitionProvider()
. For a code example, check out this previous answer of mine.
Alternatively, if you're using the language server protocol instead of coding against the VSCode API directly, the Goto Definition Request needs to be implemented.