my dotfiles for arch
at main 99 lines 3.3 kB view raw
1return { 2 -- Autocompletion 3 "saghen/blink.cmp", 4 event = "VimEnter", 5 version = "1.*", 6 dependencies = { 7 -- Snippet Engine 8 { 9 "L3MON4D3/LuaSnip", 10 version = "2.*", 11 build = (function() 12 -- Build Step is needed for regex support in snippets. 13 -- This step is not supported in many windows environments. 14 -- Remove the below condition to re-enable on windows. 15 if vim.fn.has("win32") == 1 or vim.fn.executable("make") == 0 then 16 return 17 end 18 return "make install_jsregexp" 19 end)(), 20 dependencies = { 21 -- `friendly-snippets` contains a variety of premade snippets. 22 -- See the README about individual language/framework/plugin snippets: 23 -- https://github.com/rafamadriz/friendly-snippets 24 -- { 25 -- 'rafamadriz/friendly-snippets', 26 -- config = function() 27 -- require('luasnip.loaders.from_vscode').lazy_load() 28 -- end, 29 -- }, 30 }, 31 opts = {}, 32 }, 33 "folke/lazydev.nvim", 34 }, 35 --- @module 'blink.cmp' 36 --- @type blink.cmp.Config 37 opts = { 38 keymap = { 39 -- 'default' (recommended) for mappings similar to built-in completions 40 -- <c-y> to accept ([y]es) the completion. 41 -- This will auto-import if your LSP supports it. 42 -- This will expand snippets if the LSP sent a snippet. 43 -- 'super-tab' for tab to accept 44 -- 'enter' for enter to accept 45 -- 'none' for no mappings 46 -- 47 -- For an understanding of why the 'default' preset is recommended, 48 -- you will need to read `:help ins-completion` 49 -- 50 -- No, but seriously. Please read `:help ins-completion`, it is really good! 51 -- 52 -- All presets have the following mappings: 53 -- <tab>/<s-tab>: move to right/left of your snippet expansion 54 -- <c-space>: Open menu or open docs if already open 55 -- <c-n>/<c-p> or <up>/<down>: Select next/previous item 56 -- <c-e>: Hide menu 57 -- <c-k>: Toggle signature help 58 -- 59 -- See :h blink-cmp-config-keymap for defining your own keymap 60 preset = "default", 61 62 -- For more advanced Luasnip keymaps (e.g. selecting choice nodes, expansion) see: 63 -- https://github.com/L3MON4D3/LuaSnip?tab=readme-ov-file#keymaps 64 }, 65 66 appearance = { 67 -- 'mono' (default) for 'Nerd Font Mono' or 'normal' for 'Nerd Font' 68 -- Adjusts spacing to ensure icons are aligned 69 nerd_font_variant = "mono", 70 }, 71 72 completion = { 73 -- By default, you may press `<c-space>` to show the documentation. 74 -- Optionally, set `auto_show = true` to show the documentation after a delay. 75 documentation = { auto_show = false, auto_show_delay_ms = 500 }, 76 }, 77 78 sources = { 79 default = { "lsp", "path", "snippets", "lazydev" }, 80 providers = { 81 lazydev = { module = "lazydev.integrations.blink", score_offset = 100 }, 82 }, 83 }, 84 85 snippets = { preset = "luasnip" }, 86 87 -- Blink.cmp includes an optional, recommended rust fuzzy matcher, 88 -- which automatically downloads a prebuilt binary when enabled. 89 -- 90 -- By default, we use the Lua implementation instead, but you may enable 91 -- the rust implementation via `'prefer_rust_with_warning'` 92 -- 93 -- See :h blink-cmp-config-fuzzy for more information 94 fuzzy = { implementation = "lua" }, 95 96 -- Shows a signature help window while you type arguments for a function 97 signature = { enabled = true }, 98 }, 99}