This commit is contained in:
hrsh7th
2021-09-21 23:24:19 +09:00
parent 7e2f77013b
commit 132f8c259a

View File

@@ -3,6 +3,8 @@ if vim.g.loaded_cmp then
end end
vim.g.loaded_cmp = true vim.g.loaded_cmp = true
local misc = require('cmp.utils.misc')
-- TODO: https://github.com/neovim/neovim/pull/14661 -- TODO: https://github.com/neovim/neovim/pull/14661
vim.cmd [[ vim.cmd [[
augroup cmp augroup cmp
@@ -15,7 +17,13 @@ vim.cmd [[
augroup END augroup END
]] ]]
vim.cmd [[inoremap <silent> <Plug>(cmp-autoindent) <C-o>:normal!==<CR>]] vim.cmd [[inoremap <silent> <Plug>(cmp-autoindent) <Cmd>call v:lua.cmp.autoindent()<CR>]]
misc.set(_G, { 'cmp', 'autoindent' }, function()
local startofline = vim.o.startofline
vim.o.startofline = false
vim.cmd [[normal! ==]]
vim.o.startofline = startofline
end)
vim.cmd [[command! CmpStatus lua require('cmp').status()]] vim.cmd [[command! CmpStatus lua require('cmp').status()]]