summaryrefslogtreecommitdiff
path: root/lua/plugins/completion.lua
diff options
context:
space:
mode:
authorbrustybee <bee@4d2.org>2026-03-09 17:02:03 +0530
committerbrustybee <bee@4d2.org>2026-03-09 17:02:03 +0530
commit972e5f9c68cc433c5fc26adf92cd25b293a3776a (patch)
treec5930854787316181d07854048d9627538017ceb /lua/plugins/completion.lua
One shot upload
Diffstat (limited to 'lua/plugins/completion.lua')
-rw-r--r--lua/plugins/completion.lua65
1 files changed, 65 insertions, 0 deletions
diff --git a/lua/plugins/completion.lua b/lua/plugins/completion.lua
new file mode 100644
index 0000000..79946e1
--- /dev/null
+++ b/lua/plugins/completion.lua
@@ -0,0 +1,65 @@
+return {
+ {
+ "blink.cmp",
+ event = { "InsertEnter", "CmdlineEnter" },
+ for_cat = "core.completion",
+ load = function(name)
+ require("lzextras").loaders.multi({
+ name,
+ -- "blink-ripgrep.nvim",
+ "friendly-snippets",
+ })
+ end,
+ after = function(_)
+ require("blink.cmp").setup({
+ keymap = { preset = "default" },
+ appearance = { nerd_font_variant = "mono" },
+ signature = { enabled = false },
+ completion = {
+ documentation = {
+ auto_show = false,
+ },
+ menu = {
+ draw = {
+ columns = {
+ { "label", "label_description", gap = 1 },
+ { "kind_icon", "kind", gap = 1 },
+ },
+ treesitter = { "lsp" },
+ },
+ },
+ },
+ sources = {
+ default = { "lsp", "path", "snippets", "buffer", "cmdline", "omni" },
+ providers = {
+ path = {
+ score_offset = 25,
+ },
+ lsp = {
+ fallbacks = {},
+ score_offset = 20,
+ },
+ snippets = {
+ score_offset = 20,
+ },
+ buffer = {
+ score_offset = 5,
+ },
+ -- ripgrep = {
+ -- module = "blink-ripgrep",
+ -- name = "Ripgrep",
+ -- opts = {
+ -- project_root_marker = { ".git", "flake.nix", "flake.lock" },
+ -- backend = {
+ -- use = "gitgrep-or-ripgrep",
+ -- customize_icon_highlight = false,
+ -- },
+ -- },
+ -- },
+ },
+ },
+ fuzzy = { implementation = "prefer_rust_with_warning" },
+ })
+ end,
+ },
+}