Closed mateusz28 closed 1 year ago
I'll answer my own question. Field detail in tabnine request response contains percent value (probably representing accuracy). To achieve my goal I've created simple patch
diff --git a/src/index.ts b/src/index.ts
index 8578c6a..784bc3f 100644
--- a/src/index.ts
+++ b/src/index.ts
@@ -198,7 +198,8 @@ export async function activate(context: ExtensionContext): Promise<void> {
if (args.entry.documentation) {
item.documentation = formatDocumentation(args.entry.documentation)
}
- item.detail = args.entry.detail ? args.entry.detail : args.detailMessage
+ //item detail shows full multiline newText content
+ item.detail = args.entry.detail ? newText : args.detailMessage
let detail = item.detail || ''
if (detail == DEFAULT_DETAIL || [
'Buy a license',
@@ -223,6 +224,8 @@ export async function activate(context: ExtensionContext): Promise<void> {
if (pre.indexOf('TabNine::') !== -1) {
item.filterText = pre
}
+ //label is new_prefix up to newline
+ item.label = `${new_prefix.split('\n')[0]}~`
return item
}
How can we enable this by default?
Hi, is there any way to preview final look of long multi-line suggestion? It looks cumbersome in preview pop-up when long snippet suggestion is present. Currently it looks like this for me:
Perfect solution would be to shorten suggestion visible in complete popup and show it similarly to coc-snippets:
My configuration: