AF
0ad2450ff6
fix(context): in_treesitter_capture ( #1211 )
...
* fix(context): `in_treesitter_capture`
`in_treesitter_capture` used to compare a node:type() with what should
be a capture, returning always a falsy value.
The example https://github.com/hrsh7th/nvim-cmp/wiki/Advanced-techniques#disabling-completion-in-certain-contexts-such-as-comments
did not work as expected, being in_treesitter_capture("comment") always
not true.
Now it works as expected.
* feat(context): `in...capture`, `in...group` table
`in_treesitter_capture` and `in_syntax_group` can take a list of string
as argument.
* refactor(context): in...capture use vim.treesitter
Use vim.treesitter.get_captures_at_cursor()
* fix(context): get_captures_at_cursor -> ..._at_pos
get_captures_at_cursor() sometimes fails. Do it explicitly with
get_captures_at_pos(buf, row, col)
* refactor(context): vim.fn -> vim.api
Get row and col using vim.api and not vim.fn in in_syntax_group, as done
in in_treesitter_capture
2022-10-10 17:06:41 +09:00
lvimuser
0e436ee23a
fix(entry/get_replace_range): workaround for end char matching cursor position ( #1177 )
...
fixes #1156
2022-10-07 18:04:07 +09:00
yuys13
b0dff0ec4f
Update type annotations for setup.cmdline ( #1194 )
2022-10-02 23:24:50 +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
203aa26fc2
Fix for cmdheight=0
...
Fixes #1196
Fixes hrsh7th/cmp-cmdline#64
2022-10-02 20:22:13 +09:00
hrsh7th
beb1d14c5e
Add scrolloff option for completion window.
2022-10-02 19:47:01 +09:00
yuys13
2427d06b65
Format by stylua ( #1195 )
2022-09-27 12:27:31 +09:00
Amar Al-Zubaidi
83c097699d
setup.cmdline: support using a table (#1193 )
2022-09-26 11:51:01 +09:00
hrsh7th
dd4173fcee
Optimize performance more
2022-09-25 21:56:35 +09:00
hrsh7th
e1f31778a8
Optimize performance
2022-09-25 21:24:27 +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
Lewis Russell
6b3dbc8377
fix(timer): close timers before Neovim exits ( #1166 )
2022-09-02 11:29:13 +09:00
yuki yano
b5885696b1
Add incsearch_redraw_keys settings ( #1162 )
2022-08-31 12:42:43 +09:00
hrsh7th
058100d813
Fix #1149 (temporary fix)
2022-08-23 15:21:32 +09:00
hrsh7th
347fabf906
Fix #1146
2022-08-23 14:52:04 +09:00
hrsh7th
828768631b
Re-fix #1144
2022-08-21 02:11:49 +09:00
hrsh7th
995a2a9f65
Fix #1144
2022-08-21 01:56:04 +09:00
hrsh7th
3cc0c182ec
Fix #1142
2022-08-20 21:58:53 +09:00
hrsh7th
7e67df513a
Fix #1135
2022-08-20 20:42:43 +09:00
hrsh7th
db261b4e2b
Fix onetime configuration handling
2022-08-20 20:27:48 +09:00
lvimuser
27bc575d1e
fix(entry/get_replace_range): handle TextEdit.range ( #1140 )
...
fixes cmp.mapping.confirm when ConfirmBehavior is set to Replace
2022-08-20 19:52:35 +09:00
hrsh7th
49c4050e24
Refactor a bit
2022-08-20 19:23:05 +09:00
hrsh7th
9417f48a99
Restore filetype setting
2022-08-20 19:22:50 +09:00
hrsh7th
1307917fff
Fix #1139
2022-08-20 19:18:09 +09:00
hrsh7th
8523568448
Fix #1102
2022-08-15 01:25:50 +09:00
Josh Bode
706371f130
add check for nil on documentation.value ( #1091 )
2022-07-25 12:47:47 +09:00
hrsh7th
76ba56ce96
Decrease waits
2022-07-24 13:14:01 +09:00
hrsh7th
bf5593df8e
Improve typings
2022-07-24 12:44:53 +09:00
gravndal
89df2cb223
Fix native_entries_view.info width and col calculations ( #1075 )
...
The dictionary returned by `pum_getpos()` uses `scrollbar` not
`scrollable` to indicate whether the scrollbar is visible or not.
In addition, the padding on the left side of the popup menu isn't
included in the output of `pum_getpos()`, meaning that both `col` and
`width` (as understood by nvim-cmp) are off by one when the cursor isn't
at column `0`.
These two issues were causing the documentation window and popup menu to
overlap.
2022-07-24 12:19:21 +09:00
Daan Goossens
33588ca253
fix : #1030 ( #1062 )
2022-07-24 12:14:42 +09:00
Tristan Partin
1568d76981
Fix type comment for cmp.ContextReason ( #1045 )
2022-07-24 12:13:54 +09:00
Zach Birenbaum
ad31a2b0e3
(feat) Custom item kinds ( #1003 )
2022-07-24 12:12:34 +09:00
hrsh7th
c4dcb1244a
Fix border width calculation
2022-07-21 00:37:40 +09:00
Mitsuo Heijo
9897465a76
Fix stylua integration ( #1054 )
2022-06-29 21:08:06 +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
William Boman
033a817ced
fix: only scroll docs if docs view is visible ( #1011 )
2022-05-25 10:32:11 +09:00
Jaehwang Jung
160405250e
Reuse scratch buffer for keymap normalization ( #991 )
2022-05-15 18:44:21 +09:00
John Nguyen
23e182d6d6
fix(types)(cmp): missing filetype type ( #990 )
2022-05-15 11:25:58 +09:00
hrsh7th
9a0c639ac2
Fix #987
2022-05-13 20:36:28 +09:00
hrsh7th
0318a3cbc1
Improve the codes for sumneko friendly
2022-05-13 19:25:00 +09:00
zeertzjq
6527e5f31b
fix: use scratch buffer and lhs for keymap.normalize() ( #986 )
...
Fix https://github.com/neovim/neovim/issues/18303
This can be slower, I don't know how frequently this function is called as I don't use this plugin.
2022-05-13 19:18:29 +09:00
hrsh7th
a226b6a4ff
Fix #973
2022-05-09 11:55:29 +09:00
hrsh7th
f81bfee109
Fix #964
...
Fix #963
Fix #966
2022-05-04 23:51:59 +09:00
hrsh7th
c6126cca36
Fix #962
2022-05-04 12:18:09 +09:00
hrsh7th
e64421ef58
Fix #960
2022-05-04 02:57:43 +09:00
hrsh7th
5054c14490
dev ( #956 )
...
* Adjust empty line count
* Implement vim.api.nvim_create_autocmd (#844 )
* Implement vim.api.nvim_create_autocmd
* Only use vim.api.nvim_create_autocmd on nighly
* Cleanup
* cleanup
* Rename autos.lua to autocmds.lua
* Fix forgot to rename autos to autocmds
* Remove legacy autocmd
* Add descriptions on autocmds
* Update descriptions on autocmds
* Update CmpStatus command to lua API (#922 )
Signed-off-by: Micah Halter <micah@balena.io >
* Move highlights to nvim_set_hl lua API (#925 )
Signed-off-by: Micah Halter <micah@balena.io >
* Add default to highlight
* Refactor autocmds
* fmt
* Improve performance
* Fix bug
* Improve matching logic
Fixes https://github.com/hrsh7th/nvim-cmp/discussions/954
* Fix format
* Improve performance
Fix #825
* Fix cmdline redraw bug
* Fix event
Co-authored-by: hrsh7th <>
Co-authored-by: zer09 <zer09@users.noreply.github.com >
Co-authored-by: Micah Halter <micah@mehalter.com >
2022-05-04 01:47:01 +09:00
Greg Hurrell
101f4aa7ba
fix: don't show non-working configuration in deprecation suggestion ( #946 )
...
As reported here: https://github.com/hrsh7th/nvim-cmp/issues/936
2022-05-03 01:45:00 +09:00
hrsh7th
f841fa6ced
Reduce flicker
2022-05-01 03:27:16 +09:00