记一次和 IntelliJ IDEA 的反馈

Table of Contents

起因

7月22日晚上发起的 feedback,反馈的问题是不能在 IDEA 中输入中文。症状挺奇怪的,按下两个键后选词框跳掉,只能输入英文。

于是就发了反馈。

I believe the snap version of IntelliJ IDEA 2022.1.4 contains the support for Asian characters input, like iBus or fcitx. However, I cannot type Chinese or Japanese characters in the IDEA editor.

当然我用的是 iBus,因为搜狗在 ubuntu 22.04 上跑得并不算很成功,所以干脆用 iBus 的 Intelligent Pinyin 了。

Thread

回复很快,不得不说不 JetBrain 的客服还是很给力的。

What do you mean by "cannot type"?
Is it similar to https://youtrack.jetbrains.com/issue/JBR-2460/Wrong-position-of-input-window-and-no-input-preview-with-fcitx-and-ubuntu-1304 ?

Screencast would be helpful.

事实上并不是同一个问题。在我看来非常 odd。当时我怀疑是 snap 的锅或者 Wayland 的锅,原因是 snap 软件如果不包括必要的 libraries 的话,它们就无法支持中文输入;还有就是恰好遇到了一些软件(典型如截图软件,以及 Wacom 的图形化设置界面,没有想到那个在 ubuntu 的设置里有)只支持 X11。

现在看来,其实如果不支持的话,干脆连选词框也不会出现的。

于是我表示:

No, I don’t think it is the same problem after my checking the thread.

I am currently using iBus. To be specific, when I input Japanese and Cantonese, it is totally okay. Yet when I turn to input Chinese via Intelligent Pinyin, I can only press 2 keys like the picture below. Within 2 alphabets it works, but once I typed more than 2 alphabets, the word box disappears and I have to switch to English input and switch back to Chinese.

I think it’s probably the snap version’s problem. Besides, I suspect that the Wayland in ubuntu 22.04 LTS could also have a difference, since most applications are for X11.

然后附上了一张截图。

Support engineer 表示:

Does it help to turn off iBus at System Settings | Language Support | Keyboard input method?

What is the version of iBus?

离谱的是,按照这个建议,我可以多按一个键了(

Well, it doesn’t help. The only difference is that I can type one more key now.

I am currently using iBus 1.5.26

这时候 IntelliJ 换了个 support engineer,看名字好像是中国人qwq

Hi,

Could you please click the IDE main menu Help | Edit Custom VM Options, add the -Drecreate.x11.input.method=true in it, and restart the IDE to see if it helps?

啊这,对 JVM 加选项恐怕帮不了吧。试了一下,果然。

Sorry to say that it does not work. I think it is the problem of the snap version of IDEA or Wayland, not the Java VM.

Does the snap version work well on Wayland? By the way, I heard that if the snap software does not contain necessary libraries of iBus or fcitx, then the user cannot type in these methods.

我还是坚持我原来的想法,所以想问是不是 snap 或者 Wayland 的问题。

于是得到回复:

The snap version should work with the Wayland too (the IDEA will run in the XWayland mode there)

Could you please download the native IDEA 2022.2 here and run it to see whether the Chinese input works in this version?

We recently fixed a iBus related issue (https://youtrack.jetbrains.com/issue/JBR-4394) in 2022.2 and I suspect it is related to your issues.

就是懒得试非 snap 版的才发起的 feedback,啊这。

不过用 snap 也是因为,.tar.gz的软件包不纳入包管理,对此我非常不爽。

XWayland 倒是涨姿势了。

本地一跑,native version 直接拉起了 snap 版本的 IDEA,真是尴尬。

遂部署了 ubuntu 22.04 的虚拟机来测试,发现没这个问题。

It works. On my local machine the idea.sh uses the snap version, so I tested in my virtual machine, and it works. (The VM is ubuntu 22.04, just like the system of my local machine)

Besides, I tested the Chinese input on my local machine in PyCharm and WebStorm, the problem is the same.

The way I downloaded IDEA was via sudo snap install intellij-idea-ultimate –classic, and I just noticed that the edge channel is recommended. The snap version in edge channel works well.

So, I think if I turn to the edge channel it will be fine. I wonder if there is a method that I can switch to the edge channel without losing my data. I do hope the default version can fix it.

发现能跑,我还以为是 edge channel 的原因。之前都没有注意过安装命令的差别。

Support engineer 表示没差。呃呃。

Besides, I tested the Chinese input on my local machine in PyCharm and WebStorm, the problem is the same.

Does the PyCharm, and WebStorm all 2022.2 versions here? We just updated the IDEA to 2022.2 in July 26 and PyCharm to 2022.2 yesterday (see the attached picture).
Please make sure all your local IDEs are all 2022.2 versions. Do you still see this issue in the PyCharm, WebStorm now?

So, I think if I turn to the edge channel it will be fine. I wonder if there is a method that I can switch to the edge channel without losing my data. I do hope the default version can fix it.

Currently, we use the same version for the stable/edge version. (see picture 1). There is a possibility that you used the 2022.1 and we haven’t released 2022.2 at that time and now you switch to the edge and update to 2022.2 after we updated.
You could use stable here because they are the same versions currently.

虽然说版本才更新没几天,但是作为天天保持更新的人,那必不可能。感觉这个问题光 feedback 恐怕没救了……所以直接 thank you 得了。

I am sure that all my IDEs are 2022.2. Regrettably, the problem is still there. It seems the problem should be my iBus settings or something, which is really weird.

Anyway, thank you for your help.

Support engineer 还挺贴心,泪目。

Do I understand correctly that IDEA 2022.2 works well with the Chinese input now in your computer but the PyCharm / WebStorm 2022.2 won’t?
It is a little odd. The PyCharm and WebStorm use the same code base as the IDEA 2022.2 so their behavior should be the same.

If the IDEA 2022.2 works in your case, you could install the Python plugins in File | Settings | Plugins which provide the same Python feature support as the PyCharm.
IDEA also includes all WebStorm features (but you need to install some plugins (like Vue plugin) for it).

If this might be your iBus setting problem, you may try using the steps which might help: https://wiki.archlinux.org/title/IBus#Integration

但是你没搞清楚我说了啥啊啊啊啊……

最后自己调出来了。

The situation is: all the IDEs work well in my virtual machine, while they did not work well in my local machine. That is why I conclude it must be the iBus settings or something outside the IDE.

Fortunately, I have figured out the reason. It was because in the preference page of iBus pinyin module, Intelligent Pinyin, I chose the UI style as "Compatibility".

That was the very difference I found between my local machine and my virtual machine which caused the input problem. Once I choose "Default" or "Compact", the problem is gone.

问 题 完 了。

总结

总之就是 IntelliJ 系的 IDE 对 iBus 的 UI 支持有点点问题。

JetBrain 的 feedback 体验还是很好的,社区支持也很好。但是一些比较 weird 的问题,可能就没法指望了。复杂一点的问题,feedback 周期可能要一星期甚至更多。

Share