mirror of
https://github.com/slint-ui/slint.git
synced 2025-11-17 18:57:10 +00:00
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:
parent
bfdf0e275f
commit
1663337ad5
2 changed files with 27 additions and 0 deletions
|
|
@ -159,6 +159,12 @@
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"snippets": [
|
||||||
|
{
|
||||||
|
"language": "slint",
|
||||||
|
"path": "./snippets/slint.json"
|
||||||
|
}
|
||||||
|
],
|
||||||
"walkthroughs": [
|
"walkthroughs": [
|
||||||
{
|
{
|
||||||
"id": "slint.welcomeWalkthrough",
|
"id": "slint.welcomeWalkthrough",
|
||||||
|
|
|
||||||
21
editors/vscode/snippets/slint.json
Normal file
21
editors/vscode/snippets/slint.json
Normal 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"
|
||||||
|
}
|
||||||
|
}
|
||||||
Loading…
Add table
Add a link
Reference in a new issue