Commit Graph

93 Commits

Author SHA1 Message Date
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
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
anstadnik
ab7f368547 Add mappings for visual mode (#438) 2021-10-30 13:55:26 +09:00
hrsh7th
732f67dead Fix #427 2021-10-29 13:09:41 +09:00
hrsh7th
881ca573db Re-support script mapping 2021-10-28 00:50:50 +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
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
Alex Tylor
b546f50f09 Expose get_selected_entry() from view module to main cmp module fixes #385 (#386)
* Expose get_selected_entry() from view module to main cmp module fixes #385

* add get_active_entry() also

* fix linting

* remove unused vars

Co-authored-by: alex.tylor <atylor@gmail.com>
2021-10-22 17:47:55 +09:00
hrsh7th
775a371660 Fix #375 2021-10-19 14:47:41 +09:00
hrsh7th
c57969580d Fix #374 2021-10-19 14:38:10 +09:00
hrsh7th
289d0929be Remove meaningless code 2021-10-19 00:22:25 +09:00
hrsh7th
1e913aefd9 Fix #345 2021-10-18 11:47:17 +09:00
hrsh7th
0f28030aef 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
2021-10-16 23:37:32 +09:00
hrsh7th
ebe040b1a9 Fix #279 2021-10-16 13:27:36 +09:00
hrsh7th
5fe7dc1eea Fix #348
Fix #254
2021-10-16 12:16:37 +09:00
Edwar Martinez
c658cc52df Fix #343 (#347) 2021-10-13 20:26:05 +09:00
hrsh7th
49acc84853 Add item fields order
Fixes #337
2021-10-12 20:50:05 +09:00
hrsh7th
cfc211e395 Improve 2021-10-12 13:12:44 +09:00
hrsh7th
7a36a31331 No requires lazyredraw 2021-10-12 11:11:08 +09:00
hrsh7th
30ed4e43a6 Use <C-g> correctly 2021-10-12 01:53:27 +09:00
hrsh7th
2f2794decd refactor 2021-10-11 18:38:01 +09:00
hrsh7th
d8e6a865e4 Use instead of 2021-10-11 00:43:53 +09:00
hrsh7th
20aa77b492 format&lint 2021-10-10 14:04:39 +09:00
hrsh7th
0a31d67219 Lazy buffer creation 2021-10-10 13:57:37 +09:00
hrsh7th
d901dae302 Fix #296 2021-10-10 13:13:25 +09:00
hrsh7th
b16663f780 Improve 2021-10-10 12:50:35 +09:00
hrsh7th
370e6ff076 Use nvim_win_hide instead o nvim_win_close for supporting custom menu on cmdwin 2021-10-10 12:23:39 +09:00
hrsh7th
babb8023c6 Add cmp.visible 2021-10-10 12:13:57 +09:00
hrsh7th
2ebdccf61a Fix #306
Fix #296
Fix #293
Fix #291
2021-10-10 11:54:30 +09:00
hrsh7th
883eee5bbc Use <C-h> and support cmdwin 2021-10-10 00:01:15 +09:00
Hexin
12a24c0eb3 Check whether option exists (#301) 2021-10-09 15:18:18 +09:00
hrsh7th
ada9ddeff7 Use floating window for completion menus (#224)
* WIP

* WIP

* Fix #226

* Insert text

* Emulate vim native

* テキトウ

* Tekito

* Move scrollbar impl

* aaa

* Ignore unexpected event

* fix

* fix scroll

* Refactor (conflict...)

* Fix bug

* Positive integer

* Refactor a bit

* Fix for pumheight=0

* fx

* Improve matching highlight

* Improve colorscheme handling

* fmt

* Add cmp.visible

* Fix pum pos

* ABBR_MARGIN

* Fix cel calculation

* up

* refactor

* fix

* a

* a

* compat

* Remove current completion state

* Fix ghost text

* Add feature toggle

* highlight customization

* Update

* Add breaking change announcement

* Add README.md

* Remove unused function

* extmark ephemeral ghost text

* Support native comp

* Fix docs  pos

* a

* Remove if native menu visible

* theme async

* Improvement idea: option to disables insert on select item (#240)

* use ghost text instead of insertion on prev/next item

* add disables_insert_on_selection option

* move disable_insert_on_select option as argumet on

* update README

* use an enum behavior to disable insert on select

* Adopt contribution

* Preselect

* Improve

* Change configuration option

* a

* Improve

* Improve

* Implement proper <C-e> behavior to native/custom

* Support <C-c> maybe

* Improve docs view

* Improve

* Avoid syntax leak

* TODO: refactor

* Fix

* Revert win pos

* fmt

* ghost text remaining

* Don't use italic by default

* bottom

* dedup by label

* Ignore events

* up

* Hacky native view partial support

* up

* perf

* improve

* more cache

* fmt

* Fix format option

* fmt

* recheck

* Fix

* Improve

* Improve

* compat

* implement redraw

* improve

* up

* fmt/lint

* immediate ghost text

* source timeout

* up

* Support multibyte

* disable highlight

* up

* improve

* fmt

* fmt

* fix

* fix

* up

* up

* Use screenpos

* Add undojoin check

* Fix height

* matcher bug

* Fix dot-repeat

* Remove undojoin

* macro

* Support dot-repeat

* MacroSafe

* Default item count is 200

* fmt

Co-authored-by: Eric Puentes <eric.puentes@mercadolibre.com.co>
2021-10-08 18:27:33 +09:00
hrsh7th
af70f40d2e Add is_insert_mode utility 2021-09-30 21:06:32 +09:00
hrsh7th
a63a1a23e9 Fix #262 2021-09-29 21:20:35 +09:00
hrsh7th
f56e6b5ee4 Fix #226 2021-09-29 19:52:27 +09:00
hrsh7th
fdd3809893 Fix expr recursive mapping 2021-09-21 10:51:32 +09:00
hrsh7th
13e8b61371 Fix keymap bug 2021-09-19 13:40:27 +09:00
hrsh7th
7c8876330d Fix #220 2021-09-19 02:23:58 +09:00
hrsh7th
a212356641 Fix macro again 2021-09-14 03:12:39 +09:00
hrsh7th
6fa1e70b48 Fix macro 2021-09-14 01:52:59 +09:00
hrsh7th
dc0bbfe10b Improve resolve confirm 2021-09-13 19:09:45 +09:00
hrsh7th
71b9ebd019 Hijack agressively 2021-09-13 17:55:38 +09:00
hrsh7th
f7b4277c99 Format 2021-09-13 16:45:17 +09:00