|
90 | 90 | "command": "shiny.stopApp", |
91 | 91 | "title": "Stop Shiny App", |
92 | 92 | "icon": "$(debug-stop)" |
| 93 | + }, |
| 94 | + { |
| 95 | + "category": "Shiny", |
| 96 | + "command": "shiny.setRunFromOverride", |
| 97 | + "title": "Run this app from...", |
| 98 | + "enablement": "(editorLangId == python || editorLangId == r) && workspaceFolderCount > 0" |
93 | 99 | } |
94 | 100 | ], |
95 | 101 | "menus": { |
|
154 | 160 | "title": "Shiny", |
155 | 161 | "properties": { |
156 | 162 | "shiny.previewType": { |
| 163 | + "order": 1, |
157 | 164 | "scope": "window", |
158 | 165 | "type": "string", |
159 | 166 | "description": "Where should the Shiny app preview open?", |
|
172 | 179 | ] |
173 | 180 | }, |
174 | 181 | "shiny.timeoutOpenBrowser": { |
| 182 | + "order": 2, |
175 | 183 | "type": "integer", |
176 | 184 | "default": 10, |
177 | 185 | "description": "Maximum wait time (in seconds) for the Shiny app to be ready before opening the browser." |
178 | 186 | }, |
179 | | - "shiny.python.port": { |
180 | | - "type": "integer", |
181 | | - "default": 0, |
182 | | - "description": "The port number Shiny should listen on when running a Shiny for Python app. (Use 0 to choose a random port.)" |
183 | | - }, |
184 | | - "shiny.python.autoreloadPort": { |
185 | | - "type": "integer", |
186 | | - "default": 0, |
187 | | - "description": "The port number Shiny should use for a supplemental WebSocket channel it uses to support reload-on-save. (Use 0 to choose a random port.)" |
188 | | - }, |
189 | | - "shiny.python.debugJustMyCode": { |
190 | | - "type": "boolean", |
191 | | - "default": true, |
192 | | - "description": "When running the \"Debug Shiny App\" command, only step through user-written code. Disable this to allow stepping through library code." |
193 | | - }, |
194 | | - "shiny.r.port": { |
195 | | - "type": "integer", |
196 | | - "default": 0, |
197 | | - "description": "The port number Shiny should listen on when running a Shiny for R app. (Use 0 to choose a random port.)" |
| 187 | + "shiny.runFrom": { |
| 188 | + "order": 3, |
| 189 | + "scope": "window", |
| 190 | + "type": "string", |
| 191 | + "description": "Default working directory for running Shiny apps", |
| 192 | + "enum": [ |
| 193 | + "projectRoot", |
| 194 | + "appDirectory" |
| 195 | + ], |
| 196 | + "default": "projectRoot", |
| 197 | + "enumDescriptions": [ |
| 198 | + "Run apps from the workspace root directory", |
| 199 | + "Run apps from the directory containing the app file" |
| 200 | + ] |
198 | 201 | }, |
199 | | - "shiny.r.devmode": { |
200 | | - "type": "boolean", |
201 | | - "default": true, |
202 | | - "markdownDescription": "Enable dev mode when running a Shiny for R app by running `shiny::devmode()` before launching the app." |
| 202 | + "shiny.runFromOverrides": { |
| 203 | + "order": 4, |
| 204 | + "scope": "resource", |
| 205 | + "type": "object", |
| 206 | + "description": "Override working directory for specific app files. This setting maps workspace-relative file paths (using forward slashes) to workspace-relative directory paths. You can use an empty string (`\"\"`) to run an app from the project root. Note that you can use the \"Run this app from...\" command from an active app file to configure this setting for that app.", |
| 207 | + "default": {}, |
| 208 | + "patternProperties": { |
| 209 | + "^.*\\.(py|R)$": { |
| 210 | + "type": "string" |
| 211 | + } |
| 212 | + } |
203 | 213 | }, |
204 | 214 | "shiny.shinylive.appMode": { |
| 215 | + "order": 5, |
205 | 216 | "type": "string", |
206 | 217 | "default": "ask", |
207 | 218 | "description": "Which Shinylive mode to use when creating a Shinylive app.", |
|
217 | 228 | ] |
218 | 229 | }, |
219 | 230 | "shiny.shinylive.openAction": { |
| 231 | + "order": 6, |
220 | 232 | "type": "string", |
221 | 233 | "default": "ask", |
222 | 234 | "description": "Choose the default action upon creating a Shinylive link.", |
|
232 | 244 | ] |
233 | 245 | }, |
234 | 246 | "shiny.shinylive.includeHeader": { |
| 247 | + "order": 7, |
235 | 248 | "type": "boolean", |
236 | 249 | "default": true, |
237 | 250 | "description": "Include the Shiny header when creating Shinylive app links. Only relevant for app mode Shinylive links." |
238 | 251 | }, |
239 | 252 | "shiny.shinylive.host": { |
| 253 | + "order": 8, |
240 | 254 | "type": "string", |
241 | 255 | "default": "https://shinylive.io", |
242 | 256 | "description": "The default Shinylive host to use when creating Shinylive app links.", |
|
248 | 262 | "Uses the latest released version of Shiny in Python or R.", |
249 | 263 | "Uses the latest development version of Shiny in Python or R." |
250 | 264 | ] |
| 265 | + }, |
| 266 | + "shiny.python.port": { |
| 267 | + "order": 9, |
| 268 | + "type": "integer", |
| 269 | + "default": 0, |
| 270 | + "description": "The port number Shiny should listen on when running a Shiny for Python app. (Use 0 to choose a random port.)" |
| 271 | + }, |
| 272 | + "shiny.python.autoreloadPort": { |
| 273 | + "order": 10, |
| 274 | + "type": "integer", |
| 275 | + "default": 0, |
| 276 | + "description": "The port number Shiny should use for a supplemental WebSocket channel it uses to support reload-on-save. (Use 0 to choose a random port.)" |
| 277 | + }, |
| 278 | + "shiny.python.debugJustMyCode": { |
| 279 | + "order": 11, |
| 280 | + "type": "boolean", |
| 281 | + "default": true, |
| 282 | + "description": "When running the \"Debug Shiny App\" command, only step through user-written code. Disable this to allow stepping through library code." |
| 283 | + }, |
| 284 | + "shiny.r.port": { |
| 285 | + "order": 12, |
| 286 | + "type": "integer", |
| 287 | + "default": 0, |
| 288 | + "description": "The port number Shiny should listen on when running a Shiny for R app. (Use 0 to choose a random port.)" |
| 289 | + }, |
| 290 | + "shiny.r.devmode": { |
| 291 | + "order": 13, |
| 292 | + "type": "boolean", |
| 293 | + "default": true, |
| 294 | + "markdownDescription": "Enable dev mode when running a Shiny for R app by running `shiny::devmode()` before launching the app." |
251 | 295 | } |
252 | 296 | } |
253 | 297 | }, |
|
0 commit comments