Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
掘金者说
vscode
提交
a869c0fa
V
vscode
项目概览
掘金者说
/
vscode
与 Fork 源项目一致
从无法访问的项目Fork
通知
1
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
DevOps
流水线
流水线任务
计划
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
V
vscode
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
DevOps
DevOps
流水线
流水线任务
计划
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
流水线任务
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
提交
a869c0fa
编写于
1月 21, 2020
作者:
P
Pine Wu
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
WIP
上级
6db93cf5
变更
9
展开全部
隐藏空白更改
内联
并排
Showing
9 changed file
with
2077 addition
and
32 deletion
+2077
-32
extensions/css-language-features/client/src/cssMain.ts
extensions/css-language-features/client/src/cssMain.ts
+6
-5
extensions/css-language-features/client/src/randomWord.ts
extensions/css-language-features/client/src/randomWord.ts
+2018
-0
src/vs/editor/common/modes.ts
src/vs/editor/common/modes.ts
+11
-7
src/vs/editor/contrib/suggest/media/suggest.css
src/vs/editor/contrib/suggest/media/suggest.css
+8
-1
src/vs/editor/contrib/suggest/suggestController.ts
src/vs/editor/contrib/suggest/suggestController.ts
+1
-1
src/vs/editor/contrib/suggest/suggestWidget.ts
src/vs/editor/contrib/suggest/suggestWidget.ts
+9
-8
src/vs/monaco.d.ts
src/vs/monaco.d.ts
+10
-2
src/vs/vscode.proposed.d.ts
src/vs/vscode.proposed.d.ts
+12
-6
src/vs/workbench/api/common/extHostTypes.ts
src/vs/workbench/api/common/extHostTypes.ts
+2
-2
未找到文件。
extensions/css-language-features/client/src/cssMain.ts
浏览文件 @
a869c0fa
...
...
@@ -9,6 +9,7 @@ import { commands, CompletionItem, CompletionItemKind, ExtensionContext, languag
import
{
Disposable
,
LanguageClient
,
LanguageClientOptions
,
ServerOptions
,
TransportKind
,
ProvideCompletionItemsSignature
}
from
'
vscode-languageclient
'
;
import
*
as
nls
from
'
vscode-nls
'
;
import
{
getCustomDataPathsFromAllExtensions
,
getCustomDataPathsInAllWorkspaces
}
from
'
./customData
'
;
import
{
generateRandomLabel
}
from
'
./randomWord
'
;
const
localize
=
nls
.
loadMessageBundle
();
...
...
@@ -58,12 +59,12 @@ export function activate(context: ExtensionContext) {
if
(
item
.
kind
===
CompletionItemKind
.
Color
)
{
item
.
label2
=
{
name
:
item
.
label
,
type
:
(
item
.
documentation
as
string
)
signature
:
'
(my, signature)
'
,
qualifier
:
'
my.qualifier
'
,
type
:
(
item
.
documentation
as
string
),
};
}
const
range
=
item
.
range
;
if
(
range
instanceof
Range
&&
range
.
end
.
isAfter
(
position
)
&&
range
.
start
.
isBeforeOrEqual
(
position
))
{
item
.
range
=
{
inserting
:
new
Range
(
range
.
start
,
position
),
replacing
:
range
};
}
else
{
item
.
label2
=
generateRandomLabel
(
item
.
label
);
}
}
// testing the new completion
...
...
extensions/css-language-features/client/src/randomWord.ts
0 → 100644
浏览文件 @
a869c0fa
此差异已折叠。
点击以展开。
src/vs/editor/common/modes.ts
浏览文件 @
a869c0fa
...
...
@@ -370,19 +370,23 @@ export let completionKindFromString: {
})();
export
interface
CompletionItemLabel
{
/**
* The
name of this completion item's label.
* The
function or variable
*/
name
:
string
;
// The signature, without the return type. is render directly after `name`
// signature?: string; // parameters
// The fully qualified name, like package name, file path etc
// qualifier?: string;
/**
* The signature, without the return type. is render directly after `name`
*/
signature
?:
string
;
/**
* The fully qualified name, like package name, file path etc
*/
qualifier
?:
string
;
/**
* The return-type of a function or type of a property, variable
* The return-type of a function or type of a property, variable
etc
*/
type
?:
string
;
}
...
...
src/vs/editor/contrib/suggest/media/suggest.css
浏览文件 @
a869c0fa
...
...
@@ -132,13 +132,19 @@
opacity
:
1
;
}
/** signature, qualifier, type/details opacity **/
.monaco-editor
.suggest-widget
.monaco-list
.monaco-list-row
>
.contents
>
.main
>
.left
>
.signature-label
,
.monaco-editor
.suggest-widget
.monaco-list
.monaco-list-row
>
.contents
>
.main
>
.right
>
.qualifier-label
,
.monaco-editor
.suggest-widget
.monaco-list
.monaco-list-row
>
.contents
>
.main
>
.right
>
.details-label
{
opacity
:
0.7
;
}
/** Type Info and icon next to the label in the focused completion item **/
.monaco-editor
.suggest-widget
.monaco-list
.monaco-list-row
>
.contents
>
.main
>
.right
>
.details-label
{
margin-left
:
0.8em
;
overflow
:
hidden
;
text-overflow
:
ellipsis
;
opacity
:
0.7
;
white-space
:
nowrap
;
}
...
...
@@ -172,6 +178,7 @@
/** ReadMore: show on hover **/
.monaco-editor
.suggest-widget
.monaco-list
.monaco-list-row
>
.contents
>
.main
>
.right
{
overflow
:
hidden
;
margin-left
:
16px
;
}
.monaco-editor
.suggest-widget
.monaco-list
.monaco-list-row
>
.contents
>
.main
>
.right
>
.readMore
{
...
...
src/vs/editor/contrib/suggest/suggestController.ts
浏览文件 @
a869c0fa
...
...
@@ -43,7 +43,7 @@ import { SuggestRangeHighlighter } from 'vs/editor/contrib/suggest/suggestRangeH
* Stop suggest widget from disappearing when clicking into other areas
* For development purpose only
*/
const
_sticky
=
fals
e
;
const
_sticky
=
tru
e
;
class
LineSuffix
{
...
...
src/vs/editor/contrib/suggest/suggestWidget.ts
浏览文件 @
a869c0fa
...
...
@@ -49,8 +49,8 @@ interface ISuggestionTemplateData {
/**
* Flexbox
* < --
left --> <--- right ---
>
* <icon><label>
<details
><readmore>
* < --
----- left ------- > < -------- right --------
>
* <icon><label>
<signature> <qualifier><type
><readmore>
*/
left
:
HTMLElement
;
right
:
HTMLElement
;
...
...
@@ -59,8 +59,10 @@ interface ISuggestionTemplateData {
colorspan
:
HTMLElement
;
iconLabel
:
IconLabel
;
iconContainer
:
HTMLElement
;
signatureLabel
:
HTMLElement
;
qualifierLabel
:
HTMLElement
;
/**
* Showing either `CompletionItem#details` or `CompletionItemLabel#
nam
e`
* Showing either `CompletionItem#details` or `CompletionItemLabel#
typ
e`
*/
detailsLabel
:
HTMLElement
;
readMore
:
HTMLElement
;
...
...
@@ -138,11 +140,6 @@ class ItemRenderer implements IListRenderer<CompletionItem, ISuggestionTemplateD
const
text
=
append
(
container
,
$
(
'
.contents
'
));
const
main
=
append
(
text
,
$
(
'
.main
'
));
/**
* Flexbox
* < -- left --> <--- right --->
* <icon><label> <details><readmore>
*/
data
.
left
=
append
(
main
,
$
(
'
span.left
'
));
data
.
right
=
append
(
main
,
$
(
'
span.right
'
));
...
...
@@ -151,6 +148,8 @@ class ItemRenderer implements IListRenderer<CompletionItem, ISuggestionTemplateD
data
.
iconLabel
=
new
IconLabel
(
data
.
left
,
{
supportHighlights
:
true
,
supportCodicons
:
true
});
data
.
disposables
.
add
(
data
.
iconLabel
);
data
.
signatureLabel
=
append
(
data
.
left
,
$
(
'
span.signature-label
'
));
data
.
qualifierLabel
=
append
(
data
.
right
,
$
(
'
span.qualifier-label
'
));
data
.
detailsLabel
=
append
(
data
.
right
,
$
(
'
span.details-label
'
));
data
.
readMore
=
append
(
data
.
right
,
$
(
'
span.readMore.codicon.codicon-info
'
));
...
...
@@ -241,6 +240,8 @@ class ItemRenderer implements IListRenderer<CompletionItem, ISuggestionTemplateD
data
.
detailsLabel
.
textContent
=
(
suggestion
.
detail
||
''
).
replace
(
/
\n
.*$/m
,
''
);
removeClass
(
data
.
right
,
'
always-show-details
'
);
}
else
{
data
.
signatureLabel
.
textContent
=
(
suggestion
.
label
.
signature
||
''
).
replace
(
/
\n
.*$/m
,
''
);
data
.
qualifierLabel
.
textContent
=
(
suggestion
.
label
.
qualifier
||
''
).
replace
(
/
\n
.*$/m
,
''
);
data
.
detailsLabel
.
textContent
=
(
suggestion
.
label
.
type
||
''
).
replace
(
/
\n
.*$/m
,
''
);
addClass
(
data
.
right
,
'
always-show-details
'
);
}
...
...
src/vs/monaco.d.ts
浏览文件 @
a869c0fa
...
...
@@ -5198,11 +5198,19 @@ declare namespace monaco.languages {
export
interface
CompletionItemLabel
{
/**
* The
name of this completion item's label.
* The
function or variable
*/
name
:
string
;
/**
* The return-type of a function or type of a property, variable
* The signature, without the return type. is render directly after `name`
*/
signature
?:
string
;
/**
* The fully qualified name, like package name, file path etc
*/
qualifier
?:
string
;
/**
* The return-type of a function or type of a property, variable etc
*/
type
?:
string
;
}
...
...
src/vs/vscode.proposed.d.ts
浏览文件 @
a869c0fa
...
...
@@ -1386,18 +1386,24 @@ declare module 'vscode' {
}
export
interface
CompletionItemLabel
{
/**
* The function or variable
*/
name
:
string
;
// The signature, without the return type. is render directly after `name`
// signature?: string; // parameters
// The fully qualified name, like package name, file path etc
// qualifier?: string;
/**
* The signature, without the return type. is render directly after `name`
*/
signature
?:
string
;
/**
* The fully qualified name, like package name, file path etc
*/
qualifier
?:
string
;
// The return-type of a function or type of a property, variable etc
/**
* The return-type of a function or type of a property, variable etc
*/
type
?:
string
;
}
...
...
src/vs/workbench/api/common/extHostTypes.ts
浏览文件 @
a869c0fa
...
...
@@ -1358,8 +1358,8 @@ export enum CompletionItemTag {
export
interface
CompletionItemLabel
{
name
:
string
;
// signature?: string; // parameters
//
qualifier?: string;
signature
?:
string
;
qualifier
?:
string
;
type
?:
string
;
}
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录