aboutsummaryrefslogtreecommitdiff
path: root/.config/nvim
diff options
context:
space:
mode:
authorlonkaars <loek@pipeframe.xyz>2023-01-15 16:59:42 +0100
committerlonkaars <loek@pipeframe.xyz>2023-01-15 16:59:42 +0100
commit7a7f77fb1334f4a2d653d2e3bdbea01f5fce7b76 (patch)
treea0c242b8da1997e36cef7743b913d82fd545a381 /.config/nvim
parentce4dad6ea2d7a46bebc9e7a28ed478c074908b82 (diff)
toggle fcitx5 off in normal mode in vim
Diffstat (limited to '.config/nvim')
-rw-r--r--.config/nvim/init.vim12
1 files changed, 6 insertions, 6 deletions
diff --git a/.config/nvim/init.vim b/.config/nvim/init.vim
index 569e220..4f46e2d 100644
--- a/.config/nvim/init.vim
+++ b/.config/nvim/init.vim
@@ -350,12 +350,7 @@ else
set signcolumn=yes
endif
-if has('patch8.1.1068')
- " Use `complete_info` if your (Neo)Vim version supports it.
- inoremap <expr> <cr> complete_info()["selected"] != "-1" ? "\<C-y>" : "\<C-g>u\<CR>"
-else
- imap <expr> <cr> pumvisible() ? "\<C-y>" : "\<C-g>u\<CR>"
-endif
+inoremap <silent><expr> <CR> coc#pum#visible() ? coc#pum#confirm() : "\<C-g>u\<CR>\<c-r>=coc#on_enter()\<CR>"
" coc code navigation
map <silent> <leader>cd <Plug>(coc-definition)
@@ -421,3 +416,8 @@ augroup END
" sneak
let g:sneak#use_ic_scs = 0
+
+" fcitx5
+autocmd InsertEnter * call system("fcitx5-temp-restore &")
+autocmd InsertLeave * call system("fcitx5-temp-off &")
+