Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Sensible IM switching lag on Linux #3

Open
Sduby22 opened this issue Aug 3, 2022 · 4 comments
Open

Sensible IM switching lag on Linux #3

Sduby22 opened this issue Aug 3, 2022 · 4 comments

Comments

@Sduby22
Copy link

Sduby22 commented Aug 3, 2022

alohaia/fcitx.nvim: no sensible lag when changing modes.
h-hg/fcitx.nvim: perceptible lag (~100ms) on mode switch.

NVIM v0.7.2
Build type: Release
LuaJIT 2.1.0-beta3
Compiled by builduser

runs on Manjaro Linux with fcitx5-remote

@h-hg
Copy link
Owner

h-hg commented Aug 8, 2022

I found that you have forked my repo and combined alohaia/fcitx.nvim and h-hg/fcitx.nvim.
In the early verison, I also used io.popen or os.execute to call fcitx-remote. However, the neovim will display the log message or the error message when using fcitx-remote in OSX. And it has been found in issue 2.
An simple way to reproduce it is that you replace the fcitx-remote -c / fcitx-remote -o with a program which writes log message. For exmaple,

#include <iostream>
using namespace std;
int main() {
  cout << "std out\n";
  cerr << "error out\n";
  clog << "log out\n";
  return 0;
}

I don't know why vim.fn.system doesn't display.

@Freed-Wu
Copy link

call fcitx-remote will bring some process fork cost. I think dbus will be a good method for those machine installed d-bus. ime.nvim and fcitx.vim switch IME by d-bus.

@h-hg
Copy link
Owner

h-hg commented Nov 23, 2024

You are right, but I am busy recently, welcome your PR.

call fcitx-remote will bring some process fork cost. I think dbus will be a good method for those machine installed d-bus. ime.nvim and fcitx.vim switch IME by d-bus.

@Freed-Wu
Copy link

Oh, I have used ime.nvim to support fcitx and ibus by D-Bus.

The only one disadvantage is it depends on dbus-proxy and lgi, lgi is a lua module written in C, so it need compile something when installing. fcitx.nvim use command line to call fcitx will not have the problem.

So if users are glad to compile something, they can use D-Bus. otherwise, call fcitx-remote in CLI.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants