You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I am coming from using nvim-cmp + cmp-buffer today, so not sure if this is an intentional difference in the goal of this project.
When an LSP is attached to a buffer, Blink's autocomplete does not seem to match buffer words initially, and instead wants to use LSP recommendations (and friendly-snippets). Continuing autocomplete on a partial string will suggest buffer words. This is not a problem in new files
-- Buffer words in new file (working as expected)
Open a new empty file
Type a test string. Ex. water
Navigate to a different line
Start typing the test string, Blink will suggest auto completing the string. Ex. water will be suggestion after the letter w
-- Buffer words in a file with LSP (not working as expected)
Open a new file with an LSP started (I lazily start nvim-lspconfig on filetype). Ex. nvim test.sh
Type a test string. Ex. water
Navigate to a different line
Start typing the test string, Blink will suggest LSP suggestions. Ex. water will not appear as a suggestion
Stop typing once string is partially entered. Ex. wat
Stop the autocomplete suggestions in one of these two ways:
a. Use space to "leave" the partial string, and hit backspace back to incomplete word
b. Hit escape to return to normal mode + A to return to insert mode at the end of incomplete word
Continue to enter the next letters to finish string, Blink will suggest test string as an autocomplete option. Ex. water will be a suggestion after typing e at the end of wat
I tried playing with reordering the Sources thinking the sources might be processed in order or weighted, but this has no impact.
Relevant configuration
return {
'saghen/blink.cmp',
event= { "InsertEnter", "CmdLineEnter" },
dependencies='rafamadriz/friendly-snippets',
version='v0.*',
opts= {
-- 'default' for mappings similar to built-in completion-- 'super-tab' for mappings similar to vscode (tab to accept, arrow keys to navigate)-- 'enter' for mappings similar to 'super-tab' but with 'enter' to accept-- see the "default configuration" section below for full documentation on how to define-- your own keymap.keymap= { preset='super-tab' },
appearance= {
-- Sets the fallback highlight groups to nvim-cmp's highlight groups-- Useful for when your theme doesn't support blink.cmp-- will be removed in a future releaseuse_nvim_cmp_as_default=true,
-- Set to 'mono' for 'Nerd Font Mono' or 'normal' for 'Nerd Font'-- Adjusts spacing to ensure icons are alignednerd_font_variant='mono'
},
-- default list of enabled providers defined so that you can extend it-- elsewhere in your config, without redefining it, via `opts_extend`sources= {
default= { 'buffer', 'lsp', 'path', 'snippets' },
},
completion= {
menu= {
border="single",
scrollbar=false,
},
documentation= {
auto_show=true,
window= {
border="single",
},
},
},
signature= { enabled=true },
},
-- allows extending the providers array elsewhere in your config-- without having to redefine itopts_extend= { "sources.default" }
}
I'm not sure I'm understanding correctly, but you might want to set sources.providers.lsp.fallbacks = {} so that the buffer source always shows, regardless of whether the LSP is showing or not. What LSP are you using?
While using ts_ls, it seems to be there is an issue mentioned above. But in lua files, there is no such issue found.
I didn't test any other files by the way.
short clip of autocomplete working with no lsp, and it not working initially in bash or lua files until trying to complete a partial string (sorry for 480p)
Make sure you have done the following
blink.cmp
Bug Description
I am coming from using nvim-cmp + cmp-buffer today, so not sure if this is an intentional difference in the goal of this project.
When an LSP is attached to a buffer, Blink's autocomplete does not seem to match buffer words initially, and instead wants to use LSP recommendations (and friendly-snippets). Continuing autocomplete on a partial string will suggest buffer words. This is not a problem in new files
-- Buffer words in new file (working as expected)
water
water
will be suggestion after the letterw
-- Buffer words in a file with LSP (not working as expected)
nvim test.sh
water
water
will not appear as a suggestionwat
a. Use space to "leave" the partial string, and hit backspace back to incomplete word
b. Hit escape to return to normal mode + A to return to insert mode at the end of incomplete word
water
will be a suggestion after typinge
at the end ofwat
I tried playing with reordering the Sources thinking the sources might be processed in order or weighted, but this has no impact.
Relevant configuration
neovim version
NVIM v0.10.2
blink.cmp
version: branch, tag, or commitv0.7.6, commit ae5a4ce
The text was updated successfully, but these errors were encountered: