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

Doesn't work with lazy #246

Open
hrqmonteiro opened this issue Aug 21, 2024 · 1 comment
Open

Doesn't work with lazy #246

hrqmonteiro opened this issue Aug 21, 2024 · 1 comment

Comments

@hrqmonteiro
Copy link

image
image

Putting "lazy: false" also doesn't help. The plugin is not loaded.

@pkazmier
Copy link

Trying changing setup to config in the above code snippet (or :setup to :config in your fennel file). Lazy does not have a setup property in the plugin spec.

As a tip, when trying to figure out how to define a plugin using the lazy package manager, I'll check LazyVim (not the package manager, but the distribution by the same author of the lazy package manager) to see how it defines the plugin. For example, here is the page on the LazyVim site that shows how they integrate leap. Once on that page, scroll down to the Leap section, and click on the Full Spec. It will show you the following, the most important of which is that it uses the config property to enable the default mappings:

{
  "ggandor/leap.nvim",
  enabled = true,
  keys = {
    { "s", mode = { "n", "x", "o" }, desc = "Leap Forward to" },
    { "S", mode = { "n", "x", "o" }, desc = "Leap Backward to" },
    { "gs", mode = { "n", "x", "o" }, desc = "Leap from Windows" },
  },
  config = function(_, opts)
    local leap = require("leap")
    for k, v in pairs(opts) do
      leap.opts[k] = v
    end
    leap.add_default_mappings(true)
    vim.keymap.del({ "x", "o" }, "x")
    vim.keymap.del({ "x", "o" }, "X")
  end,
}

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