Replies: 5 comments
-
Based on another suggestion, I've modified my config as follows: return {
'saghen/blink.cmp',
-- optional: provides snippets for the snippet source
dependencies = 'rafamadriz/friendly-snippets',
-- use a release tag to download pre-built binaries
version = '*',
-- AND/OR build from source, requires nightly: https://rust-lang.github.io/rustup/concepts/channels.html#working-with-nightly-rust
-- build = 'cargo build --release',
-- If you use nix, you can build from source using latest nightly rust with:
-- build = 'nix run .#build-plugin',
---@module 'blink.cmp'
---@type blink.cmp.Config
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 full "keymap" documentation for information on defining your own keymap.
keymap = {
preset = 'default',
cmdline = {
["<Tab>"] = { "select_next" },
["<S-Tab>"] = { "select_prev" },
},
},
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 release
use_nvim_cmp_as_default = true,
-- Set to 'mono' for 'Nerd Font Mono' or 'normal' for 'Nerd Font'
-- Adjusts spacing to ensure icons are aligned
nerd_font_variant = 'mono'
},
-- Default list of enabled providers defined so that you can extend it
-- elsewhere in your config, without redefining it, due to `opts_extend`
sources = {
default = { 'lsp', 'path', 'snippets', 'buffer' },
},
},
opts_extend = { "sources.default" }
} However, I still don't get path suggestions when I tab complete. |
Beta Was this translation helpful? Give feedback.
-
@Kraust I tested your config, and it seems to work fine. Please try this repro.lua with your Blink config. If it works for you, then something in your configuration (such as the LSP config or another interfering plugin) might be misconfigured. |
Beta Was this translation helpful? Give feedback.
-
Sorry, I managed to get the LSP completion working, but the cmdline completion for files (in the same way that you can without blink working) is not working. I'm fine with just disabling cmdline completion but the feature just seems inconsistent as buffers complete correctly. |
Beta Was this translation helpful? Give feedback.
-
Just a follow up, I think the issue was that I was on Windows. I moved to Linux and things were suddenly working correctly. |
Beta Was this translation helpful? Give feedback.
-
I have the same problem like you on windows and i think it doesn't autocomplete because of the slashes. |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
The default settings for blink.cmp doesn't seem to work for me. While it gives me a lot of suggestions, It doesn't allow me to do basic tab completion of paths like the default vim config does for me.
I'd expect to be able to do the following:
:e /home/kraust/<tab>
to cycle through files in my home directory. With the default config this prints a literal tab character (and Shift+Tab prints<S-Tab>
), and even pressing up / down doesn't seem to cycle files.As it is I'm really lost as to how this is a useable completion engine compared to neovim's default. I must be configuring it wrong, but I'm using the suggested configuration:
Sorry if this is a weird question, I'm trying to "modernize" my config and was suggested this plugin as a replacement to cmp which I never got working previously.
Also note that this default config doesn't configure my lsp completion at all (I use mason + lspconfig) but that's probably a followup question until I get the understanding of how this plugin should even function.
(Yes I am a Windows user, but I assume this issue also exists on Linux as well)
Beta Was this translation helpful? Give feedback.
All reactions