72 Commits

Author SHA1 Message Date
abeldekat
12509903a5 fix: Outdated completion item with mini.snippets (#2126)
* fix: Outdated completion item with mini.snippets

* fix: Outdated completion item with mini.snippets. Prevent completion suggestions directly after snippet expand

* fix: Outdated completion item with mini.snippets. Undo changes

* fix: Outdated completion item with mini.snippets. The cmp.resubscribe solution

---------

Co-authored-by: abeldekat <abel@nomail.com>
2025-01-23 16:22:37 +09:00
hrsh7th
1d57252744 add cmp.get_registered_sources and CmpRegisterSource /CmpUnregisterSource autocmd. 2024-12-10 12:04:15 +09:00
hrsh7th
07f3f005c9 add performance.filtering_context_budget
fixes #2060
2024-10-20 13:56:45 +09:00
mcauley-penney
2fb2a3cf78 docs: update and fix view documentation (#1868)
- correct view.follow_cursor to view.entries.follow_cursor
- mention that view.entries.follow_cursor is custom view only
- add missing view.entries.selection_order option
- mention the docs class in list of classes nested under view class
2024-04-01 03:26:55 +09:00
mcauley-penney
7aa3f71932 feat: add option for view to follow cursor (#1727)
* feat: add option for custom entry view to follow cursor

Creates an option to allow the custom entries
view to follow the user's cursor as they type.

To enable, set
```lua
require("cmp").setup({
  view = {
    entries = {
      follow_cursor = true
    }
  }
})
```

Original source at 7569056388

Closes #1660

Co-authored-by: lvimuser <109605931+lvimuser@users.noreply.github.com>

* doc: add view.follow_cursor option to docs

---------

Co-authored-by: lvimuser <109605931+lvimuser@users.noreply.github.com>
2024-03-31 15:46:16 +09:00
Yi Ming
97dc716fc9 feat: make winblend configurable (#1861) 2024-03-24 20:44:34 +09:00
Lyude
b356f2c80c Allow window.documentation.max_{width, height} to be set to 0 (#1394)
To allow for using all available screen space, as we can omit a
max_height/max_width when creating a documentation popup). I've found this
to be useful with neovim-gtk's native GUI completion menus.
2024-03-22 16:38:43 +09:00
Micah Halter
66f0a031d9 feat: default to vim.snippet for snippet expansion if available (#1820) 2024-03-22 03:04:54 +09:00
Kyle Butt
6460f979b9 Add option for symbol matching logic. (#1515)
The no_symbol_match makes command line completion a lot less useful. It
disables any matches for file names with symbols in them. This prevents
completing things like ":b foo/bar" to ":b foo/bar.txt" or ":b foo_" to
":b baz/foo_bar.txt". Add an option `disallow_symbol_nonprefix_matching`
that prevents a match if it contains a symbol and isn't a prefix match.
Make that option the default. Add the option to documentation and tests.
Add to the examples for command line setup disabling the option.
2024-03-22 03:00:36 +09:00
SandeshPyakurel
a70bdcfe61 Fixed typos in cmp.txt file (#1730) 2023-12-10 20:19:20 +09:00
Maria José Solano
1c03ebc7dc feat: add toggle_doc functionality (#1647)
* feat: Add toggle_doc functionality

fix: Update docs view on entry change

* Replace toggle logic by open/close

* add docs and pinned flags

* add faq for disabling docs

* chore(git): ignore .DS_Store

---------

Co-authored-by: hrsh7th <629908+hrsh7th@users.noreply.github.com>
2023-08-12 11:50:49 +09:00
hrsh7th
9e49ed3fee fix confirm resolve 2023-06-23 13:29:35 +09:00
Jose Vargas
8a1694ff33 Expand docs for select_next_item select_prev_item (#1626) 2023-06-21 22:57:52 +09:00
hrsh7th
559b688cda restore max_item_count 2023-06-09 21:26:42 +09:00
hrsh7th
8a3d2dd764 Remove max_item_count from source configuration 2023-05-26 02:47:45 +09:00
Folke Lemaitre
abb5c7519d feat: cmp async (#1583) 2023-05-26 02:46:53 +09:00
Stéphane P
3ac8d6cd29 docs: fix adjecent typo (#1577) 2023-05-17 14:21:18 +09:00
jmp
41c6027994 docs: fix typos, add confirm.behavior example cfg (#1576) 2023-05-17 10:53:06 +09:00
MinSeok Kim
c718928219 fix typo (#1551) 2023-05-03 16:05:35 +09:00
hrsh7th
98d5d0583c Add note for cmdline mapping limitation 2023-04-27 00:35:43 +09:00
hrsh7th
2db3d7ca42 Add note for set paste option 2023-04-27 00:32:29 +09:00
Michael Jakl
f55a3e7fe5 Document cmd.ConfirmBehavior options (#1503) 2023-04-24 13:55:44 +09:00
hrsh7th
777450fd0a Improve docs 2023-03-17 13:22:04 +09:00
hrsh7th
7a3b1e76f7 Improve docs 2023-02-24 12:23:36 +09:00
Bradley Jones
d3a2833c11 doc: fix spelling of whether (#1453)
Signed-off-by: Bradley Jones <jones.bradley@me.com>
2023-02-22 00:08:00 +09:00
hrsh7th
aae0c3e4e7 Implement middle fuzzy matching
Fixes #1422
2023-02-11 22:52:28 +09:00
OgaKen
10b1d11252 Docs: Use tree-sitter language injection (#1350)
see:
    https://github.com/nvim-treesitter/nvim-treesitter/pull/3846
2022-12-15 13:36:48 +09:00
pure-bliss
8a9e8a89ee feat: added scrollbar option to window.completition ( #1087) (#1308)
* #1087 added hide_scrollbar option to window.completition

* Renamed hide_scrollbar to scrollbar, changed default value (#1087)

* doc description update (#1087)

* determining info.scrollbar value considering config scrollbar (#1087)

* window.bordered scrollbar default value fix (#1087)
2022-11-18 17:31:06 +09:00
hrsh7th
e820335208 LSP 3.17 (#1306)
* 3.17

* PositionEncodingKind

* Implement PositionEncodingKind

* Remove luarc.json
2022-11-16 01:27:15 +09:00
ADoyle
bdfadc1238 feat: select_next_item and select_prev_item support "count" option. deafults to 1 (#1262)
User can increase count value to select item with pagedown/pageup.

- cmp.select_prev_item({ behavior = behavior, count = 8 })
- cmp.select_next_item({ behavior = behavior, count = 8 })
2022-11-09 19:26:20 +09:00
Austin Ray
cdb77665bb Use default_capabilities() in doc and util (#1254)
Commit 0b6654d3de changed the `README.md`
to use `default_capabilities()` instead of `update_capabilities()`. This
commit replicates that change to `doc/cmp.txt` and `utils/vimrc.vim` for
consistency.
2022-10-22 13:26:32 +09:00
nat-418
e94d348931 Fix undefined new() error in example source (#1237) 2022-10-16 18:29:26 +09:00
NEX
da2d88ec1a ADD: formatting.expandable_indicator to show the expandable indicator (#1207)
* ADD: formatting.expandable_indicator to show the `expandable` indicator

* UPDATA: doc/cmp.txt  lua/cmp/entry.lua  lua/cmp/typed/cmp.lua
2022-10-02 22:39:52 +09:00
hrsh7th
beb1d14c5e Add scrolloff option for completion window. 2022-10-02 19:47:01 +09:00
Jonatan Branting
913eb85998 feat: add filter option to sources (#1067)
* feat: add `source.filter` config

This allows the user to specify a `filter` function for each source,
like this:

```lua
-- don't show entries with kind "Text" from the "nvim_lsp" source

sources = {
{
  name = "nvim_lsp",
  filter = function(entry, ctx)
    local kind = types.lsp.CompletionItemKind[entry:get_kind()]

    if kind == "Text" then
      return true
    end
  },
}
```

By utilizing the `ctx` parameter, the user can also ignore certain
entries in certain contexts.

* fixup! feat: add `source.filter` config

* fixup! feat: add `source.filter` config
2022-09-08 12:48:27 +09:00
hrsh7th
9417f48a99 Restore filetype setting 2022-08-20 19:22:50 +09:00
hrsh7th
b1ebdb0a17 Add FAQ for clangd's command-line arguments. Fixes #999 2022-08-15 01:38:44 +09:00
hrsh7th
76ba56ce96 Decrease waits 2022-07-24 13:14:01 +09:00
Zhuoyun Wei
1cad1815e1 Fix typo (#1047) 2022-06-24 12:36:04 +09:00
tzachar
8cab788976 add events: view_opened and view_closed (#965)
* add events: view_opened and view_closed

* fix typos

* rename view -> menu
2022-06-24 12:35:47 +09:00
Cameron
df6734aa01 Add Completion Window Options (#901)
* Add window.completion.side_padding and window.completion.col_offset

* add col_offset and side_padding options to config/window
2022-06-15 11:49:16 +09:00
MurdeRM3L0DY
0e65333c7f make debounce and throttle time configurable (#1026)
* make debounce and throttle time configurable

* fix documentation
2022-06-15 02:21:55 +09:00
Jonas Strittmatter
15c7bf7c0d Update documentation (#1019)
Co-authored-by: hrsh7th <629908+hrsh7th@users.noreply.github.com>
2022-06-09 16:41:59 +09:00
Benoit de Chezelles
ce643c12f1 Fix doc typo (#1025) 2022-06-08 13:32:34 +09:00
Uefair
bb5cac4dce Help page changes. (#952)
Co-authored-by: alexey <serendipitousdog@protonmail.com>
2022-05-03 01:43:24 +09:00
hrsh7th
baa8646c24 Add confirmation.get_commit_characters documents.
Fix #948
2022-05-01 22:58:26 +09:00
nskhei
74284cffb6 docs: fix sample code for cmp.config.sources (#942) 2022-04-28 14:10:25 +09:00
hrsh7th
433af3dffc Add docs 2022-04-21 21:29:40 +09:00
hrsh7th
2aa7eee28b Improve README.md 2022-04-18 23:50:46 +09:00
hrsh7th
93cf84f7de Remove all default mappings 2022-04-14 00:10:33 +09:00