Improve macro & dot-repeat support (#363)

* manual support dot-repeat

* cmdwin and terminal

* cmdline only

* Fix

* fix

* Improve

* Fix test

* Support macro

* disable cmdline for now

* Simplify

* fmt

* consume once

* Ignore = type

* cmdline

* Remove cmdline features
This commit is contained in:
hrsh7th
2021-10-16 23:37:32 +09:00
committed by GitHub
parent f0a6cca5b9
commit 0f28030aef
13 changed files with 279 additions and 84 deletions

View File

@@ -3,7 +3,7 @@ local autocmd = require('cmp.utils.autocmd')
local keymap = require('cmp.utils.keymap')
local types = require('cmp.types')
local config = require('cmp.config')
local misc = require('cmp.utils.misc')
local api = require('cmp.utils.api')
---@class cmp.NativeEntriesView
---@field private offset number
@@ -70,7 +70,7 @@ native_entries_view.open = function(self, offset, entries)
end
native_entries_view.close = function(self)
if misc.is_suitable_mode() then
if api.is_suitable_mode() then
vim.fn.complete(1, {})
end
self.offset = -1
@@ -80,7 +80,7 @@ native_entries_view.close = function(self)
end
native_entries_view.abort = function(_)
if misc.is_suitable_mode() then
if api.is_suitable_mode() then
vim.api.nvim_select_popupmenu_item(-1, true, true, {})
end
end