Skip to content

Commit

Permalink
Update IME documentation
Browse files Browse the repository at this point in the history
  • Loading branch information
fredizzimo committed Jul 5, 2023
1 parent 47bee9b commit 340571b
Show file tree
Hide file tree
Showing 2 changed files with 59 additions and 0 deletions.
54 changes: 54 additions & 0 deletions website/docs/configuration.md
Original file line number Diff line number Diff line change
Expand Up @@ -443,6 +443,60 @@ vim.g.neovide_input_macos_alt_is_meta = false
Interprets <kbd>Alt</kbd> + <kbd>whatever</kbd> actually as `<M-whatever>`, instead of sending the
actual special character to Neovim.

#### IME

VimScript:

```vim
let g:neovide_input_ime = v:true
```

Lua:

```lua
vim.g.neovide_input_ime = true
```

**Unreleased yet.**

This lets you disable the IME input. For example, to only enables IME in input mode and when
searching, so that you can navigate normally, when typing some East Asian languages, you can add
a few auto commands:

```vim
augroup ime_input
autocmd!
autocmd InsertLeave * execute "let g:neovide_input_ime=v:false"
autocmd InsertEnter * execute "let g:neovide_input_ime=v:true"
autocmd CmdlineEnter [/\?] execute "let g:neovide_input_ime=v:false"
autocmd CmdlineLeave [/\?] execute "let g:neovide_input_ime=v:true"
augroup END
```

```lua
local function set_ime(args)
if args.event:match("Enter$") then
vim.g.neovide_input_ime = true
else
vim.g.neovide_input_ime = false
end
end

local ime_input = vim.api.nvim_create_augroup("ime_input", { clear = true })

vim.api.nvim_create_autocmd({ "InsertEnter", "InsertLeave" }, {
group = ime_input,
pattern = "*",
callback = set_ime
})

vim.api.nvim_create_autocmd({ "CmdlineEnter", "CmdlineLeave" }, {
group = ime_input,
pattern = "[/\\?]",
callback = set_ime
})
```

#### Touch Deadzone

VimScript:
Expand Down
5 changes: 5 additions & 0 deletions website/docs/faq.md
Original file line number Diff line number Diff line change
Expand Up @@ -142,3 +142,8 @@ settings, see [#1896]. Possibly you're also running an outdated version of
Neovide.

[#1896]: https://github.com/neovide/neovide/issues/1896#issuecomment-1616421167.

Another possible cause is that you are using IME on X11. Dead keys with IME is
not yet supported, but you can work around that either by disabling IME or
configuring it to only be enabled in insert mode. See
[Configuration](configuration.md).

0 comments on commit 340571b

Please sign in to comment.