LazyVim icon indicating copy to clipboard operation
LazyVim copied to clipboard

feat(cmp): replace nvim-cmp with magazine.nvim

Open OneOfOne opened this issue 1 year ago • 11 comments

Description

Use iguanacucumber/magazine.nvim instead of hrsh7th/nvim-cmp for better performance

OneOfOne avatar Nov 15 '24 17:11 OneOfOne

@folke ideas?

OneOfOne avatar Nov 19 '24 21:11 OneOfOne

@folke i can rebase if you're interested in this.

OneOfOne avatar Dec 12 '24 20:12 OneOfOne

@OneOfOne I wonder if there's a different way to do this, since from the look of it any custom configuration to "hrsh7th/nvim-cmp" from end users would be lost, I wonder if this can be fixed by changing https://github.com/LazyVim/LazyVim/blob/main/lua/lazyvim/plugins/xtras.lua and add it with a higher priority?

igorgue avatar Dec 15 '24 00:12 igorgue

Setting name=nvim-cmp fixes that issue, at least for me.

But I'm open to suggestions.

I have been using that setup for a few months now, I'm still having issues with blink sorting so I keep going back to it.

OneOfOne avatar Dec 15 '24 01:12 OneOfOne

Why would users' custom configuration be lost? When I tried it, I just configured it exactly like nvim-cmp. It's nvim-cmp itself under the hood for the most part if I understand correctly (I say "for the most part" because I don't know if anything new has been provided by the new maintainer and I don't mean just backlog from PRs that nvim-cmp had accumulated over time, so I'm ignorant in that regard), just a different name.

And with defining name = nvim-cmp it should be just plug and play by lazy.nvim. Just try it out in your personal configuration.

dpetka2001 avatar Dec 15 '24 01:12 dpetka2001

This should be an extra instead of overwriting all refs to nvim-cmp. Haven't tested this, but doing something like:

{ "hrsh7th/nvim-cmp", url="magazine url"}

And the same for the other changes, should work.

folke avatar Dec 15 '24 06:12 folke

Yeah I think this works for me:

return {
  {
    "hrsh7th/nvim-cmp",
    url = "iguanacucumber/magazine.nvim",
    dependencies = {
      { "iguanacucumber/mag-cmdline", name = "cmp-cmdline" },
      { "iguanacucumber/mag-nvim-lsp", name = "cmp-nvim-lsp", opts = {} },
      { "iguanacucumber/mag-nvim-lua", name = "cmp-nvim-lua" },
      { "iguanacucumber/mag-buffer", name = "cmp-buffer" },
      { "iguanacucumber/mag-cmdline", name = "cmp-cmdline" },
      { "https://codeberg.org/FelipeLema/cmp-async-path", name = "cmp-path" },
    },
  },
}

igorgue avatar Dec 15 '24 07:12 igorgue

This PR is stale because it has been open 30 days with no activity.

github-actions[bot] avatar Jan 15 '25 01:01 github-actions[bot]

Hi, magazine.nvim author here, if you want to use magazine.nvim, please pull from the releases to have a more stable experience since it's a "beta" nvim-cmp

So the config should look like this:

return {
  {
    "hrsh7th/nvim-cmp",
    url = "iguanacucumber/magazine.nvim",
    version = "*",
    dependencies = {
      { "iguanacucumber/mag-cmdline", name = "cmp-cmdline", version = "*" },
      { "iguanacucumber/mag-nvim-lsp", name = "cmp-nvim-lsp", opts = {}, version = "*" },
      { "iguanacucumber/mag-nvim-lua", name = "cmp-nvim-lua", version = "*" },
      { "iguanacucumber/mag-buffer", name = "cmp-buffer", version = "*" },
      { "https://codeberg.org/FelipeLema/cmp-async-path", name = "cmp-path" },
    },
  },
}

iguanacucumber avatar Jan 26 '25 14:01 iguanacucumber

I have since moved to blink, however if @folke is interested, I can rebase it against master.

OneOfOne avatar Jan 26 '25 19:01 OneOfOne

This PR is stale because it has been open 30 days with no activity.

github-actions[bot] avatar Feb 26 '25 02:02 github-actions[bot]

Looks like https://github.com/iguanacucumber/magazine.nvim is archived now. Is this PR still valid ?

80avin avatar Jul 03 '25 17:07 80avin

This PR is stale because it has been open 30 days with no activity.

github-actions[bot] avatar Aug 03 '25 02:08 github-actions[bot]