feat: optimize ICompletionItem type and add ICompletionList type #102
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
简介
优化自动补全相关接口 #99
主要变更
ICompletionItem
接口,这个接口与 monaco 内置的CompletionItem
几乎完全相同,区别是ICompletionItem
的range
和insertText
是可选的,因为 Monaco SQL Lanuages 在内部处理了这两个烦人的属性ICompletionList
接口,这个接口与 monaco 内置的CompletionList
几乎相同,区别是ICompletionList
的suggestions
属性的类型为ICompletionItem[]
compeltionService
返回值的类型同步变更Why
在 PR #100 中支持了自动补全功能返回值中的
incomplete
属性,这是一个很好的PR。这个PR 也从侧面说明自动补全的相关逻辑可能封装的痕迹过重,我希望
competetionService
的返回值尽量与 monaco 内置的provideCompletionItems
返回值类型保持一致,这可以降低 Monaco SQL Languages 的上手成本。另外在此之前,
ICompletionItem
接口的detail
成员被设置为必填,但实际上这是不必要的