From 1b77c5b9d457daab8c21755a9448e7df408d12a0 Mon Sep 17 00:00:00 2001 From: hbybyyang <2451759073@qq.com> Date: Sat, 19 Sep 2020 15:00:20 +0800 Subject: [PATCH] =?UTF-8?q?=E5=8E=BB=E6=8E=89=E5=A4=9A=E9=9F=B3=E5=AD=97?= =?UTF-8?q?=E9=80=89=E9=A1=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- lib/GetChineseExpression.js | 2 +- package.json | 12 ------------ ...0\241\245\345\205\250\345\256\236\347\216\260.js" | 3 +-- 3 files changed, 2 insertions(+), 15 deletions(-) diff --git a/lib/GetChineseExpression.js b/lib/GetChineseExpression.js index ddfce5e..06cef0d 100644 --- a/lib/GetChineseExpression.js +++ b/lib/GetChineseExpression.js @@ -10,7 +10,7 @@ module.exports = function 获得中文字符表示({ 表示方法, 文本, 选 } if (表示方法.indexOf('拼音')) { var 结果 = null - 结果 = 拼音(文本, { heteronym: 选项.使用多音字 == 'yes', style: 拼音.STYLE_NORMAL }) + 结果 = 拼音(文本, { heteronym: true, style: 拼音.STYLE_NORMAL }) 结果 = 结果.map(a => a.map(a => 转换为大写(a[0]) + a.substring(1))) 结果 = 多重笛卡尔积(结果).map(a => a.join('')) if (表示方法 != "全拼") diff --git a/package.json b/package.json index 4a8e72a..3b2659a 100755 --- a/package.json +++ b/package.json @@ -50,18 +50,6 @@ "谷歌拼音输入法(需能访问谷歌api)", "百度搜索联想" ] - }, - "ChineseInputAssistant.InputMethod_polyphone": { - "type": "string", - "default": "no", - "enum": [ - "no", - "yes" - ], - "enumDescriptions": [ - "不使用多音字", - "使用多音字" - ] } } }, diff --git "a/\350\241\245\345\205\250\345\256\236\347\216\260.js" "b/\350\241\245\345\205\250\345\256\236\347\216\260.js" index 2a5a898..f874efe 100755 --- "a/\350\241\245\345\205\250\345\256\236\347\216\260.js" +++ "b/\350\241\245\345\205\250\345\256\236\347\216\260.js" @@ -45,7 +45,6 @@ async function provideCompletionItems(document, position, token, context) { var 用户配置 = {} 用户配置.使用输入法 = vscode.workspace.getConfiguration('ChineseInputAssistant').get("InputMethod") - 用户配置.使用多音字 = vscode.workspace.getConfiguration('ChineseInputAssistant').get("InputMethod_polyphone") 用户配置.提示方式 = vscode.workspace.getConfiguration('中文代码快速补全').get("提示方式") // log('用户配置', 用户配置) @@ -109,7 +108,7 @@ async function provideCompletionItems(document, position, token, context) { 补全项 = 补全项.map(a => R.set(R.lensProp('label'), `${a.label}\t${获得中文字符表示({ 表示方法: 用户配置.提示方式, 文本: a.label, - 选项: { 使用多音字: 用户配置.使用多音字 } + 选项: {} })}`, a)) log('补全项', 补全项.map(a => a.label)) -- Gitee