Skip to content

black-desk/fcitx5-ui.nvim

Repository files navigation

Fcitx5 UI inside neovim

WARNING This program is in very early stage and may break or change frequently!

This is a fcitx5 user interface for neovim written in lua.

Basical fcitx5 functions seems work after a simple setup.

demo

Install

rocks.nvim

Command style

:Rocks install fcitx5-ui.nvim

Declare style

~/.config/nvim/rocks.toml:

[plugins]
"fcitx5-ui.nvim" = "scm"

Then

:Rocks sync

or:

$ luarocks --tree ~/.local/share/nvim/rocks install fcitx5-ui.nvim
# ~/.local/share/nvim/rocks is the default rocks tree path
# you can change it according to your vim.g.rocks_nvim.rocks_path

packer.nvim

require('packer').use(
  "black-desk/fcitx5-ui.nvim",
  rocks = {'lgi', 'dbus_proxy'},
)

lazy.nvim

return {
  "black-desk/fcitx5-ui.nvim",
  config = config,
}

NOTE:

  1. lgi and dbus_proxy needs gobject-introspection to build;
  2. packer.nvim need unzip to install lua rocks;

Config

The most config is same as rime.nvim. The only difference is trigger key which is used to switch input schema.

~/.config/fcitx5/config:

[Hotkey/TriggerKeys]
0=Super+space

[Behavior]
# Share Input State
ShareInputState=No

By default, it will parse ~/.config/fcitx5/config. You also can customize it.

local Fcitx = require 'fcitx.nvim.fcitx'.Fcitx
local Key = require 'fcitx.key'.Key
local fcitx = Fcitx{
  trigger = Key { normal_name = "Super+space" }
}

Old APIs for compatibility:

require'fcitx5-ui'.activate() to activate first input method, then you can use :startinsert to enter insert mode.

require'fcitx5-ui'.deactivate() to deactivate input method.

require'fcitx5-ui'.toggle() to toggle between activate/deactivate.

require'fcitx5-ui'.getCurrentIM() to get current IM.

require'fcitx5-ui'.setup(config) to config this plugin.

Thanks

fcitx5.nvim

lua-dbus_proxy

fcitx.vim

About

fcitx5 user interface inside neovim

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Contributors 3

  •  
  •  
  •  

Languages