Git Product home page Git Product logo

Comments (11)

keaising avatar keaising commented on June 13, 2024 1

好像是**人?

你的截图里显示你用的就是 Fcitx,不知道你的 fcitx5-remote 是咋来的,不是你自己改名字的吧?如果是你自己改名字的话就改回去,用 fcitx-remote 就好

由于获取不到当前输入法的名字,所以 im-select.nvim 对 fcitx-remote 只支持到开启和关闭输入法,不支持在多个输入法之间切换

还有一个问题是你的输入法分组可能也有问题, im-select.nvim 不支持切换分组,我不知道有多个分组的情况下会发生什么,只能你自己用 fcitx-remote 在命令行里试试了

im-select.nvim 本质上只是帮你在合适的时机调用 fcitx-remote,所以你得先确保它能正常用

from im-select.nvim.

keaising avatar keaising commented on June 13, 2024

Have you tried to execute fcitx5-remote -n in your shell or :!fcitx5-remote -n in nvim command mode?

Could you please provide the result?

from im-select.nvim.

suinming avatar suinming commented on June 13, 2024

Thanks for your reply.
The following is the result in shell.
image
The following is the result in neovim.
image

from im-select.nvim.

keaising avatar keaising commented on June 13, 2024

You should make sure fcitx5-remote is included in nvim's path first.

im-select.nvim depends on fcitx5-remote to switch input methods.

from im-select.nvim.

keaising avatar keaising commented on June 13, 2024

BTW, your config default_im_select = "com.apple.keylayout.ABC" is not proper for fcitx5, it is default IM for macOS

from im-select.nvim.

suinming avatar suinming commented on June 13, 2024
  1. I set the environment variable in zsh so the fcitx5-remote is included in nvim's path
  2. change my nvim config to default_im_select = keyboard-us
    image
    But the plugins still not work. Any advice??

from im-select.nvim.

keaising avatar keaising commented on June 13, 2024

It seams that you use a different fcitx5-remote version than me, your fcitx5-remote is more like a fcitx-remote

Maybe you can:

  1. Make a alias export fcitx-remote=fcitx5-remote
  2. Make sure alias fcitx-remote works well in your nvim
  3. Set default command to fcitx-remote in config, e.g. default_command = 'fcitx-remote'
  4. Set default_im_select = 1

In this method you can only activation/inactivate IM, use fcitx5-remote as fcitx-remote

from im-select.nvim.

suinming avatar suinming commented on June 13, 2024

我比較好奇fcitx5-remote -n-n 這個flag的意義?因為似乎沒有這個-n的選項

from im-select.nvim.

keaising avatar keaising commented on June 13, 2024

我装的 fcitx5 自带的 fcitx5-remote 有这个选项,意思是获取当前输入法的名字

你截图里的 fcitx5-remote 的行为和输出跟我安装的 fcitx 自带的 fcitx-remote 一致

from im-select.nvim.

suinming avatar suinming commented on June 13, 2024

首先,非常謝謝你的回覆。我蠻確定我使用的是fcitx5,還是沒弄懂為何沒有fcitx5-remote -n這個指令可以用。
但還是想分享一下我的處理方式:

    vim.api.nvim_create_autocmd({ "InsertLeave" }, {
      pattern = { "*" },
      callback = function()
        local input_status = tonumber(vim.fn.system "fcitx5-remote")
        if input_status == 1 then vim.fn.system "fcitx5-remote -t" end
      end,
    })

英文的部份input_status = 2, 中文的部份input_status = 1,所以若是離開insert mode將會自動把中文的輸入法切換為英文。

from im-select.nvim.

keaising avatar keaising commented on June 13, 2024

嗯嗯,跟我的 fcitx-remote 的表现完全一致,你可以考虑按照我上面说的,给 fcitx5-remote 加一个 alias 当成 fcitx-remote,然后配置 default_command = fcitx-remote ,这样就只需要写配置,不用写上面那些代码

Anyway,能跑就行

from im-select.nvim.

Related Issues (11)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.