Skip to content
| Marketplace
Sign in
Visual Studio Code>Programming Languages>Templ Go To DefinitionNew to Visual Studio Code? Get it now.
Templ Go To Definition

Templ Go To Definition

Louis Laugesen

|
497 installs
| (0) | Free
Implements a definition provider for templ template function definitions.
Installation
Launch VS Code Quick Open (Ctrl+P), paste the following command, and press enter.
Copied to clipboard
More Info

Templ Go to Definition

This VSCode extension implements a definition provider that allows you to jump to the definition of a templ function definition from Go files.

If the function's definition is in a generated *_templ.go file, it searches for the templ function in the associated .templ file instead. All other definition lookups fallback to your other providers.

This extension is a workaround for https://github.com/a-h/templ/issues/387 where goToDefinition in vscode will take you to the generated go file instead of the .templ file's templ definition.

Works with templ-vscode.

Installation:

ext install lsl.vscode-templ-go-to-definition

From source:

npm run package

Right click the vsix file in vscode and install.

  • Contact us
  • Jobs
  • Privacy
  • Manage cookies
  • Terms of use
  • Trademarks
© 2025 Microsoft