Skip to content

A go-to-definition provider for Templ template functions that avoids stepping into Templ's generated Go code.

License

Notifications You must be signed in to change notification settings

lsl/vscode-templ-go-to-definition

Repository files navigation

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 a-h/templ#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.

About

A go-to-definition provider for Templ template functions that avoids stepping into Templ's generated Go code.

Resources

License

Stars

Watchers

Forks

Packages

No packages published