Home

Awesome

fcitx5.nvim

[WIP but already in maintenance] Fcitx5 client in neovim

Reminds

This plugin needs to be run with corresponding input method frontend disabled in either your Neovim UI (terminal emulator or GUI), or Fcitx5.

Demo

<video src="https://user-images.githubusercontent.com/29998228/143730510-fd5299e9-4487-4831-bba3-0132086dce17.mp4" width="100%"></video>

Install

If you use packer.nvim,

use {
  'tonyfettes/fcitx5.nvim'
  tag = 'v0.0.1-alpha',
  rocks = {'dbus_proxy', 'lgi'}
}

Then, check if corresponding Input method frontend is disabled in Fcitx5 configuration, if your terminal/GUI support that. Otherwise, your terminal/GUI will capture your keystrokes and sent them to Fcitx5 instead of Neovim.

Setup

The example below shows the default values.

lua<<EOF
require'fcitx5'.setup = {
  ui = {
    separator = '',
    padding = { left = 1, right = 1 }
  }
}
EOF

hi link Fcitx5CandidateNormal None
hi link Fcitx5CandidateSelected Search
hi link Fcitx5PreeditNormal None
hi link Fcitx5PreeditUnderline Underline
hi link Fcitx5PreeditHighLight IncSearch
hi link Fcitx5PreeditDontCommit None
hi link Fcitx5PreeditBold Bold
hi Fcitx5PreeditStrike gui=strikethrough
hi link Fcitx5PreeditItalic Italic

Quick Start

use {
  'tonyfettes/fcitx5.nvim',
  config = {
    -- Load `fcitx5.nvim`
    require'fcitx5'.setup {}
    -- Map <M-Tab> to toggle between most recent two input methods.
    vim.cmd[[inoremap <M-Tab> <Cmd>lua require'fcitx5'.toggle()<CR>]]
  },
  -- Add luarocks dependencies
  rocks = { 'lgi', 'dbus_proxy' }
}

Roadmap