diff --git a/CHANGELOG.md b/CHANGELOG.md index f086f5b..5be5a7a 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,6 +5,7 @@ - The extension now supports Shiny for R apps. (#30) - The [Python VS Code extension](https://marketplace.visualstudio.com/items?itemName=ms-python.python) is now a soft dependency and is no longer installed by default with the Shiny for VS Code extension. (#30) - Added a new setting, `shiny.previewType`, to control where the Shiny app preview should be opened. (#40) +- Added a new `shinyexpress` snippet to quickly create a basic Shiny Express app in Python. (#42) ## 0.1.6 diff --git a/snippets/shiny.json b/snippets/shiny.json index 666b5b7..4ae3c5b 100644 --- a/snippets/shiny.json +++ b/snippets/shiny.json @@ -20,7 +20,23 @@ "app = App(app_ui, server)", "" ], - "description": "Basic Shiny app skeleton" + "description": "Basic Shiny Core app skeleton" + }, + "Shiny Express application": { + "scope": "python", + "prefix": "shinyexpress", + "body": [ + "from shiny.express import input, render, ui", + "", + "ui.input_slider(\"n\", \"N\", 0, 100, 20)", + "", + "", + "@render.text", + "def txt():", + "\treturn f\"n*2 is {input.n() * 2}\"", + "" + ], + "description": "Basic Shiny Express app skeleton" }, "Shiny module": { "scope": "python", @@ -93,4 +109,4 @@ "}" ] } -} +} \ No newline at end of file