]> git.rmz.io Git - dotfiles.git/blob - nvim/lua/plugins/blink.lua
vim: do not set pastetoggle in nvim
[dotfiles.git] / nvim / lua / plugins / blink.lua
1 return {
2 {
3 "saghen/blink.cmp",
4 version = "*",
5 -- build = "cargo build --release",
6 dependencies = {
7 "rafamadriz/friendly-snippets",
8 },
9 -- NOTE: not described in upstream install docs
10 event = "InsertEnter",
11
12 ---@module 'blink.cmp'
13 ---@type blink.cmp.Config
14 opts = {
15 completion = {
16 menu = { draw = { treesitter = { "lsp" }, }, },
17 documentation = {
18 auto_show = true,
19 auto_show_delay_ms = 200,
20 },
21 ghost_text = {
22 enabled = true,
23 },
24 },
25
26 cmdline = {
27 enabled = false,
28 },
29 sources = {
30 default = { "lsp", "path", "snippets", "buffer" },
31 },
32 snippets = {
33 preset = "luasnip",
34 },
35
36 keymap = {
37 preset = "enter",
38 ["<C-y>"] = { "select_and_accept" },
39 },
40 },
41 opts_extend = { "sources.default", },
42 },
43
44 -- add icons
45 {
46 "saghen/blink.cmp",
47 opts = function(_, opts)
48 opts.appearance = opts.appearance or {}
49 opts.appearance.kind_icons = vim.tbl_extend("force", opts.appearance.kind_icons or {}, rmz.ui.icons.kinds)
50 end,
51 },
52
53 -- lazydev
54 {
55 "saghen/blink.cmp",
56 opts = {
57 sources = {
58 -- add lazydev to your completion providers
59 default = { "lazydev" },
60 providers = {
61 lazydev = {
62 name = "LazyDev",
63 module = "lazydev.integrations.blink",
64 score_offset = 100, -- show at a higher priority than lsp
65 },
66 },
67 },
68 },
69 },
70 -- catppuccin support
71 {
72 "catppuccin",
73 optional = true,
74 opts = {
75 integrations = { blink_cmp = true },
76 },
77 },
78 }