✨ feat(vscode): 代码阅读的 FastAPI 接口多一个筛选属性「请求方法」(GET / POST …);库规则自己报的筛选属性由规则起名(LibraryRule.attributeNames)
This commit is contained in:
1 parent
ec34ace7cf
commit
b4e4879570
9 files changed
+107
-11
No files matched your search
@@ -466,7 +466,10 @@ export interface RuleCard {
|
||||
rows: PropertyRow[]
|
||||
/** 块自己的名字(类名)在源码里的范围:跳到的定义就是它时闪整块。 */
|
||||
defines?: SourceRange
|
||||
/** 规则自己的筛选属性,叠在宿主从原块推出的属性上(同 BlockShape.attributes);kind 总是上面的 kind,这里填了不算。 */
|
||||
/**
|
||||
* 规则自己的筛选属性,叠在宿主从原块推出的属性上(同 BlockShape.attributes);kind 总是上面的 kind,这里填了不算。
|
||||
* 属性和值的名字由规则给(LibraryRule.attributeNames)。
|
||||
*/
|
||||
attributes?: BlockAttributes
|
||||
/**
|
||||
* 并进这一块的子块(原块 children 里的对象本身):不再单独成块,内容由 rows 讲。
|
||||
@@ -580,6 +583,12 @@ export interface LibraryRule {
|
||||
* 查到几处就跳、挑,和语言扩展查到的一样。没给就不能在段上标引用。
|
||||
*/
|
||||
resolve?: (key: string, workspace: RuleWorkspace) => Promise<RuleLocation[]>
|
||||
/**
|
||||
* 规则自己报的筛选属性(RuleCard.attributes,例如 FastAPI 接口的 httpMethod)和值叫什么,同 Translator.attributeNames:
|
||||
* 用词归规则,按翻译插件的 displayLanguage 挑(没有翻译插件时是 undefined),没有这种语言的词表就用规则默认的那份。
|
||||
* 筛选栏的名字先取翻译插件给的,没给的再取规则给的;都没给的显示 id。
|
||||
*/
|
||||
attributeNames?: (displayLanguage: string | undefined) => AttributeNames
|
||||
}
|
||||
|
||||
export interface CodeReaderApi {
|
||||
|
||||
Reference in new issue
Block a user