-
Notifications
You must be signed in to change notification settings - Fork 41.9k
feat: switch nvim-cmp for blink.cmp #1426
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
Conversation
|
Tested and works fine. Although before nvim-cmp, it shows the documentations. Maybe we need to enable for blink.cmp as well. opts = {
completion = {
-- Show documentation when available, with a small delay.
-- If you're noticing high CPU usage or stuttering when opening the
-- documentation, you may try setting
-- `completion.documentation.treesitter_highlighting = false`.
documentation = {
auto_show = true,
auto_show_delay_ms = 200,
},
},
}UPDATE: don't know if it is my system, but couldn't trigger show/hide documents with default keymaps. ( |
|
What's the status on this? :) |
|
fwiw, I have been using a version of this PR for over a week, and experienced no issues :D |
I've left this off by default but included a section about turning it on. This matches the behavior of built in completions and other major editors (i.e. vscode). I personally prefer the |
|
This looks brilliant. Not sure how to evaluate this versus the 'default completion' PR. I know I personally would rather see new users have this experience but I haven't honestly tried the default yet so I'll go test and and report back, and see if we can't get this resolved with a modicum of screaming :) Thank you! |
|
This is so very slightly slower than the 'native' completions as shown in the PR from @cmdrrobin . However I personally favor the vastly increased flexibility available with different providers and the like. Thus far I've seen way more strenuous opinions around a desire for the native completions support so I'm feeling rather like King Solomon at the moment :) |
What the hell, sounds like I have some work for the weekend :) Which LSP? |
|
basedpyright. This is just my perception and I didn't do any formal benchmarking. I'm not sure HOW I'd benchmark the two actually. I should look into that :) |
|
@feoh to be honest, I don't think it is worth the benchmark the two actually. ;-) |
|
You know what? I've seen several votes in favor of this PR and we don't have anyone who can support the 'native' version, so with thanks to @cmdrrobin and @saghen for their hard work and participation I'm merging this. Great work all! |
* feat: switch nvim-cmp for blink.cmp (nvim-lua#1426)
feat: switch nvim-cmp for blink.cmp (nvim-lua#1426)
This reverts commit d350db2.
* fix: minor misspellings (nvim-lua#1450) * fix: minor misspellings * revert change for `-Bbuild` * Change LSP Keybindings to Match the Default `gr` Bindings Introduced in Neovim 0.11 (nvim-lua#1427) * refactor: change LSP keybindings to the default gr bindings introduced in 0.11 * refactor: modify existing LSP functions to follow convention * Remove Telescope `0.1` branch lock (nvim-lua#1448) * feat: switch nvim-cmp for blink.cmp (nvim-lua#1426) * Change to Mason's new address (nvim-lua#1516) * feat: switch vim-sleuth for guess-indent.nvim (nvim-lua#1512) * Replace vim.opt with vim.o (nvim-lua#1495) * Replace vim.opt with vim.o Because it offers a nicer interface and info on hover. For now leave vim.opt when using the table interface (until vim.o with tables is implemented) * Add type hint for vim.opt.rtp * Add a comment about using vim.opt instead of vim.o * don't lazy-load neo-tree so netrw hijacking on startup works (nvim-lua#1489) * README: mention fd-find in requirements (nvim-lua#1477) Fixes nvim-lua#1476 * fix: rename vim.highlight.on_yank to vim.hl.on_yank (nvim-lua#1482) The functions of vim.highlight were renamed to vim.hl on commit 18b43c331d8a0ed87d7cbefe2a18543b8e4ad360 of neovim, which was applied with the release of nvim version 0.11. Now, the use of vim.highlight is deprecated, and instead, one should use vim.hl functions. In practice, vim.highlight is still working, however, asking for help for vim.highlight.on_yank fails (E149), while asking for help for vim.hl.on_yank works as expected. So, by updating the used function, a new user will have easier time looking getting the relevant help. Co-authored-by: Omri Sarig <omri.sarig@prevas.dk> * Update remaining Mason's old address (nvim-lua#1530) * Initial plugin setup (#1) This adds a basic layer of plugins. But more language and workflow specific plugins are to follow possibly. --------- Co-authored-by: dasvh <dasvh@protonmail.com> Co-authored-by: Theo P. <63016528+theopn@users.noreply.github.com> Co-authored-by: Dmytro Onypko <vaporif@gmail.com> Co-authored-by: Liam Dyer <liamcdyer@gmail.com> Co-authored-by: guru245 <guru245@users.noreply.github.com> Co-authored-by: Ori Perry <48057913+oriori1703@users.noreply.github.com> Co-authored-by: pynappo <lehtien.david@gmail.com> Co-authored-by: Damjan 9000 <damjan.9000@gmail.com> Co-authored-by: Omri Sarig <omri.sarig13@gmail.com> Co-authored-by: Omri Sarig <omri.sarig@prevas.dk> Co-authored-by: Carlos Calla Alarcón <calla.alarcon@gmail.com>
* fix: minor misspellings (nvim-lua#1450) * fix: minor misspellings * revert change for `-Bbuild` * Change LSP Keybindings to Match the Default `gr` Bindings Introduced in Neovim 0.11 (nvim-lua#1427) * refactor: change LSP keybindings to the default gr bindings introduced in 0.11 * refactor: modify existing LSP functions to follow convention * Remove Telescope `0.1` branch lock (nvim-lua#1448) * feat: switch nvim-cmp for blink.cmp (nvim-lua#1426) * Change to Mason's new address (nvim-lua#1516) * feat: switch vim-sleuth for guess-indent.nvim (nvim-lua#1512) * Replace vim.opt with vim.o (nvim-lua#1495) * Replace vim.opt with vim.o Because it offers a nicer interface and info on hover. For now leave vim.opt when using the table interface (until vim.o with tables is implemented) * Add type hint for vim.opt.rtp * Add a comment about using vim.opt instead of vim.o * don't lazy-load neo-tree so netrw hijacking on startup works (nvim-lua#1489) * README: mention fd-find in requirements (nvim-lua#1477) Fixes nvim-lua#1476 * fix: rename vim.highlight.on_yank to vim.hl.on_yank (nvim-lua#1482) The functions of vim.highlight were renamed to vim.hl on commit 18b43c331d8a0ed87d7cbefe2a18543b8e4ad360 of neovim, which was applied with the release of nvim version 0.11. Now, the use of vim.highlight is deprecated, and instead, one should use vim.hl functions. In practice, vim.highlight is still working, however, asking for help for vim.highlight.on_yank fails (E149), while asking for help for vim.hl.on_yank works as expected. So, by updating the used function, a new user will have easier time looking getting the relevant help. Co-authored-by: Omri Sarig <omri.sarig@prevas.dk> * Update remaining Mason's old address (nvim-lua#1530) * Initial plugin setup (#1) This adds a basic layer of plugins. But more language and workflow specific plugins are to follow possibly. --------- Co-authored-by: dasvh <dasvh@protonmail.com> Co-authored-by: Theo P. <63016528+theopn@users.noreply.github.com> Co-authored-by: Dmytro Onypko <vaporif@gmail.com> Co-authored-by: Liam Dyer <liamcdyer@gmail.com> Co-authored-by: guru245 <guru245@users.noreply.github.com> Co-authored-by: Ori Perry <48057913+oriori1703@users.noreply.github.com> Co-authored-by: pynappo <lehtien.david@gmail.com> Co-authored-by: Damjan 9000 <damjan.9000@gmail.com> Co-authored-by: Omri Sarig <omri.sarig13@gmail.com> Co-authored-by: Omri Sarig <omri.sarig@prevas.dk> Co-authored-by: Carlos Calla Alarcón <calla.alarcon@gmail.com>
This reverts commit d350db2. blink.comp doesn't work for me.
* feat: Change to prepare for upcoming deprecation of configuring diagnostic-signs using sign_define() (nvim-lua#1232) * Fix nvim-dap not lazy loading (nvim-lua#1216) * Fix nvim-dap not lazy loading The keys property had local variables 'dap' and 'dap-ui' that used `require` and prevented all DAP related plugins from lazy-loading. Fixed this by changing keys to a table and substituting the local variables with a lamba function * Make debug keybind descriptions more consistent * fix: which-key comment typo (nvim-lua#1227) * Tweak outdated comment about lazy's `config` key usage. (nvim-lua#1250) Remove outdated comment describing use of `config` key, replacing with corrected `opt` key note. Fixes nvim-lua#1249 * Use consistent syntax style for { ... } "pseudocode" (nvim-lua#1247) ``` require('gitsigns').setup({ ... }) ``` This was the first occurrence It may be nice to have the same style everywhere Cosmetic change (just to make docs/comments even more perfect) * Issue 1249 which key comments (nvim-lua#1263) * Tweak outdated comment about lazy's `config` key usage. Remove outdated comment describing use of `config` key, replacing with corrected `opt` key note. Fixes nvim-lua#1249 * fix typo opt -> opts Fixes nvim-lua#1250 * fix(gitsigns): make visual mode descriptions consistent with normal mode (nvim-lua#1266) * Fix README.md grammar and typos (nvim-lua#1291) * chore: add pre-issue requirements (nvim-lua#1288) * chore: add pre-issue requirements Based on nvim-lua#1285 * docs: add header about documentation Based on nvim-lua#1285 * Fix which-key delay settings (nvim-lua#1276) The which-key plugin used to rely on vim.opt.timeoutlen, but it was updated a few months ago to use its own opt.delay instead. https://github.com/folke/which-key.nvim/blob/8ab96b38a2530eacba5be717f52e04601eb59326/NEWS.md?plain=1#L10 I set which-key's delay to 0 ms because it makes it feel snappy and responsive! That way, we give new users a good first impression. * fix: prevent mason setup from being run twice (nvim-lua#1298) * fix: prevent mason setup from being run twice Addresses nvim-lua#1297 Currently, we're calling `require('mason').setup(...)` twice: * once when setting it as a dependency of `nvim-lspconfig` (since we set `config = true`) * once in the `config` function we define for `nvim-lspconfig` Calling setup twice can cause issues with, e.g., setting the `PATH` option: you might append Mason's bin dir in one setup call and prepend it in the other. We've kept the setup of `mason` in the `nvim-lspconfig` dependencies table since leaving it to the `config` function caused some plugin-loading-order related issues in the past. See: * nvim-lua#210 * nvim-lua#554 * nvim-lua#555 * nvim-lua#865 * docs: tweak comments per review feedback * chore: remove redundant comment (nvim-lua#1307) * chore: fix typo in bug report issue template (nvim-lua#1306) * Use luals 3rd library for luv (nvim-lua#1303) * chore(docs): Update README.md (nvim-lua#1344) Neovim has renamed the "linux64" binary to "linux-x86_64". * docs: clarify using opts = {} vs config = function() ... require('plu… (nvim-lua#1316) * docs: clarify using opts = {} vs config = function() ... require('plugin').setup({}) .. end The current documentation mentioning that using "require" is equivalent to using "opts" without detailing the use in the "config = function()" block seems inaccurate. Lower in the configuration the "config = function()" block is used without clarifying why it needed and what it does. This clarification may help new users understand the difference between the two, or how and where to place the "require" statement. * Update init.lua * remove whitespace * fix (nvim-lua#1319): gitsigns deprecated functions (nvim-lua#1321) - This commit change two functions that are marked as deprecated now: `gitsigns.stage_hunk` and `gitsigns.toggle_deleted` * Add a blurb about installing missing emoji on Ubuntu Right next to the nerdfonts blurb as requested. * fix: arguments for the `vim.lsp.Client.supports_method` method (nvim-lua#1356) * feat(diagnostic): add diagnostic config (nvim-lua#1335) Co-authored-by: gelocraft <gelocraft@users.noreply.github.com> * perf: load tokyonight.nvim in the intended way (nvim-lua#1360) Fixes nvim-lua#1357 * feat: add basic function signature help (nvim-lua#1358) * feat: add basic function signature help * Update init.lua Co-authored-by: makeworld <25111343+makew0rld@users.noreply.github.com> --------- Co-authored-by: makeworld <25111343+makew0rld@users.noreply.github.com> * Fix: fix the cmp-nvim-lsp-signature-help link (nvim-lua#1363) * fix: regression introduced in db78c0b (nvim-lua#1367) * Remove duplicate cmp-path (nvim-lua#1369) * Propsed fix for init.lua warnings as per nvim-lua#1305 (comment) (nvim-lua#1354) * feat: add `vim.opt.confirm = true` (nvim-lua#1384) * fix: use correct github abmonition syntax (nvim-lua#1414) * changed Conform's format_on_save lambda so that buffers that match disable_filetypes return nil. This allows you to enable a formatter for langages in the disable_filetypes table to have a formatter that can be run manually with Leader-f but doesnt enable format_on_save for them (nvim-lua#1395) * feat(keymap): move windows without `<C-w>` (nvim-lua#1368) * fix: minor misspellings (nvim-lua#1450) * fix: minor misspellings * revert change for `-Bbuild` * Change LSP Keybindings to Match the Default `gr` Bindings Introduced in Neovim 0.11 (nvim-lua#1427) * refactor: change LSP keybindings to the default gr bindings introduced in 0.11 * refactor: modify existing LSP functions to follow convention * Remove Telescope `0.1` branch lock (nvim-lua#1448) * feat: switch nvim-cmp for blink.cmp (nvim-lua#1426) * Change to Mason's new address (nvim-lua#1516) * feat: switch vim-sleuth for guess-indent.nvim (nvim-lua#1512) * Replace vim.opt with vim.o (nvim-lua#1495) * Replace vim.opt with vim.o Because it offers a nicer interface and info on hover. For now leave vim.opt when using the table interface (until vim.o with tables is implemented) * Add type hint for vim.opt.rtp * Add a comment about using vim.opt instead of vim.o * don't lazy-load neo-tree so netrw hijacking on startup works (nvim-lua#1489) * README: mention fd-find in requirements (nvim-lua#1477) Fixes nvim-lua#1476 * fix: rename vim.highlight.on_yank to vim.hl.on_yank (nvim-lua#1482) The functions of vim.highlight were renamed to vim.hl on commit 18b43c331d8a0ed87d7cbefe2a18543b8e4ad360 of neovim, which was applied with the release of nvim version 0.11. Now, the use of vim.highlight is deprecated, and instead, one should use vim.hl functions. In practice, vim.highlight is still working, however, asking for help for vim.highlight.on_yank fails (E149), while asking for help for vim.hl.on_yank works as expected. So, by updating the used function, a new user will have easier time looking getting the relevant help. Co-authored-by: Omri Sarig <omri.sarig@prevas.dk> * Update remaining Mason's old address (nvim-lua#1530) --------- Co-authored-by: gloomy-lemon-debatable <91877885+gloomy-lemon-debatable@users.noreply.github.com> Co-authored-by: Anjishnu Banerjee <107052359+kaezrr@users.noreply.github.com> Co-authored-by: Miha <79801427+mihasket@users.noreply.github.com> Co-authored-by: ben fleis <benfleis@users.noreply.github.com> Co-authored-by: Artem Dragunov <dragunovartem99@gmail.com> Co-authored-by: Scott Swensen <git@scottswensen.com> Co-authored-by: George <george@primalskill.com> Co-authored-by: Ihsan Tonuzi <115842560+iton0@users.noreply.github.com> Co-authored-by: Ryan Jensen <jensenr30@gmail.com> Co-authored-by: Tomas Gareau <tggareau@gmail.com> Co-authored-by: Nhan Luu <62146587+nhld@users.noreply.github.com> Co-authored-by: Diorman Colmenares <229201+diorman@users.noreply.github.com> Co-authored-by: Ryan Nevius <rnevius@users.noreply.github.com> Co-authored-by: bleacheda <60625523+bleacheda@users.noreply.github.com> Co-authored-by: Erlan Rangel <erlanrangel@gmail.com> Co-authored-by: Chris Patti <feoh@feoh.org> Co-authored-by: Jonas Zeltner <jonas.zeltner@posteo.de> Co-authored-by: GeloCraft <115651305+gelocraft@users.noreply.github.com> Co-authored-by: gelocraft <gelocraft@users.noreply.github.com> Co-authored-by: Joaquín Guerra <joaquinguerratocino@gmail.com> Co-authored-by: Rob <rcsfletcher@protonmail.com> Co-authored-by: makeworld <25111343+makew0rld@users.noreply.github.com> Co-authored-by: Aryan Rajoria <57455619+aryan-rajoria@users.noreply.github.com> Co-authored-by: Ari Pollak <aripollak@users.noreply.github.com> Co-authored-by: Crypto-Spartan <29098151+Crypto-Spartan@users.noreply.github.com> Co-authored-by: Luca Saccarola <96259932+saccarosium@users.noreply.github.com> Co-authored-by: RulentWave <49258216+RulentWave@users.noreply.github.com> Co-authored-by: Sander <info@mesander.com> Co-authored-by: dasvh <dasvh@protonmail.com> Co-authored-by: Theo P. <63016528+theopn@users.noreply.github.com> Co-authored-by: Dmytro Onypko <vaporif@gmail.com> Co-authored-by: Liam Dyer <liamcdyer@gmail.com> Co-authored-by: guru245 <guru245@users.noreply.github.com> Co-authored-by: Ori Perry <48057913+oriori1703@users.noreply.github.com> Co-authored-by: pynappo <lehtien.david@gmail.com> Co-authored-by: Damjan 9000 <damjan.9000@gmail.com> Co-authored-by: Omri Sarig <omri.sarig13@gmail.com> Co-authored-by: Omri Sarig <omri.sarig@prevas.dk> Co-authored-by: Carlos Calla Alarcón <calla.alarcon@gmail.com>
Opening as draft since I have yet to verify everything works as expected
Closes #1331