211 Commits

Author SHA1 Message Date
Prabir Shrestha
db79feef88 move filter and map above 2020-10-18 23:38:04 +00:00
Prabir Shrestha
f4cf735905 make get_active_sources_for_buffer local function 2020-10-18 23:31:53 +00:00
Prabir Shrestha
cb62a5cdca look at allowlist and blocklist 2020-10-18 23:28:45 +00:00
Prabir Shrestha
1379ab6937 add register(), get_active_sources_for_buffer() and vimlist_new() and vimlist_insert() methods 2020-10-18 23:12:52 +00:00
Prabir Shrestha
df6c23beeb add M.is_enabled_for_buffer(bufnr) 2020-10-18 21:53:36 +00:00
Prabir Shrestha
cc70640826 add is_enabled() 2020-10-18 21:44:15 +00:00
Prabir Shrestha
5f7f799e48 add g:asyncomplete_enable and check before enabling 2020-10-18 21:36:51 +00:00
Prabir Shrestha
324c5b0bda add vimcmd and vimeval and enable only if g:asyncomplete_use_lua is true 2020-10-18 21:34:52 +00:00
Prabir Shrestha
42bfc98b7c add has_nvim() and command() 2020-10-18 21:31:18 +00:00
Prabir Shrestha
156a2cf322 fix has_lua check 2020-10-18 20:23:21 +00:00
Prabir Shrestha
8078e87ab7 subscribe to InsertEnter, TextChanged, TextChangedI, TextChangedP and InsertLeave appropriately and also cleanup as necessary 2020-10-18 20:14:42 +00:00
Prabir Shrestha
a7e5994c43 check for vim.fn.has 2020-10-18 17:45:56 +00:00
Prabir Shrestha
885c597b81 added https://github.com/prabirshrestha/lua-callbag#636d12bb8d4887e31b3617586d21b7d4675ae5e7 2020-10-18 17:40:36 +00:00
Prabir Shrestha
e52a882ce4 move to lua/asyncomplete/init.lua 2020-10-18 17:36:28 +00:00
Prabir Shrestha
87deb0fb26 add require('asyncomplete').has_lua() 2020-10-18 17:35:25 +00:00
Prabir Shrestha
6dd419390b add initial lua/asyncomplete.lua 2020-10-18 17:30:09 +00:00
Prabir Shrestha
8f9646a19f add github workflows for ci (#234)
* add github workflows for chi
* add .themisrc
* add empty vimspec

* add .vintrc.yaml
2020-10-18 05:15:32 +00:00
Prabir Shrestha
69e608be9e add stale.yml (#233) 2020-10-17 11:20:46 -07:00
ii41
52a627924c Clear matches and enable closing popup menu (#230)
* Remove "skip popup" related logic

* Fix matches not getting cleared

Before this commit we don't clear the matches when the text
under the cursor is no longer suitable for completion. This
causes e.g. removing everything using <BS> does not close
the completion menu.

* Allow closing popup menu

Closing popup menu calls completion itself, making it
impossible to be successful.

We used to have a "skip popup" logic to fix this. It was
removed 2 commits ago for being too confusing.

To fix this a check is adapted to make sure that completion
is only called when the completion context has changed.
Since closing popup menu does not change the completion
context, it no longer calls completion, and therefore can
succeed.

Previously this check lets us not complete when we move to a
different line we are in insert mode, through for example
<CR> or <BS>, but actually we are not afraid of this. When
we enter a newline, we don't complete anyway since the
refresh pattern is not matched, and when we backspace to a
previous line, and the line happens to end with something
that will trigger a completion, why do we not want to
trigger it?

* Also compare completion base to determine context change

It is possible that in some situation changing the text under the
cursor does not change the position of the cursor, so we also
compare the completion base to determine whether the context has
changed.
2020-10-17 09:57:48 -07:00
Jacques Heunis
7d33e19395 Add suggested configuration for always-insert-newline-on-enter behaviour (#231)
Co-authored-by: Jacques Heunis <git@jacquesheunis.com>
2020-10-17 09:44:39 -07:00
Prabir Shrestha
e82ab2e849 Revert "Clear matches (#227)" (#229)
This reverts commit db26d431a8.
2020-10-11 18:48:32 -07:00
Prabir Shrestha
814007ddab fix #196 where b:asyncomplete_triggers may not exist (#228) 2020-10-11 18:38:35 -07:00
ii41
db26d431a8 Clear matches (#227)
* Remove "skip popup" related logic
* Fix matches not getting cleared

Before this commit we don't clear the matches when the text
under the cursor is no longer suitable for completion. This
causes e.g. removing everything using <BS> does not close
the completion menu.
2020-10-11 17:59:53 -07:00
mattn
b65efdced5 Support custom filter (#185) 2020-10-09 18:14:07 +09:00
Tomek Wałkuski
430ea6ddfd Fix typo: s/Closure/Clojure/ (#226) 2020-10-05 13:00:42 -07:00
Prabir Shrestha
8392aa9fab add ai powered tabnine source (#224) 2020-10-04 12:53:16 -07:00
Prabir Shrestha
3f9d907f21 add asyncomplete-gitcommit source (#223) 2020-10-04 12:12:15 -07:00
Prabir Shrestha
189fd9e474 add ale source (#222) 2020-10-04 12:08:58 -07:00
Prabir Shrestha
47d125049a add asyncomplete-look source for dictionary (#221) 2020-10-04 12:04:40 -07:00
Prabir Shrestha
123bec2a9a add asyncomplete-clang source (#220) 2020-10-04 12:02:09 -07:00
Prabir Shrestha
dbe098fc48 add nextword for English autocomplete (#219) 2020-10-04 11:56:43 -07:00
Prabir Shrestha
76e28e2d71 add async-clj-omni (#218) 2020-10-04 11:49:56 -07:00
mattn
20a279b079 Set <nomodeline> for doautocmd (#217) 2020-09-17 22:35:43 +09:00
Jay Sitter
0d4ec1805d Add asyncomplete-user to README (#207) 2020-08-08 18:30:12 -07:00
ForTheReallys
359abf8ebe Added documentation for asyncomplete_enable* variables (#208) 2020-08-08 18:28:54 -07:00
Prabir Shrestha
bb8a9924b7 use allowlist and blocklist and deprecate the old keys (#204) v2.1.0 2020-06-25 23:46:12 -07:00
Prabir Shrestha
b618d5753e remove async.vim reference 2020-06-20 23:24:13 +00:00
Prabir Shrestha
3f823a47a9 add asyncomplete-emmet.vim (#203) 2020-06-13 12:36:34 -07:00
mattn
75f25b059f Fix errors while editing with non-named buffer. (#201) 2020-05-18 15:15:30 +09:00
Matthieu Rakotojaona
fc5c227e2b Add instructions for displaying the preview window (#198) 2020-05-17 11:05:49 -07:00
Jay Sitter
91ac1f6e6f Add setting for minimum string length to trigger auto popup (#135)
* Add setting for minimum string length to trigger auto popup

* Use ternary

* Use simplified function

* Fix bug in new return function

* Add documentation for min_chars

* Add buffer override for min_chars
2020-05-10 09:15:27 -07:00
mattn
5713fa6a1e Trigger completion when the last commit character is trigger character (#186) 2020-02-26 14:38:53 +09:00
David Briscoe
1f8d8ed26a Only warn about missing timers functionality once (#181)
plugin/asyncomplete.vim sets up an autocmd to invoke
asyncomplete#enable_for_buffer() for every BufEnter. If we don't clear
this autocmd, then it will try to call that function, which will try to
source the autoload file, which outputs the error again.

Clearing that autocmd group stops the cycle and limits the number of
warnings to one.
2020-02-24 19:58:56 -08:00
mattn
312861e9f9 Remove paired suffixes (#183)
* Remove paired suffixes

* Fix indentations

* This hack should work for double-quote or single-quote.
2020-02-19 15:18:01 +09:00
mattn
c3b7078fd4 Fix vint error (#182) 2020-02-15 12:23:01 -08:00
mattn
52f857a4c4 Add b:asyncomplete_refresh_pattern (#179) 2020-02-04 19:49:05 -08:00
jess
db3ab51ef6 Added financial contributors to the README (#159) 2019-10-02 10:37:57 -07:00
Mitchell Henke
28e4ad69b9 fix small README typo (#160) 2019-10-02 10:37:16 -07:00
a5ob7r
3bb7f42890 Fix functions section title typo in help (#158) 2019-09-16 07:51:09 -07:00
ishitaku5522
797394b1c1 Adding get_source_info() and get_source_names() (#154)
* add get_source_info() and get_source_names()

* update document

* remove unnecessary example draft
2019-09-08 09:58:17 -07:00