Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- return {
- {
- "saghen/blink.cmp",
- version = "1.*",
- ---@module 'blink.cmp'
- ---@type blink.cmp.Config
- opts = {
- keymap = {
- preset = "none",
- ["<Tab>"] = {
- "snippet_forward",
- "fallback",
- },
- ["<S-Tab>"] = {
- "snippet_backward",
- "fallback",
- },
- ["<C-n>"] = {
- "select_next",
- "fallback",
- },
- ["<C-j>"] = {
- "select_next",
- "fallback",
- },
- ["<C-k>"] = {
- "select_prev",
- "fallback",
- },
- -- toggle signature help
- ["<C-s>"] = {
- function(cmp)
- cmp.show_signature()
- end,
- "fallback",
- },
- -- ctrl+Space to accept a suggestion, ctrl y is not convenient to press
- ["<C-Space>"] = {
- function(cmp)
- cmp.accept()
- end,
- -- "fallback", --dont enable this, the default fallback kinda fks the buffers a bit
- },
- },
- appearance = {
- nerd_font_variant = "mono",
- kind_icons = {
- -- overriding the default snippet icon
- Snippet = "",
- },
- },
- signature = { enabled = true },
- -- (Default) Only show the documentation popup when manually triggered
- completion = {
- documentation = { auto_show = true },
- ghost_text = { enabled = false, show_without_selection = false },
- menu = {
- draw = {
- components = {
- kind_icon = {
- text = function(ctx)
- local icon = ctx.kind_icon
- return icon .. " / " .. ctx.kind .. ctx.icon_gap
- end,
- },
- },
- },
- },
- },
- -- Default list of enabled providers defined so that you can extend it
- -- elsewhere in your config, without redefining it, due to `opts_extend`
- sources = {
- default = {
- "lsp",
- "path",
- "snippets",
- "buffer",
- },
- },
- fuzzy = { implementation = "lua" },
- },
- opts_extend = { "sources.default" },
- },
- {
- "L3MON4D3/LuaSnip",
- build = (function()
- if vim.fn.has("win32") == 1 or vim.fn.executable("make") == 0 then
- return
- end
- return "make install_jsregexp"
- end)(),
- dependencies = {
- {
- "rafamadriz/friendly-snippets",
- config = function()
- require("luasnip.loaders.from_vscode").lazy_load()
- end,
- },
- },
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement