aboutsummaryrefslogtreecommitdiff
path: root/config/nvim
diff options
context:
space:
mode:
authorAnhgelus Morhtuuzh <william@herges.fr>2026-01-21 15:07:52 +0100
committerAnhgelus Morhtuuzh <william@herges.fr>2026-01-21 15:07:52 +0100
commit4f0b5fad61739d77fa0a4bb48bff42b9c870c2e4 (patch)
tree863b3f65f5b27f53b0c315291a7b8ac9235c62e6 /config/nvim
parente20bebd2c730223efb5d71d05330859e8ee791b8 (diff)
feat(nvim): configure blink completion priority
Diffstat (limited to 'config/nvim')
-rw-r--r--config/nvim/lua/keybindings.lua1
-rw-r--r--config/nvim/lua/plugins/blink.lua22
-rw-r--r--config/nvim/lua/plugins/theme.lua6
3 files changed, 24 insertions, 5 deletions
diff --git a/config/nvim/lua/keybindings.lua b/config/nvim/lua/keybindings.lua
index d8426d3..8d7445a 100644
--- a/config/nvim/lua/keybindings.lua
+++ b/config/nvim/lua/keybindings.lua
@@ -15,6 +15,7 @@ vim.keymap.set('n', 'gr', vim.lsp.buf.references)
-- display
vim.keymap.set('n', 'ds', vim.lsp.buf.signature_help)
vim.keymap.set('n', 'dh', vim.lsp.buf.hover)
+vim.keymap.set('n', 'de', vim.diagnostic.open_float)
-- utils
vim.keymap.set('n', '<F2>', vim.lsp.buf.rename)
vim.keymap.set('n', '<space><CR>', vim.lsp.buf.code_action)
diff --git a/config/nvim/lua/plugins/blink.lua b/config/nvim/lua/plugins/blink.lua
index 4603999..6e2ac83 100644
--- a/config/nvim/lua/plugins/blink.lua
+++ b/config/nvim/lua/plugins/blink.lua
@@ -6,12 +6,11 @@ return {
version = "*",
opts = {
-
keymap = {
preset = "enter",
-- Select completions
- ["<Up>"] = { "select_prev", "fallback" },
- ["<Down>"] = { "select_next", "fallback" },
+ ["<Up>"] = { "fallback" },
+ ["<Down>"] = { "fallback" },
["<Tab>"] = { "select_next", "fallback" },
["<S-Tab>"] = { "select_prev", "fallback" },
["<CR-space>"] = { "show", "hide", "fallback" },
@@ -30,7 +29,22 @@ return {
default = { "lsp", "path", "snippets", "buffer" },
},
- fuzzy = { implementation = "prefer_rust_with_warning" },
+ fuzzy = {
+ implementation = "prefer_rust_with_warning",
+ max_typos = function(keyword) return math.floor(#keyword / 8) end,
+ sorts = {
+ function(a, b)
+ local kind = require('blink.cmp.types').CompletionItemKind.Keyword
+ if a.kind == kind and b.kind ~= kind then
+ return true
+ elseif a.kind ~= kind and b.kind == kind then
+ return false
+ end
+ end,
+ 'score',
+ 'sort_text'
+ }
+ },
completion = {
-- The keyword should only match against the text before
keyword = { range = "prefix" },
diff --git a/config/nvim/lua/plugins/theme.lua b/config/nvim/lua/plugins/theme.lua
index 8902d48..e75fac5 100644
--- a/config/nvim/lua/plugins/theme.lua
+++ b/config/nvim/lua/plugins/theme.lua
@@ -1,5 +1,9 @@
return {
- { "catppuccin/nvim", name = "catppuccin" },
+ {
+ "catppuccin/nvim",
+ name = "catppuccin",
+ integrations = { blink_cmp = true}
+ },
{
"f-person/auto-dark-mode.nvim",
opts = {