✨ feat(vscode): 代码阅读的块种类只画图标(lucide,种类色),种类名放进鼠标停上去的提示和读屏文字;库规则给自己的图标
This commit is contained in:
1 parent
33a1b5d57c
commit
1dfc0c7b1e
19 files changed
+185
-56
No files matched your search
@@ -21,6 +21,8 @@ const APP_KIND = 'celery.app'
|
||||
const BEAT_KIND = 'celery.beat'
|
||||
const APP_COLOR: ThemeColor = { dark: '#98c379', light: '#4d7f17' }
|
||||
const BEAT_COLOR: ThemeColor = { dark: '#56b6c2', light: '#127f8c' }
|
||||
const APP_ICON = 'server-cog'
|
||||
const BEAT_ICON = 'calendar-clock'
|
||||
|
||||
/** `Celery(...)` 的位置参数依次是哪个参数(celery.app.base.Celery.__init__)。 */
|
||||
const APP_PARAMETERS = ['main', 'loader', 'backend', 'amqp', 'events', 'log', 'control', 'set_as_current', 'tasks', 'broker', 'include', 'changes', 'config_source', 'fixups', 'task_cls', 'autofinalize', 'namespace', 'strict_typing']
|
||||
@@ -500,7 +502,7 @@ function beatBlock(app: Node, schedule: Node, settings: [string, Node][], doc: N
|
||||
items: entries.map(entry => entryItem(entry, withOptions, env)),
|
||||
},
|
||||
]
|
||||
return { kind: BEAT_KIND, badge: { label: words.beatKind, color: BEAT_COLOR }, rows, absorbs: [] }
|
||||
return { kind: BEAT_KIND, badge: { label: words.beatKind, color: BEAT_COLOR, icon: BEAT_ICON }, rows, absorbs: [] }
|
||||
}
|
||||
|
||||
// ─── Celery 应用 ──────────────────────────────────────────────────────────────
|
||||
@@ -527,7 +529,7 @@ function appBlock(target: Node, call: Call, doc: Node | undefined, env: Env): Ru
|
||||
]
|
||||
return {
|
||||
kind: APP_KIND,
|
||||
badge: { label: words.appKind, color: APP_COLOR },
|
||||
badge: { label: words.appKind, color: APP_COLOR, icon: APP_ICON },
|
||||
rows,
|
||||
...(target.type === 'identifier' && { defines: range(target) }),
|
||||
absorbs: [],
|
||||
|
||||
Reference in new issue
Block a user