Commit Graph

427 Commits

Author SHA1 Message Date
hrsh7th
8c08bdf7a4 Allow the callback invoking multiple times if it's the recent one 2021-11-04 18:34:28 +09:00
hrsh7th
68a37a669b Support session 2021-11-04 02:53:05 +09:00
hrsh7th
a881adb1d7 Fix native menu bug 2021-11-04 02:45:23 +09:00
hrsh7th
dc6b458fd2 tmp fix for serveral bugs 2021-11-04 02:31:42 +09:00
hrsh7th
2a58b8f926 Fix #421 2021-11-03 03:16:45 +09:00
hrsh7th
c67ed9d8bc Fix #463 2021-11-03 02:29:06 +09:00
chmnchiang
3b4d3ceab1 Fix and improve README.md (#462)
Fix some typos and errors in `README.md`.
2021-11-02 17:43:46 +09:00
hrsh7th
b4622ed7d2 Fix 2021-11-02 15:46:01 +09:00
hrsh7th
7bc2738e14 Support isIncomplete only response 2021-11-02 15:21:19 +09:00
hrsh7th
bf0dd907d6 Fix #458 2021-11-02 12:24:11 +09:00
hrsh7th
0e1ae900a5 Fix #449 2021-11-02 12:13:18 +09:00
hrsh7th
b4e761e307 Fix #456 2021-11-02 12:09:42 +09:00
hrsh7th
017d3abc57 Organize keymap implementation (#454)
* Organize keymap implementation

* Pass tests

* Improve

* Restore tests
2021-11-02 11:59:26 +09:00
hrsh7th
1c33887afb Fix keymap bug 2021-11-02 02:06:34 +09:00
hrsh7th
b7f79a19c6 Fix #443 2021-11-02 01:52:51 +09:00
hrsh7th
674d2b1389 Rewrite keymap.lua (#452)
* Move feedkeys related codes to `cmp.utils.feedkeys`

* Improve mapping handling

* Fix test

* fmt
2021-11-01 22:15:28 +09:00
hrsh7th
e8cb695b0b Fix #436 2021-11-01 14:00:59 +09:00
Dmytro Meleshko
baa39271b2 Fix native menu not respecting cmp.PreselectMode.None sometimes (#447) 2021-11-01 12:55:59 +09:00
Charly Delay
b10bb327f3 misc.merge: ensure that misc.none is never returned (#441)
Before this change:

1. `misc.merge({a = misc.none}, {a = nil})` returned `{a = misc.none}`
2. `misc.merge({a = nil}, {a = misc.none})` returned `{a = misc.none}`

(1) can cause error if a non-existing mapping is set to `config.disable`
(which is an alias for `misc.none`).

(2) does not cause any issue to date, but is inconsistent with the
expected behavior of `misc.merge(…)`.

After this change:

1. `misc.merge({a = misc.none}, {a = nil})` returns `{a = nil}`
2. `misc.merge({a = nil}, {a = misc.none})` returns `{a = nil}`

Fixes #440.
2021-10-30 19:05:20 +09:00
Bradley Mackey
437074a303 README: clarify that a snippet plugin is required (#439)
* README: clarify that a snippet plugin is required

* README: add to FAQ about snippet

* README: use snippet 'engine' nomenclature

* README: fix typo
2021-10-30 18:42:37 +09:00
anstadnik
ab7f368547 Add mappings for visual mode (#438) 2021-10-30 13:55:26 +09:00
hrsh7th
669803b9ff Normalize mapping key before use
May be fixes #431
2021-10-29 22:44:41 +09:00
hrsh7th
3945dc5d00 Add basic recently_used comparator 2021-10-29 18:46:51 +09:00
hrsh7th
a6412e590c Fix #423 2021-10-29 13:50:00 +09:00
hrsh7th
732f67dead Fix #427 2021-10-29 13:09:41 +09:00
hrsh7th
6696c6a088 Fix #423 2021-10-28 20:08:08 +09:00
hrsh7th
52d9411cf2 Re-fix native tab mapping 2021-10-28 18:49:12 +09:00
hrsh7th
c01de2bd19 Fix #425 2021-10-28 16:48:02 +09:00
hrsh7th
1c498a5497 Add cmp.event:on() (#418) 2021-10-28 11:02:19 +09:00
hrsh7th
d113902eef Improve cmdline handling 2021-10-28 02:03:29 +09:00
hrsh7th
58d081300b Fix #420 2021-10-28 01:59:50 +09:00
hrsh7th
881ca573db Re-support script mapping 2021-10-28 00:50:50 +09:00
hrsh7th
455817bb26 Update README.md 2021-10-27 13:34:49 +09:00
hrsh7th
a58916386b fmt 2021-10-27 12:39:26 +09:00
hrsh7th
cae2e8f48b RFC: cmdline completion (#362)
* 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

* fmt

* Improve

* update

* fmt

* Support incsearch

* fix

* Add api

* Avoid cmdline completion if the native_menu enabled

* fix for macro

* Improve

* fmt

* Insert-mode only by default

* Update

* avoid conflict

* Improve default mapping

* Fix

* fix

* similar to native

* Update

* Fix README.md

* Improve

* Use <afile>
2021-10-27 12:38:46 +09:00
hrsh7th
b5899f05c5 Fix #414 2021-10-26 23:37:11 +09:00
Dmytro Meleshko
32e22e64c6 fix an error when calling cmp#unregister_source from Vimscript (#413) 2021-10-26 21:02:10 +09:00
hrsh7th
538bfacc15 Update issue templates 2021-10-26 20:53:48 +09:00
hrsh7th
ea6dde8081 Add tests for #226 2021-10-25 23:11:59 +09:00
hrsh7th
880137f5e8 Fix #226 2021-10-25 23:00:22 +09:00
hrsh7th
f1da3adddc Add cmp.config.disable for opt-out default setting 2021-10-25 22:50:38 +09:00
hrsh7th
5f5e8442f1 Fix #409 2021-10-25 11:19:19 +09:00
Ihor Kalnytskyi
1e7355a5fb Respect completeopt's noselect in custom menu (#402)
From NeoVim's `completeopt` documentation:

> noselect  Do not select a match in the menu, force the user to
>           select one from the menu. Only works in combination with
>           "menu" or "menuone".

When `completeopt = "menu,menuone,noselect"` is used, custom completion
menu does not respect `noselect` and preselects the first item. No
preselection happens in case of native menu.

This patch addresses the bug and ensures that in case of custom menu no
items are preselected if `noselect` is specified in `completeopt`.

Fixes #332
2021-10-24 23:30:59 +09:00
hrsh7th
b185e303bd Improve group handling 2021-10-23 00:38:55 +09:00
hrsh7th
921ee264fd Add default mapping as the same as native mapping. 2021-10-23 00:19:43 +09:00
hrsh7th
e699962a49 Fix #389 2021-10-22 22:50:46 +09:00
hrsh7th
533f17c569 group -> group_index 2021-10-22 19:52:48 +09:00
hrsh7th
530834e8c0 Fix group index bug 2021-10-22 19:50:28 +09:00
hrsh7th
8a10870cbe Update README.md 2021-10-22 18:38:51 +09:00
hrsh7th
93eb8cef78 fmt 2021-10-22 18:30:45 +09:00