Advertisement
Guest User

Untitled

a guest
Apr 23rd, 2025
34
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Diff 1.78 KB | None | 0 0
  1. --- a/init.lua
  2. +++ b/init.lua
  3. @@ -708,7 +708,11 @@ require('lazy').setup({
  4.        },
  5.        'folke/lazydev.nvim',
  6.        {
  7. -        'giuxtaposition/blink-cmp-copilot',
  8. +        'fang2hou/blink-copilot',
  9. +        opts = {
  10. +          max_completions = 1,
  11. +          max_attempts = 2,
  12. +        },
  13.        },
  14.      },
  15.      --- @module 'blink.cmp'
  16. @@ -760,18 +764,9 @@ require('lazy').setup({
  17.            lazydev = { module = 'lazydev.integrations.blink', score_offset = 100 },
  18.            copilot = {
  19.              name = 'copilot',
  20. -            module = 'blink-cmp-copilot',
  21. +            module = 'blink-copilot',
  22.              score_offset = 100,
  23.              async = true,
  24. -            transform_items = function(_, items)
  25. -              local CompletionItemKind = require('blink.cmp.types').CompletionItemKind
  26. -              local kind_idx = #CompletionItemKind + 1
  27. -              CompletionItemKind[kind_idx] = 'Copilot'
  28. -              for _, item in ipairs(items) do
  29. -                item.kind = kind_idx
  30. -              end
  31. -              return items
  32. -            end,
  33.            },
  34.          },
  35.        },
  36. diff --git a/lua/custom/plugins/copilot.lua b/lua/custom/plugins/copilot.lua
  37. index 30d967f..d03f681 100644
  38. --- a/lua/custom/plugins/copilot.lua
  39. +++ b/lua/custom/plugins/copilot.lua
  40. @@ -1,11 +1,10 @@
  41.  return {
  42. -  'zbirenbaum/copilot.lua',
  43. -  cmd = 'Copilot',
  44. -  event = 'InsertEnter',
  45. -  config = function()
  46. -    require('copilot').setup {
  47. -      panel = { enabled = false },
  48. -      suggestion = { enabled = false },
  49. -    }
  50. +  'copilotlsp-nvim/copilot-lsp',
  51. +  init = function()
  52. +    vim.g.copilot_nes_debounce = 500
  53. +    vim.lsp.enable 'copilot'
  54. +    vim.keymap.set('n', '<tab>', function()
  55. +      require('copilot-lsp.nes').apply_pending_nes()
  56. +    end)
  57.    end,
  58.  }
  59.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement