Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Pain with cmp integration... #118

Open
mzealey opened this issue Nov 8, 2024 · 1 comment
Open

Pain with cmp integration... #118

mzealey opened this issue Nov 8, 2024 · 1 comment

Comments

@mzealey
Copy link

mzealey commented Nov 8, 2024

Not sure if it's an issue with supermaven or cmp but I'll start here... I've the following setup:

  require("lazy").setup({
      {
        "supermaven-inc/supermaven-nvim",
        config = function() 
          require("supermaven-nvim").setup({
            color = {
              suggestion_color = "#999999",
              cterm = 244,
            },
            disable_keymaps = true,
          })
        end,
      
      },
      
  
  cmp.setup({
    snippet = {
      expand = function(args)
        vim.snippet.expand(args.body) -- For native neovim snippets (Neovim v0.10+)
      end,
    },
    mapping = cmp.mapping.preset.insert({
      ['<C-Space>'] = cmp.mapping.complete(),   
      ['<C-e>'] = cmp.mapping.abort(),
      ['<CR>'] = cmp.mapping.confirm({ select = false }), -- Accept currently selected item. Set `select` to `false` to only confirm explicitly selected items.
      ['<Tab>'] = cmp.mapping.select_next_item(), 
    }),
    sources = cmp.config.sources({                                                                                                                                                 
      { name = 'supermaven', priority = 1 },
      { name = 'nvim_lsp', priority = 2, max_item_count = 15},
      { name = 'path', priority = 5, max_item_count = 10},
    }, {
      { name = 'buffer' },      
    })                          
  })                            

The way the (python) lsp and supermaven work together is not great - it's kind of like supermaven will pop up with the grey auto-complete text, but it won't appear in cmp, but then half the time it does. It feels like there's some race between lsp and supermaven whereby supermaven's result is getting nuked, but only sometimes. Any suggestions of how to debug this further would be appreciated.

@AlejandroSuero
Copy link
Contributor

@mzealey this issue may be related if you want to check it out #77

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants