diff options
| -rw-r--r-- | config/nvim/lua/keybindings.lua | 1 | ||||
| -rw-r--r-- | config/nvim/lua/plugins/blink.lua | 22 | ||||
| -rw-r--r-- | config/nvim/lua/plugins/theme.lua | 6 |
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 = { |
