Commit Graph

48 Commits

Author SHA1 Message Date
hrsh7th
070c5572ad Implement shell like common string completion.
Fix #785
2022-02-13 14:34:28 +09:00
hrsh7th
20152c6afd Fix #789 2022-02-12 21:01:22 +09:00
hrsh7th
26a9184c88 Add filetype config
Use view.entries == 'native' instead of experimental.native_menu
2022-02-11 15:20:24 +09:00
Jonas Strittmatter
df05fe6ff4 Fix: close the view if cmp.enabled = false and the user types some text (#781)
A scenario where this lead to unintended behaviour previously was the following:

If cmp.enabled was configured such that it disabled cmp when in a comment,
and the user typed '--' in a lua file (this starts a comment), the cmp window
would not close if further text is typed on that line (although cmp should be disabled).
2022-02-11 13:36:54 +09:00
hrsh7th
55f04e49dc Improve sync API 2022-01-31 14:30:57 +09:00
hrsh7th
0d23640fb6 Fix #757 2022-01-31 14:27:33 +09:00
hrsh7th
d93104244c Wait for filtering completion 2022-01-25 16:27:21 +09:00
hrsh7th
57101a2e26 Re fix #754 2022-01-25 11:51:06 +09:00
hrsh7th
27123b1297 Fix #754 2022-01-24 23:46:47 +09:00
hrsh7th
3f7b7b258a Add complete_done event and improved the recently_used sorter.
Fix #708
2022-01-08 13:38:55 +09:00
hrsh7th
da4c071f6b Fix #648 2021-12-14 22:41:45 +09:00
hrsh7th
7960dad502 fmt 2021-12-02 16:10:35 +09:00
hrsh7th
c2652f0ac0 Implement #349 2021-12-02 15:56:42 +09:00
Lukas Reineke
17d57f96cc Add reason to complete function (#529)
fix #528
2021-11-17 01:17:58 +09:00
hrsh7th
753f5b7c92 Fix #516 (#517)
* Fix #516

* Fix

* Fix and tests

* fmt lint
2021-11-14 02:47:31 +09:00
hrsh7th
c7a1b9f7c0 Handle InsertEnter and CmdlineEnter seperately 2021-11-09 15:31:56 +09:00
hrsh7th
97e4229be6 Remove triggering insert enter event 2021-11-09 15:20:05 +09:00
hrsh7th
823c73c16d Improve avoiding InsertEnter's invalid mode detection 2021-11-09 15:01:44 +09:00
hrsh7th
a0053885ba Use key sequence to avoid the invalid mode detection 2021-11-09 14:05:13 +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
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
3945dc5d00 Add basic recently_used comparator 2021-10-29 18:46:51 +09:00
hrsh7th
1c498a5497 Add cmp.event:on() (#418) 2021-10-28 11:02:19 +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
f1da3adddc Add cmp.config.disable for opt-out default setting 2021-10-25 22:50:38 +09:00
hrsh7th
e4a2cec153 Implement source group.
Fixes #391
2021-10-22 18:24:03 +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
26e73f3140 Fix #372 2021-10-19 14:55:14 +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
ae42ce7b05 More fallback
Fix #286
2021-10-10 12:05:41 +09:00
hrsh7th
339fe9177b Don't completion by CursorMoved event 2021-10-09 17:33:24 +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
d9a82c7616 Fix #239 2021-09-23 21:17:37 +09:00
hrsh7th
86c2b1bb63 Format 2021-09-18 00:35:31 +09:00
hrsh7th
b47a703a48 RFC: CmpStatus command (#210)
* Add `CmpStatus` command

* Update headings

* Fix heading

* Update headings

* Add README.md

* Fix tests

* Force invoke InsertEnter
2021-09-17 13:29:28 +09:00
hrsh7th
af73e87fd8 We should adopt InsertLeave event 2021-09-13 13:58:04 +09:00
hrsh7th
a78894a09a Implement enabled=false configuration 2021-09-13 00:59:48 +09:00
hrsh7th
613328c375 Expose built-in comparators 2021-09-10 01:03:07 +09:00
Iron-E
ae54dcdc49 Reduce use of VimL (#168)
* perf(context): reduce use of `cmd` and `fn`

* perf(float): reduce use of `cmd` and `fn`

* perf(init): reduce use of `cmd` and `fn`

* perf(menu): reduce use of `cmd` and `fn`

* perf(plugin): reduce use of `cmd` and `fn`

* docs(README): reduce use of `cmd` and `fn`
2021-09-09 11:12:22 +09:00
hrsh7th
6cc8b82267 Refactor a bit 2021-09-03 14:15:17 +09:00
hrsh7th
6bc0ddb58b Add preselect configuration option 2021-08-25 21:23:54 +09:00
hrsh7th
79601cb3db Add cmp.mapping.abort 2021-08-25 17:15:17 +09:00
hrsh7th
c0fcdd9c61 Improve API stability 2021-08-24 22:43:02 +09:00
hrsh7th
c2f872920e Update mapping configuration 2021-08-11 23:30:31 +09:00
hrsh7th
ef27b622a7 Remove VS.LSP.CompletionItem 2021-08-06 21:14:58 +09:00
hrsh7th
cf61d0de50 Fix regression of commit characters 2021-08-05 15:21:36 +09:00
hrsh7th
d23d3533cf dev (#1)
* dev

* Improve sync design

* Support buffer local mapping

* tmp

* tmp

* tmp

* tmp

* tmp

* tmp

* tmp

* tmp

* tmp

* tmp

* tmp

* tmp

* tmp

* tmp

* tmp

* tmp

* tmp

* tmp

* tmp

* tmp

* tmp

* tmp

* tmp

* tmp

* tmp

* tmp

* tmp

* tmp

* tmp

* tmp

* tmp

* tmp

* stylua

* tmp

* tmp

* tmp

* tmp

* tmp

* tmp

* tmp

* integration

* tmp

* tmp

* tmp

* tmp

* tmp

* tmp

* tmp

* tmp

* tmp

* tmp

* tmp

* tmp

* tmp

* tmp

* tmp

* tmp

* tmp

* update

* tmp

* tmp

* tmp

* tmp

* tmp

* tmp

* tmp

* tmp

* tmp

* tmp

* tmp

* tmp

* tmp
2021-08-04 01:07:12 +09:00