Skip to content

Commit

Permalink
feat: add vscode/additional-extensions module hook (#452)
Browse files Browse the repository at this point in the history
---------

Co-authored-by: Mark Lee <malept@users.noreply.github.com>
  • Loading branch information
Ned-el-ch and malept committed May 1, 2024
1 parent adb070d commit 099535d
Show file tree
Hide file tree
Showing 2 changed files with 24 additions and 0 deletions.
20 changes: 20 additions & 0 deletions docs/module-hooks.md
Original file line number Diff line number Diff line change
Expand Up @@ -337,3 +337,23 @@ resource "datadog_service_level_objective" "grpc_p99_latency" {
(list (stencil.ApplyTemplate "grpc-slo"))
}}
```

### `vscode/additional-extensions`

**Type**: `string`

**File**: `.vscode/extensions.json`

This hook allows you to add more recommended extensions for the workspace in VSCode. These extensions are suggested when a developer opens the workspace in VSCode.

```tpl
{{- define "extensions" -}}
"somekittens.hot-dog-stand",
{{- end }}
{{ stencil.AddToModuleHook "github.com/getoutreach/stencil-golang" "vscode/additional-extensions"
(list
(stencil.ApplyTemplate "extensions")
)
}}
```
4 changes: 4 additions & 0 deletions templates/.vscode/extensions.json.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,10 @@
"laktak.hjson",
{{- end }}

{{- range (stencil.GetModuleHook "vscode/additional-extensions") }}
{{ . }}
{{- end }}

// Please consider contributing back all recommended
// extensions to stencil!
// <<Stencil::Block(extensions)>>
Expand Down

0 comments on commit 099535d

Please sign in to comment.