id = "vscode" name = "Visual Studio Code" homepage = "https://code.visualstudio.com" description = "Code editing. Redefined." icon = "theSVG:visual-studio-code" # `code-insiders` is the same editor on a nightly channel; it keeps the same # layout under a "Code - Insiders" directory, so both binaries land here. executables = ["code", "code-insiders"] [dotfiles] # https://code.visualstudio.com/docs/configure/settings — the user settings # file is %APPDATA%\Code\User\settings.json on Windows, # $HOME/Library/Application Support/Code/User/settings.json on macOS and # $HOME/.config/Code/User/settings.json on Linux. That trio is `[appData]`, # which is the same thing Electron's own app.getPath("appData") returns — VS # Code is an Electron app and takes the directory from it — so one spelling # stands for all three and $XDG_CONFIG_HOME is followed on Linux. # keybindings.json and the snippets/ folder sit beside it in the same User # directory (https://code.visualstudio.com/docs/editing/userdefinedsnippets). paths = [ "[appData]/Code/User/settings.json", "[appData]/Code/User/keybindings.json", "[appData]/Code/User/snippets/", "[appData]/Code - Insiders/User/settings.json", "[appData]/Code - Insiders/User/keybindings.json", "[appData]/Code - Insiders/User/snippets/", ] # The rest of the User directory — globalStorage/, workspaceStorage/, History/ # — is per-workspace state, and installed extensions live in ~/.vscode/. None # of it is named above, so there is nothing to carve out of what is. # Accounts sign-in tokens go to the OS credential store (Keychain, libsecret, # DPAPI), not into the User directory. secret = [] # Settings Sync, built into VS Code and signed in with a Microsoft or # GitHub account, already carries settings, keybindings and snippets between # machines. Taking these over means two writers on one file. self_sync = true # No machine_lines: settings.json is a preferences file. A user who points an # interpreter or a shell at an absolute path has put a machine-local value in # it, but which key that is differs per extension, and inventing a list would # strand the settings everybody does want to carry. [commands] format = 1 label = "Open in VS Code" description = "Open files and folders, jump to a line, and manage extensions. Diff/merge, debugging and profiling flags are left out." quality = "ai-draft" base = "fig:code" parser = { end_of_options = "--", interleave = "permute", long_equals = true, short_attached = true, short_bundles = false } [[commands.source]] id = "fig" kind = "completion" url = "https://github.com/withfig/autocomplete/blob/master/src/code.ts" license = "MIT" [[commands.field]] id = "paths" label = "Files or folders" description = "Files or folders to open; leave empty to open the app only." type = "path" position = 0 multiple = true path = { kind = "any", role = "input" } sources = ["fig"] [[commands.field]] id = "new_window" label = "New window" type = "boolean" option = ["--new-window", "-n"] sources = ["fig"] [[commands.field]] id = "reuse_window" label = "Reuse window" type = "boolean" option = ["--reuse-window", "-r"] sources = ["fig"] [[commands.field]] id = "wait" label = "Wait until closed" description = "Do not return until the opened files are closed." type = "boolean" option = ["--wait", "-w"] sources = ["fig"] [[commands.field]] id = "goto" label = "Go to file:line:column" description = "Open a file at a position, written as file:line[:character]." type = "string" option = ["--goto", "-g"] sources = ["fig"] [[commands.field]] id = "add" label = "Add folder to window" type = "path" option = ["--add", "-a"] path = { kind = "directory", role = "input" } sources = ["fig"] [[commands.field]] id = "profile" label = "Settings profile" type = "string" option = ["--profile"] sources = ["fig"] [[commands.field]] id = "disable_extensions" label = "Disable all extensions" type = "boolean" option = ["--disable-extensions"] sources = ["fig"] [[commands.field]] id = "list_extensions" label = "List installed extensions" type = "boolean" option = ["--list-extensions"] sources = ["fig"] [[commands.field]] id = "show_versions" label = "Show extension versions" description = "Only meaningful together with --list-extensions." type = "boolean" option = ["--show-versions"] sources = ["fig"] [[commands.field]] id = "install_extension" label = "Install extension" description = "Extension id (publisher.name[@version]) or path to a VSIX." type = "string" option = ["--install-extension"] sources = ["fig"] [[commands.field]] id = "uninstall_extension" label = "Uninstall extension" description = "Extension id (publisher.name)." type = "string" option = ["--uninstall-extension"] effect = "delete" sources = ["fig"] [[commands.task]] id = "open" label = "Open files or folders" fields = ["paths", "new_window", "reuse_window", "wait"] required = ["paths"] [[commands.task]] id = "goto" label = "Open at a line" fields = ["goto", "reuse_window"] required = ["goto"] [[commands.task]] id = "list_ext" label = "List extensions" fields = ["list_extensions", "show_versions"] set = { list_extensions = [true] } [[commands.task]] id = "install_ext" label = "Install an extension" fields = ["install_extension"] required = ["install_extension"] [[commands.group]] id = "basic" label = "Basic" fields = ["paths", "new_window", "reuse_window", "wait", "goto"] [[commands.group]] id = "advanced" label = "Advanced" fields = ["profile", "disable_extensions", "add", "list_extensions", "show_versions", "install_extension", "uninstall_extension"]