vscode: Add a hello world file template (#7089)

* vscode: Add a hello world file template

* Update editors/vscode/snippets/slint.json

Co-authored-by: Simon Hausmann <hausmann@gmail.com>
This commit is contained in:
Tobias Hunger 2024-12-13 11:25:55 +01:00 committed by GitHub
parent bfdf0e275f
commit 1663337ad5
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 27 additions and 0 deletions

View file

@ -159,6 +159,12 @@
}
}
},
"snippets": [
{
"language": "slint",
"path": "./snippets/slint.json"
}
],
"walkthroughs": [
{
"id": "slint.welcomeWalkthrough",

View file

@ -0,0 +1,21 @@
{
"Hello World": {
"prefix": ["hello world window"],
"isFileTemplate": true,
"body": [
"import { AboutSlint, VerticalBox } from \"std-widgets.slint\";",
"",
"export component MainWindow inherits Window {",
" VerticalBox {",
" Text {",
" text: \"Hello World!\";",
" }",
" AboutSlint {",
" preferred-height: 150px;",
" }",
" }",
"}"
],
"description": "A Hello World window written in Slint"
}
}