fix: blink now shows documentation after 500ms

This commit is contained in:
2026-02-22 21:17:09 +01:00
parent 9ec87f7523
commit 92c9f02ab2

View File

@@ -2,82 +2,100 @@
-- │ Code utils │ -- │ Code utils │
-- ╰────────────╯ -- ╰────────────╯
return { return {
-- │ Code parse │ -- │ Code parse │
{ {
"nvim-treesitter/nvim-treesitter", "nvim-treesitter/nvim-treesitter",
opts = function() opts = function()
return require("plugins.opts.treesitter") return require("plugins.opts.treesitter")
end, end,
config = function(_, opts) config = function(_, opts)
require("nvim-treesitter.configs").setup(opts) require("nvim-treesitter.configs").setup(opts)
end, end,
}, },
{ {
"nvim-treesitter/nvim-treesitter-context", "nvim-treesitter/nvim-treesitter-context",
opts = function() opts = function()
return require("plugins.opts.treesitterContext") return require("plugins.opts.treesitterContext")
end, end,
}, },
-- │ Completion │ -- │ Completion │
{ {
"saghen/blink.cmp", "saghen/blink.cmp",
dependencies = { "rafamadriz/friendly-snippets" }, dependencies = { "rafamadriz/friendly-snippets" },
version = "1.*", version = "1.*",
-- build = "cargo build --release", -- build = "cargo build --release",
opts = { opts = {
-- C-e: Hide menu -- C-e: Hide menu
-- C-k: Toggle signature help (if signature.enabled = true) -- C-k: Toggle signature help (if signature.enabled = true)
keymap = { keymap = {
preset = "default", preset = "default",
["<Enter>"] = { "accept", "fallback" }, ["<Enter>"] = { "accept", "fallback" },
["<Tab>"] = { "select_next", "fallback" }, ["<Tab>"] = { "select_next", "fallback" },
["<S-Tab>"] = { "select_prev", "fallback" }, ["<S-Tab>"] = { "select_prev", "fallback" },
}, },
appearance = { appearance = {
nerd_font_variant = "mono", nerd_font_variant = "mono",
}, },
completion = { documentation = { auto_show = false } }, completion = {
sources = {}, accept = { auto_brackets = { enabled = false }, },
-- default = { "lsp", "path", "snippets", "buffer" }, list = { selection = { preselect = false, auto_insert = true } },
fuzzy = { implementation = "prefer_rust_with_warning" }, menu = {
}, auto_show = true,
opts_extend = { "sources.default" },
},
-- -- │ Auto close │ -- nvim-cmp style menu
{ draw = {
"windwp/nvim-ts-autotag", columns = {
config = function(_, opts) { "label", "label_description", gap = 1 },
require("nvim-ts-autotag").setup({ { "kind_icon", "kind" }
opts = { },
enable_close = true, }
enable_rename = true, },
enable_close_on_slash = false,
},
})
end,
},
{ -- Show documentation when selecting a completion item
'm4xshen/autoclose.nvim', documentation = { auto_show = true, auto_show_delay_ms = 500 },
opts = function() -- Display a preview of the selected item on the current line
return require("plugins.opts.autoclose") ghost_text = { enabled = true },
end, },
}, sources = {},
fuzzy = { implementation = "prefer_rust_with_warning" },
},
opts_extend = { "sources.default" },
},
-- │ Diagnostics -- -- │ Auto close
{ {
"folke/trouble.nvim", "windwp/nvim-ts-autotag",
opts = { use_diagnostic_signs = true }, config = function(_, opts)
}, require("nvim-ts-autotag").setup({
opts = {
enable_close = true,
enable_rename = true,
enable_close_on_slash = false,
},
})
end,
},
{ {
"folke/todo-comments.nvim", 'm4xshen/autoclose.nvim',
dependencies = { "nvim-lua/plenary.nvim" }, opts = function()
opts = function() return require("plugins.opts.autoclose")
return require("plugins.opts.todocomments") end,
end, },
},
-- │ Diagnostics │
{
"folke/trouble.nvim",
opts = { use_diagnostic_signs = true },
},
{
"folke/todo-comments.nvim",
dependencies = { "nvim-lua/plenary.nvim" },
opts = function()
return require("plugins.opts.todocomments")
end,
},
} }