VSCode editing support for JsonUI projects managed with
jui_tools. Layout JSON, Screen Spec, Component Spec, Styles and Strings all get first-class completion,
hover, navigation and diagnostics.
Features
Layout JSON
- Component
typecompletion (28 components) with auto-filledwidth/height/childscaffolding. - Property-name completion filtered by the surrounding component type (common + per-component attributes).
- Property-value completion:
- enum values (
textAlign,contentMode,visibility,lineBreakMode,borderStyle, ...) width/height→matchParent/wrapContent/ number,- color properties → registered names from
colors.json/defined_colors.json+#RRGGBB, text/hint→ nested keys fromstrings.json(navigate with_),style→ basenames fromStyles/,include/view/cellClasses[]/sections[].cell/header/footer→ layout files underlayouts_directory,src→ SVG files underimages_directory,alignTopOfView/alignBottomOfView/ etc. → sibling component ids,@{...}→data[].namefrom the current file.
- enum values (
- Platform overrides:
"platform": { "ios": { ... } }suggests attributes for the nested block; the root-level"platforms": [...]suggestsios/android/web. - Responsive: size class keys (
compact,medium,regular,landscape, plus the three-landscapevariants) and attribute completion inside each block. partialAttributes[]completion.data[].classcompletion from the built-in type map plus any project-level.jsonui-type-map.json.
Screen Spec / Component Spec (*.spec.json)
- Schema-driven completion based on the official JSON Schemas (
screen_spec,screen_sub_spec,screen_parent_spec,component_spec) — property names, enum values and object skeletons are all derived automatically. metadata.platformsand method-levelplatforms→ios/android/webchoice.metadata.layoutFile→ layout file completion.subSpecs[].file/structure.customComponents[].specFile→ spec file completion.structure.components[].style→ attribute completion for the component'stype.structure.components[].binding→ attributes that support binding.dataFlow.*.methods[*].params[*].type/returnType→ concrete types from.jsonui-type-map.jsonplus generic patterns ([$T],$T?,Array($T),AsyncThrowingStream<$T,$E>, ...).useCases[].repositories→ cross-reference torepositories[].namein the same spec.displayLogic[].effects[].element→ cross-reference tostructure.components[].id.
Navigation & hover
⌘+click/Ctrl+clickjumps from any reference value (include,view,style,layoutFile,cellClasses[],cell/header/footer,subSpecs[].file,specFile) to the target file. The same paths are rendered as clickable DocumentLinks.- Hovering over an attribute name shows its description, accepted types, and any
platform/modemetadata. - Hovering over
@{name}shows theclassanddefaultValuefrom the correspondingdata[]entry.
Diagnostics
Run automatically on open and on edit (debounced). Disable with
"jsonuiHelper.diagnostics.enabled": false.
Layout: unknown attributes, enum violations, unresolved include / view / style /
cellClasses[], hidden + visibility used together, duplicate id, invalid platform /
responsive keys.
Spec: unresolved layoutFile / subSpecs[].file / customComponents[].specFile, duplicate
component ids, dangling displayLogic.effects[].element, undefined Repository referenced by a
UseCase, iOS-only types (UIImage, inout, labelled tuples, …) used without platforms: ["ios"].
Templates
| Command | Default keybinding | Scope |
|---|---|---|
| Insert View | ⌘⇧V / Ctrl+Shift+V |
Layout |
| Insert Label | ⌘⇧L / Ctrl+Shift+L |
Layout |
| Insert Button | ⌘⇧B / Ctrl+Shift+B |
Layout |
| Insert ScrollView | ⌘⇧S / Ctrl+Shift+S |
Layout |
| Insert SafeAreaView | ⌘⇧A / Ctrl+Shift+A |
Layout |
| Insert Collection | ⌘⇧C / Ctrl+Shift+C |
Layout |
| Insert TextField / Image / TabView / Include | — | Layout |
| Insert screen_spec / screen_sub_spec / screen_parent_spec / component_spec | — | Spec |
| Insert Repository / UseCase / ApiEndpoint | — | Spec |
Configuration
| Setting | Default | Meaning |
|---|---|---|
jsonuiHelper.configFile |
jui.config.json |
Config filename (resolved from workspace root). |
jsonuiHelper.layoutsDirectory |
"" (read from config) |
Override for layouts_directory. |
jsonuiHelper.specDirectory |
"" |
Override for spec_directory. |
jsonuiHelper.stylesDirectory |
"" |
Override for styles_directory. |
jsonuiHelper.stringsFile |
"" |
Override for strings_file. |
jsonuiHelper.diagnostics.enabled |
true |
Toggle diagnostics. |
How it resolves paths
All file references in Layout JSON and Spec JSON are relative to layouts_directory /
spec_directory, not to the current file's directory. "bar_list/bar_cell" resolves to
{layouts_directory}/bar_list/bar_cell.json regardless of where you wrote it.
Privacy
No telemetry, no network calls. See PRIVACY.md.
License
MIT. See LICENSE.