Vscode-markdown: Intellisense order is wrong

Created on 28 Mar 2019  ·  9Comments  ·  Source: yzhang-gh/vscode-markdown

What is the problem?

Intellisense order is wrong

How can I reproduce it?

For example, input \delta, the first is Delta.

这个问题我很久以前提到过,这个扩展的提示是大写优先,#233 ,也向 vscode 反馈了 https://github.com/Microsoft/vscode/issues/71062 ,他们认为是扩展的问题。vscode 那边也有几个关于智能提示排序的 issue 但似乎没有关于大小写的。

顺便说一下, 这里的 xrightarrow 写了两个。https://github.com/yzhang-gh/vscode-markdown/blob/647994b1872c542a3ab4f938d9ac64f5db99a1c1/src/completion.ts#L40

Most helpful comment

因为要安装好多包,但我从没用过nodejs,所以还在尝试 :sweat_smile:

All 9 comments

我怀疑有可能和提示列表的顺序有关,但唯一一个小写字母在大写字母前面的例子是我在上面引用的那个 xrightarrow ,但还是重复的,所以没法确定原因。编译也没成功 :sweat_smile:

顺便说一下, 这里的 xrightarrow 写了两个

哈哈,好眼力

排序问题

这个还真不知道 vscode 的机制是什么,你可以把大小写顺序改变测试一下

编译的话最近按 vscode 的推荐改用 webpack 了,但是应该不需要什么特殊的步骤,F5 调试就好
不过每次改了代码需要关掉调试窗口重新 F5,不像以前可以直接 reload

因为要安装好多包,但我从没用过nodejs,所以还在尝试 :sweat_smile:

测试了一下,似乎不是这个原因。我看了 python 扩展的源码,也没看出区别,但应该可以用这种方法解决问题。https://github.com/Microsoft/vscode-python/blob/a86bf11f9c43dd378274dc7503b6f32ae571e1d4/src/client/providers/completionSource.ts#L102

LaTeX workshop 似乎也遇到了这个问题

https://github.com/James-Yu/LaTeX-Workshop/blob/8adc8de340aeb25deac1d7c7d609bb5f9d908ed5/src/providers/completer/command.ts#L208-L211

command.sortText = item.command.replace(/^[a-zA-Z]/, c => {
            const n = c.match(/[a-z]/) ? c.toUpperCase().charCodeAt(0) : c.toLowerCase().charCodeAt(0)
            return n !== undefined ? n.toString(16) : c
})

但我不知道该加在哪

我测试了,可以工作,但因为有 LARGE 和 Large 这样的命令,需要交换所有字母的大小写而不仅是首字母,所以还是等你来修复吧,我力所不及 :joy:

嗯嗯,谢谢,周末有时间看看

It should be fixed in the dev build.

谢谢。工作正常 :+1:

Was this page helpful?
0 / 5 - 0 ratings

Related issues

jerry-sky picture jerry-sky  ·  4Comments

maoturing picture maoturing  ·  4Comments

smallprogram picture smallprogram  ·  3Comments

akurani picture akurani  ·  4Comments

ichirou2910 picture ichirou2910  ·  3Comments