Skip to content

Commit

Permalink
Merge pull request #31 from dbt-labs/add_joels_jsonschema
Browse files Browse the repository at this point in the history
add YAML autocomplete via JSONSchema
  • Loading branch information
dataders authored Aug 18, 2022
2 parents 4c37922 + 4a1c12d commit d5d3d6d
Show file tree
Hide file tree
Showing 3 changed files with 30 additions and 3 deletions.
24 changes: 22 additions & 2 deletions .devcontainer.json
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,26 @@
"workbench.editor.revealIfOpen": true,
"editor.rulers": [
99
]
],
"yaml.schemas": {
"https://raw.githubusercontent.com/dbt-labs/dbt-jsonschema/main/schemas/dbt_yml_files.json": [
"/*.yml",
"!profiles.yml",
"!dbt_project.yml",
"!packages.yml",
"!selectors.yml",
"!profile_template.yml"
],
"https://raw.githubusercontent.com/dbt-labs/dbt-jsonschema/main/schemas/dbt_project.json": [
"dbt_project.yml"
],
"https://raw.githubusercontent.com/dbt-labs/dbt-jsonschema/main/schemas/selectors.json": [
"selectors.yml"
],
"https://raw.githubusercontent.com/dbt-labs/dbt-jsonschema/main/schemas/packages.json": [
"packages.yml"
]
}
},
"extensions": [
"bastienboutonnet.vscode-dbt",
Expand All @@ -67,7 +86,8 @@
"ms-azuretools.vscode-docker",
"ms-python.python",
"visualstudioexptteam.vscodeintellicode",
"samuelcolvin.jinjahtml"
"samuelcolvin.jinjahtml",
"redhat.vscode-yaml"
],

"remoteUser": "vscode"
Expand Down
3 changes: 2 additions & 1 deletion .vscode/extensions.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,8 @@
"recommendations": [
"innoverio.vscode-dbt-power-user",
"mechatroner.rainbow-csv",
"yzhang.markdown-all-in-one"
"yzhang.markdown-all-in-one",
"redhat.vscode-yaml"
],
// List of extensions recommended by VS Code that should not be recommended for users of this workspace.
"unwantedRecommendations": [
Expand Down
6 changes: 6 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -195,6 +195,12 @@ There's some bells and whistles defined in the [.devcontainer.json]().devcontain
4. the `find-related` extension allows an easy shortcut to navigating using `CMD`+`R`to jump from
- a model file to it's corresponding compiled version,
- from a compiled file to either the original model file or the version in `target/run`
5. The `vscode-yaml` YAML, combined with the JSON schema defined in [dbt-labs/dbt-jsonschema](https://github.com/dbt-labs/dbt-jsonschema), autocomplete options while working with dbt's YAML files: i.e. :
- Project definition files (`dbt_project.yml`)
- Package files (`packages.yml`)
- Selectors files (`selectors.yml`)
- Property files (`models/whatever.yml`)



</details>
Expand Down

0 comments on commit d5d3d6d

Please sign in to comment.