Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add incsearch_redraw_keys settings #1162

Merged
merged 1 commit into from
Aug 31, 2022

Conversation

yuki-yano
Copy link
Contributor

When using incsearch with cmp-cmdline, the completion window display may be corrupted.

By default, it uses <Up><Down>, but you can re-render it by using <C-r><Esc> or <C-r><BS>.
However, using <C-r> breaks the history going back with <Up> and <Down>.

Therefore, a configuration item has been added to allow the user to change the key to be sent.

CleanShot.2022-08-27.at.12.16.56.mp4

@@ -101,5 +101,7 @@ return function()
winhighlight = 'FloatBorder:NormalFloat',
},
},

incseach_redraw_keys = '<Up><Down>'
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't think it's good to put here.

I think it should be hidden API. So require('cmp.utils.misc').redraw.incsearch_redraw_keys = '<Up><Down>' is better.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed.
I have require('cmp.utils.misc').redraw.incsearch_redraw_keys = '<C-r><BS>' and it works fine.

@yuki-yano yuki-yano force-pushed the feature/incsearch_redraw_keys branch from 0f061c9 to f3eda55 Compare August 31, 2022 03:25
@hrsh7th
Copy link
Owner

hrsh7th commented Aug 31, 2022

LGTM

@hrsh7th hrsh7th merged commit b588569 into hrsh7th:main Aug 31, 2022
williamboman added a commit to williamboman/nvim-cmp that referenced this pull request Sep 23, 2022
…indow

* upstream/main: (36 commits)
  feat: add `filter` option to sources (hrsh7th#1067)
  Restore rockspec
  Fix grammar mistake: "setup" -> "set up" (hrsh7th#1155)
  fix(timer): close timers before Neovim exits (hrsh7th#1166)
  Add incsearch_redraw_keys settings (hrsh7th#1162)
  Fix hrsh7th#1149 (temporary fix)
  Fix hrsh7th#1146
  Re-fix hrsh7th#1144
  Fix hrsh7th#1144
  Fix hrsh7th#1142
  Fix hrsh7th#1135
  Fix onetime configuration handling
  fix(entry/get_replace_range): handle TextEdit.range (hrsh7th#1140)
  Refactor a bit
  Restore filetype setting
  Fix hrsh7th#1139
  Add FAQ for clangd's command-line arguments. Fixes hrsh7th#999
  The default highlight groups shouldn't be default=true. Fixes hrsh7th#972
  Fix hrsh7th#1102
  Use `cmp.config.sources` (hrsh7th#1105)
  ...
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants