fixed blink.lua
This commit is contained in:
@@ -25,7 +25,7 @@
|
|||||||
"gruvbox-mat": { "branch": "master", "commit": "790afe9dd085aa04eccd1da3626c5fa05c620e53" },
|
"gruvbox-mat": { "branch": "master", "commit": "790afe9dd085aa04eccd1da3626c5fa05c620e53" },
|
||||||
"indent-blankline.nvim": { "branch": "master", "commit": "005b56001b2cb30bfa61b7986bc50657816ba4ba" },
|
"indent-blankline.nvim": { "branch": "master", "commit": "005b56001b2cb30bfa61b7986bc50657816ba4ba" },
|
||||||
"kanagawa.nvim": { "branch": "master", "commit": "aef7f5cec0a40dbe7f3304214850c472e2264b10" },
|
"kanagawa.nvim": { "branch": "master", "commit": "aef7f5cec0a40dbe7f3304214850c472e2264b10" },
|
||||||
"lazy.nvim": { "branch": "main", "commit": "306a05526ada86a7b30af95c5cc81ffba93fef97" },
|
"lazy.nvim": { "branch": "main", "commit": "85c7ff3711b730b4030d03144f6db6375044ae82" },
|
||||||
"lazydev.nvim": { "branch": "main", "commit": "5231c62aa83c2f8dc8e7ba957aa77098cda1257d" },
|
"lazydev.nvim": { "branch": "main", "commit": "5231c62aa83c2f8dc8e7ba957aa77098cda1257d" },
|
||||||
"lualine.nvim": { "branch": "master", "commit": "47f91c416daef12db467145e16bed5bbfe00add8" },
|
"lualine.nvim": { "branch": "master", "commit": "47f91c416daef12db467145e16bed5bbfe00add8" },
|
||||||
"luvit-meta": { "branch": "main", "commit": "0ea4ff636c5bb559ffa78108561d0976f4de9682" },
|
"luvit-meta": { "branch": "main", "commit": "0ea4ff636c5bb559ffa78108561d0976f4de9682" },
|
||||||
|
|||||||
@@ -1,48 +1,43 @@
|
|||||||
-- blink.lua: Temporarily highlights cursor position after movement to improve visibility.
|
-- ~/.config/nvim/lua/plugins/blink.lua
|
||||||
|
|
||||||
return {
|
return {
|
||||||
"saghen/blink.cmp",
|
"saghen/blink.cmp", -- ✅ CORRECT: Use the shorthand plugin name for lazy.nvim.
|
||||||
version = "v1.*", -- stay on stable branch
|
version = "v1.*",
|
||||||
build = "cargo build --release", -- compile matcher locally (or download pre-built)
|
build = "cargo build --release", -- Builds the optional high-performance Rust fuzzy matcher[citation:7].
|
||||||
lazy = false, -- must load before first LSP attach
|
lazy = false, -- Must load early for LSP capabilities.
|
||||||
dependencies = {
|
dependencies = {
|
||||||
"L3MON4D3/LuaSnip",
|
"L3MON4D3/LuaSnip",
|
||||||
"rafamadriz/friendly-snippets",
|
"rafamadriz/friendly-snippets",
|
||||||
},
|
},
|
||||||
opts = {
|
opts = {
|
||||||
-- silence "incomplete build" message and prefer pre-built binary
|
fuzzy = { implementation = "prefer_rust" }, -- Silences missing binary warning, uses pre-built if available.
|
||||||
fuzzy = { implementation = "prefer_rust" },
|
|
||||||
|
|
||||||
---------------------------------------------------------------------------
|
---------------------------------------------------------------------------
|
||||||
-- completion sources
|
-- SOURCES - CRITICAL FIX HERE
|
||||||
---------------------------------------------------------------------------
|
---------------------------------------------------------------------------
|
||||||
sources = {
|
sources = {
|
||||||
min_keyword_length = 2, -- <-- moved here (global default)
|
min_keyword_length = 2,
|
||||||
default = { "nvim_lsp", "luasnip", "buffer", "path", "cmp_tabnine" },
|
default = { "lsp", "snippets", "buffer", "path", "cmp_tabnine" }, -- ✅ Use lowercase provider IDs.
|
||||||
providers = {
|
providers = {
|
||||||
nvim_lsp = { name = "LSP", module = "blink.cmp.sources.lsp" },
|
lsp = { name = "LSP", module = "blink.cmp.sources.lsp" }, -- ✅ "lsp"
|
||||||
luasnip = { name = "Snippets", module = "blink.cmp.sources.luasnip" },
|
snippets = { name = "Snippets", module = "blink.cmp.sources.snippets" }, -- ✅ "snippets" for luasnip
|
||||||
buffer = { name = "Buffer", module = "blink.cmp.sources.buffer" },
|
buffer = { name = "Buffer", module = "blink.cmp.sources.buffer" },
|
||||||
path = { name = "Path", module = "blink.cmp.sources.path" },
|
path = { name = "Path", module = "blink.cmp.sources.path" },
|
||||||
cmp_tabnine = {
|
cmp_tabnine = {
|
||||||
name = "TabNine",
|
name = "TabNine",
|
||||||
module = "blink.compat.source",
|
module = "blink.compat.source", -- ✅ Requires the optional `blink.compat` plugin.
|
||||||
score_offset = 3,
|
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
per_filetype = {
|
per_filetype = {
|
||||||
lua = { default = { "lazydev", "nvim_lsp", "luasnip", "buffer", "path" } },
|
lua = { default = { "lazydev", "lsp", "snippets", "buffer", "path" } },
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
|
||||||
---------------------------------------------------------------------------
|
---------------------------------------------------------------------------
|
||||||
-- completion behaviour
|
-- COMPLETION BEHAVIOR
|
||||||
---------------------------------------------------------------------------
|
---------------------------------------------------------------------------
|
||||||
completion = {
|
completion = {
|
||||||
accept = { auto_brackets = { enabled = true } },
|
accept = { auto_brackets = { enabled = true } },
|
||||||
trigger = {
|
trigger = { show_on_trigger_character = true },
|
||||||
show_on_trigger_character = true, -- min_keyword_length removed
|
|
||||||
},
|
|
||||||
list = {
|
list = {
|
||||||
selection = {
|
selection = {
|
||||||
preselect = function(ctx)
|
preselect = function(ctx)
|
||||||
@@ -55,12 +50,7 @@ return {
|
|||||||
auto_show_delay_ms = 100,
|
auto_show_delay_ms = 100,
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
signature = { enabled = true, window = { border = "rounded" } },
|
||||||
signature = {
|
|
||||||
enabled = true,
|
|
||||||
window = { border = "rounded" },
|
|
||||||
},
|
|
||||||
|
|
||||||
cmdline = { enabled = false },
|
cmdline = { enabled = false },
|
||||||
},
|
},
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user