本页内容
14. 附录
14.1 内置语言标识
arkts astro batch c clojure cmake common-lisp cpp csharp css csv dart diff dockerfile
dotenv elixir erlang fish fsharp go graphql groovy haskell hcl html http ignore ini jai
java javascript json julia kotlin latex less liquid log lua makefile markdown matlab
mermaid nix nunjucks objective-c objective-cpp ocaml perl php powershell properties
protobuf python r ruby rust sass scala scss shell sql svelte svg swift toml tsv tsx
typescript typst vue wxml wxs wxss xml yaml zig
完整列表以所用 Winc 版本状态栏中的语言列表为准。语言标识区分大小写。
14.2 常用内置命令标识
| 类别 | 标识 |
|---|---|
| 导航 | showCommands quickOpen goToSymbol goToLine goToDefinition findReferences goBack goForward |
| 文件 | newFile openFile openFolder save saveAs saveAll closeTab reopenClosed |
| 标签与分栏 | nextTab previousTab splitRight splitDown unsplit nextPane |
| 编辑 | toggleComment deleteLine moveLinesUp moveLinesDown copyLinesDown joinLines indentLines outdentLines |
| 多光标 | addCursorAbove addCursorBelow addNextOccurrence selectAllOccurrences |
| 文本变换 | transformToUppercase transformToLowercase sortLinesAscending trimTrailingWhitespace prettyPrintJson |
| 格式化 | format formatSelection fix |
| 查找 | find replace findInFiles replaceInFiles |
| 折叠 | fold unfold toggleFold foldAll unfoldAll |
| 书签 | toggleBookmark nextBookmark previousBookmark listBookmarks |
| 界面 | toggleSidebar showFiles showOutline zoomIn zoomOut settings keyboardShortcuts |
完整列表见「设置 → 键盘快捷键」。
14.3 主题颜色键
| 位置 | 键 |
|---|---|
colors | frame card popup text textMuted textDim accent accentFill selection error warning |
colors.gutter | normal current |
colors.git | modified added deleted conflict |
colors.syntax | text keyword type string number comment function decorator property interpolation |
colors.ansi | black red green yellow blue magenta cyan white brightBlack brightRed brightGreen brightYellow brightBlue brightMagenta brightCyan brightWhite |
内置主题标识包括 winc-day、winc-paper、sky、paper、vermilion、mist、veil-snow、veil-linen、winc-night 等,完整列表以「设置 → 外观」为准。
14.4 相关配置项
| 文件 | 配置项 | 说明 |
|---|---|---|
用户 config.json | plugins.enabled | 插件模块开关,默认为 false |
用户 config.json | plugins.active | 插件标识到启用状态的映射 |
用户 config.json | plugins.settings | 插件标识到设置值的映射 |
用户 config.json | plugins.dev | 开发插件目录的路径列表 |
state.json | approvedPlugins | 批准记录,由 Winc 维护 |
state.json | pluginInputs | 按项目记住的运行时输入值 |
项目 .winc/config.json | plugins.active | 按项目启用或关闭插件 |
14.5 清单字段一览
plugin.json
├── id 字符串 必需 小写字母、数字、. - _
├── name 字符串 必需
├── version 字符串 必需 语义化版本
├── winc 字符串 必需 比较式,以逗号分隔
├── description 字符串 可选
├── permissions 数组 可选 "process" 或 { kind, command }
└── contributes 对象 可选
├── themes [路径]
├── languages [{ language, extensions?, fileNames? }]
│ [{ id, name, extensions?, fileNames?, lineComments?, blockComments?,
│ nestedComments?, indentUnit?, indentAfter?, singleQuotes?,
│ backticks?, tripleQuotes?, surround?, nameChars?, grammar? }]
├── grammarFragments [路径]
├── languageServers [{ language, command }] 启动程序
├── formatters [{ language, command }] 启动程序
├── fixers [{ language, command }] 启动程序
├── snippets [{ language, path }]
├── keybindings [{ key, command | snippet, language? }]
├── commands [{ id, title, command, args?, cwd?, env?, in }] 启动程序
├── menus [{ command, where, title?, when? }]
├── buttons [{ command, where, title, icon?, when? }]
├── settings [{ key, title, description?, type, default, options?, optionLabels? }]
├── inputs [{ key, title, description?, type, default?, required?, remember?,
│ placeholder?, min?, max?, options?, optionLabels?, extensions? }]
└── dialogs [{ id, title, description?, fields?, footer?, platforms? }]