Giter Club home page Giter Club logo

lazy.nvim's Introduction

๐Ÿ’ค lazy.nvim

lazy.nvim is a modern plugin manager for Neovim.

image

โœจ Features

  • ๐Ÿ“ฆ Manage all your Neovim plugins with a powerful UI
  • ๐Ÿš€ Fast startup times thanks to automatic caching and bytecode compilation of Lua modules
  • ๐Ÿ’พ Partial clones instead of shallow clones
  • ๐Ÿ”Œ Automatic lazy-loading of Lua modules and lazy-loading on events, commands, filetypes, and key mappings
  • โณ Automatically install missing plugins before starting up Neovim, allowing you to start using it right away
  • ๐Ÿ’ช Async execution for improved performance
  • ๐Ÿ› ๏ธ No need to manually compile plugins
  • ๐Ÿงช Correct sequencing of dependencies
  • ๐Ÿ“ Configurable in multiple files
  • ๐Ÿ“š Generates helptags of the headings in README.md files for plugins that don't have vimdocs
  • ๐Ÿ’ป Dev options and patterns for using local plugins
  • ๐Ÿ“Š Profiling tools to optimize performance
  • ๐Ÿ”’ Lockfile lazy-lock.json to keep track of installed plugins
  • ๐Ÿ”Ž Automatically check for updates
  • ๐Ÿ“‹ Commit, branch, tag, version, and full Semver support
  • ๐Ÿ“ˆ Statusline component to see the number of pending updates
  • ๐ŸŽจ Automatically lazy-loads colorschemes

โšก๏ธ Requirements

  • Neovim >= 0.8.0 (needs to be built with LuaJIT)
  • Git >= 2.19.0 (for partial clones support)
  • a Nerd Font (optional)

๐Ÿ“ฆ Installation

You can add the following Lua code to your init.lua to bootstrap lazy.nvim:

local lazypath = vim.fn.stdpath("data") .. "/lazy/lazy.nvim"
if not (vim.uv or vim.loop).fs_stat(lazypath) then
  vim.fn.system({
    "git",
    "clone",
    "--filter=blob:none",
    "https://github.com/folke/lazy.nvim.git",
    "--branch=stable", -- latest stable release
    lazypath,
  })
end
vim.opt.rtp:prepend(lazypath)

Next step is to add lazy.nvim below the code added in the prior step in init.lua:

require("lazy").setup(plugins, opts)
-- Example using a list of specs with the default options
vim.g.mapleader = " " -- Make sure to set `mapleader` before lazy so your mappings are correct
vim.g.maplocalleader = "\\" -- Same for `maplocalleader`

require("lazy").setup({
  "folke/which-key.nvim",
  { "folke/neoconf.nvim", cmd = "Neoconf" },
  "folke/neodev.nvim",
})

โ„น๏ธ It is recommended to run :checkhealth lazy after installation.

๐Ÿ”Œ Plugin Spec

Property Type Description
[1] string? Short plugin url. Will be expanded using config.git.url_format
dir string? A directory pointing to a local plugin
url string? A custom git url where the plugin is hosted
name string? A custom name for the plugin used for the local plugin directory and as the display name
dev boolean? When true, a local plugin directory will be used instead. See config.dev
lazy boolean? When true, the plugin will only be loaded when needed. Lazy-loaded plugins are automatically loaded when their Lua modules are required, or when one of the lazy-loading handlers triggers
enabled boolean? or fun():boolean When false, or if the function returns false, then this plugin will not be included in the spec
cond boolean? or fun(LazyPlugin):boolean When false, or if the function returns false, then this plugin will not be loaded. Useful to disable some plugins in vscode, or firenvim for example.
dependencies LazySpec[] A list of plugin names or plugin specs that should be loaded when the plugin loads. Dependencies are always lazy-loaded unless specified otherwise. When specifying a name, make sure the plugin spec has been defined somewhere else.
init fun(LazyPlugin) init functions are always executed during startup
opts table or fun(LazyPlugin, opts:table) opts should be a table (will be merged with parent specs), return a table (replaces parent specs) or should change a table. The table will be passed to the Plugin.config() function. Setting this value will imply Plugin.config()
config fun(LazyPlugin, opts:table) or true config is executed when the plugin loads. The default implementation will automatically run require(MAIN).setup(opts) if opts or config = true is set. Lazy uses several heuristics to determine the plugin's MAIN module automatically based on the plugin's name. See also opts. To use the default implementation without opts set config to true.
main string? You can specify the main module to use for config() and opts(), in case it can not be determined automatically. See config()
build fun(LazyPlugin) or string or a list of build commands build is executed when a plugin is installed or updated. Before running build, a plugin is first loaded. If it's a string it will be run as a shell command. When prefixed with : it is a Neovim command. You can also specify a list to executed multiple build commands. Some plugins provide their own build.lua which is automatically used by lazy. So no need to specify a build step for those plugins.
branch string? Branch of the repository
tag string? Tag of the repository
commit string? Commit of the repository
version string? or false to override the default Version to use from the repository. Full Semver ranges are supported
pin boolean? When true, this plugin will not be included in updates
submodules boolean? When false, git submodules will not be fetched. Defaults to true
event string? or string[] or fun(self:LazyPlugin, event:string[]):string[] or {event:string[]|string, pattern?:string[]|string} Lazy-load on event. Events can be specified as BufEnter or with a pattern like BufEnter *.lua
cmd string? or string[] or fun(self:LazyPlugin, cmd:string[]):string[] Lazy-load on command
ft string? or string[] or fun(self:LazyPlugin, ft:string[]):string[] Lazy-load on filetype
keys string? or string[] or LazyKeysSpec[] or fun(self:LazyPlugin, keys:string[]):(string | LazyKeysSpec)[] Lazy-load on key mapping
module false? Do not automatically load this Lua module when it's required somewhere
priority number? Only useful for start plugins (lazy=false) to force loading certain plugins first. Default priority is 50. It's recommended to set this to a high number for colorschemes.
optional boolean? When a spec is tagged optional, it will only be included in the final spec, when the same plugin has been specified at least once somewhere else without optional. This is mainly useful for Neovim distros, to allow setting options on plugins that may/may not be part of the user's plugins

Lazy Loading

lazy.nvim automagically lazy-loads Lua modules, so it is not needed to specify module=... everywhere in your plugin specification. This means that if you have a plugin A that is lazy-loaded and a plugin B that requires a module of plugin A, then plugin A will be loaded on demand as expected.

If you don't want this behavior for a certain plugin, you can specify that with module=false. You can then manually load the plugin with :Lazy load foobar.nvim.

You can configure lazy.nvim to lazy-load all plugins by default with config.defaults.lazy = true.

Additionally, you can also lazy-load on events, commands, file types and key mappings.

Plugins will be lazy-loaded when one of the following is true:

  • The plugin only exists as a dependency in your spec
  • It has an event, cmd, ft or keys key
  • config.defaults.lazy == true

๐ŸŒˆ Colorschemes

Colorscheme plugins can be configured with lazy=true. The plugin will automagically load when doing colorscheme foobar.

NOTE: since start plugins can possibly change existing highlight groups, it's important to make sure that your main colorscheme is loaded first. To ensure this you can use the priority=1000 field. (see the examples)

โŒจ๏ธ Lazy Key Mappings

The keys property can be a string or string[] for simple normal-mode mappings, or it can be a LazyKeysSpec table with the following key-value pairs:

  • [1]: (string) lhs (required)
  • [2]: (string|fun()) rhs (optional)
  • mode: (string|string[]) mode (optional, defaults to "n")
  • ft: (string|string[]) filetype for buffer-local keymaps (optional)
  • any other option valid for vim.keymap.set

Key mappings will load the plugin the first time they get executed.

When [2] is nil, then the real mapping has to be created by the config() function.

-- Example for neo-tree.nvim
{
  "nvim-neo-tree/neo-tree.nvim",
    keys = {
      { "<leader>ft", "<cmd>Neotree toggle<cr>", desc = "NeoTree" },
    },
    config = function()
      require("neo-tree").setup()
    end,
}

Versioning

If you want to install a specific revision of a plugin, you can use commit, tag, branch, version.

The version property supports Semver ranges.

Click to see some examples
  • *: latest stable version (this excludes pre-release versions)
  • 1.2.x: any version that starts with 1.2, such as 1.2.0, 1.2.3, etc.
  • ^1.2.3: any version that is compatible with 1.2.3, such as 1.3.0, 1.4.5, etc., but not 2.0.0.
  • ~1.2.3: any version that is compatible with 1.2.3, such as 1.2.4, 1.2.5, but not 1.3.0.
  • >1.2.3: any version that is greater than 1.2.3, such as 1.3.0, 1.4.5, etc.
  • >=1.2.3: any version that is greater than or equal to 1.2.3, such as 1.2.3, 1.3.0, 1.4.5, etc.
  • <1.2.3: any version that is less than 1.2.3, such as 1.1.0, 1.0.5, etc.
  • <=1.2.3: any version that is less than or equal to 1.2.3, such as 1.2.3, 1.1.0, 1.0.5, etc

You can set config.defaults.version = "*" to install the latest stable version of plugins that support Semver.

Examples

return {
  -- the colorscheme should be available when starting Neovim
  {
    "folke/tokyonight.nvim",
    lazy = false, -- make sure we load this during startup if it is your main colorscheme
    priority = 1000, -- make sure to load this before all the other start plugins
    config = function()
      -- load the colorscheme here
      vim.cmd([[colorscheme tokyonight]])
    end,
  },

  -- I have a separate config.mappings file where I require which-key.
  -- With lazy the plugin will be automatically loaded when it is required somewhere
  { "folke/which-key.nvim", lazy = true },

  {
    "nvim-neorg/neorg",
    -- lazy-load on filetype
    ft = "norg",
    -- options for neorg. This will automatically call `require("neorg").setup(opts)`
    opts = {
      load = {
        ["core.defaults"] = {},
      },
    },
  },

  {
    "dstein64/vim-startuptime",
    -- lazy-load on a command
    cmd = "StartupTime",
    -- init is called during startup. Configuration for vim plugins typically should be set in an init function
    init = function()
      vim.g.startuptime_tries = 10
    end,
  },

  {
    "hrsh7th/nvim-cmp",
    -- load cmp on InsertEnter
    event = "InsertEnter",
    -- these dependencies will only be loaded when cmp loads
    -- dependencies are always lazy-loaded unless specified otherwise
    dependencies = {
      "hrsh7th/cmp-nvim-lsp",
      "hrsh7th/cmp-buffer",
    },
    config = function()
      -- ...
    end,
  },

  -- if some code requires a module from an unloaded plugin, it will be automatically loaded.
  -- So for api plugins like devicons, we can always set lazy=true
  { "nvim-tree/nvim-web-devicons", lazy = true },

  -- you can use the VeryLazy event for things that can
  -- load later and are not important for the initial UI
  { "stevearc/dressing.nvim", event = "VeryLazy" },

  {
    "Wansmer/treesj",
    keys = {
      { "J", "<cmd>TSJToggle<cr>", desc = "Join Toggle" },
    },
    opts = { use_default_keymaps = false, max_join_length = 150 },
  },

  {
    "monaqa/dial.nvim",
    -- lazy-load on keys
    -- mode is `n` by default. For more advanced options, check the section on key mappings
    keys = { "<C-a>", { "<C-x>", mode = "n" } },
  },

  -- local plugins need to be explicitly configured with dir
  { dir = "~/projects/secret.nvim" },

  -- you can use a custom url to fetch a plugin
  { url = "[email protected]:folke/noice.nvim.git" },

  -- local plugins can also be configured with the dev option.
  -- This will use {config.dev.path}/noice.nvim/ instead of fetching it from GitHub
  -- With the dev option, you can easily switch between the local and installed version of a plugin
  { "folke/noice.nvim", dev = true },
}

โš™๏ธ Configuration

lazy.nvim comes with the following defaults:

{
  root = vim.fn.stdpath("data") .. "/lazy", -- directory where plugins will be installed
  defaults = {
    lazy = false, -- should plugins be lazy-loaded?
    version = nil,
    -- default `cond` you can use to globally disable a lot of plugins
    -- when running inside vscode for example
    cond = nil, ---@type boolean|fun(self:LazyPlugin):boolean|nil
    -- version = "*", -- enable this to try installing the latest stable versions of plugins
  },
  -- leave nil when passing the spec as the first argument to setup()
  spec = nil, ---@type LazySpec
  local_spec = true, -- load project specific .lazy.lua spec files. They will be added at the end of the spec.
  lockfile = vim.fn.stdpath("config") .. "/lazy-lock.json", -- lockfile generated after running update.
  ---@type number? limit the maximum amount of concurrent tasks
  concurrency = jit.os:find("Windows") and (vim.uv.available_parallelism() * 2) or nil,
  git = {
    -- defaults for the `Lazy log` command
    -- log = { "--since=3 days ago" }, -- show commits from the last 3 days
    log = { "-8" }, -- show the last 8 commits
    timeout = 120, -- kill processes that take more than 2 minutes
    url_format = "https://github.com/%s.git",
    -- lazy.nvim requires git >=2.19.0. If you really want to use lazy with an older version,
    -- then set the below to false. This should work, but is NOT supported and will
    -- increase downloads a lot.
    filter = true,
  },
  dev = {
    ---@type string | fun(plugin: LazyPlugin): string directory where you store your local plugin projects
    path = "~/projects",
    ---@type string[] plugins that match these patterns will use your local versions instead of being fetched from GitHub
    patterns = {}, -- For example {"folke"}
    fallback = false, -- Fallback to git when local plugin doesn't exist
  },
  install = {
    -- install missing plugins on startup. This doesn't increase startup time.
    missing = true,
    -- try to load one of these colorschemes when starting an installation during startup
    colorscheme = { "habamax" },
  },
  ui = {
    -- a number <1 is a percentage., >1 is a fixed size
    size = { width = 0.8, height = 0.8 },
    wrap = true, -- wrap the lines in the ui
    -- The border to use for the UI window. Accepts same border values as |nvim_open_win()|.
    border = "none",
    -- The backdrop opacity. 0 is fully opaque, 100 is fully transparent.
    backdrop = 60,
    title = nil, ---@type string only works when border is not "none"
    title_pos = "center", ---@type "center" | "left" | "right"
    -- Show pills on top of the Lazy window
    pills = true, ---@type boolean
    icons = {
      cmd = "๎ฏ‡ ",
      config = "๏€“",
      event = "๎ช† ",
      ft = "๏€– ",
      init = "๏€“ ",
      import = "๎‰ฝ ",
      keys = "๏„œ ",
      lazy = "๓ฐ’ฒ ",
      loaded = "โ—",
      not_loaded = "โ—‹",
      plugin = "๏’‡ ",
      runtime = "๎Ÿ… ",
      require = "๓ฐขฑ ",
      source = "๏„ก ",
      start = "๎ซ“ ",
      task = "โœ” ",
      list = {
        "โ—",
        "โžœ",
        "โ˜…",
        "โ€’",
      },
    },
    -- leave nil, to automatically select a browser depending on your OS.
    -- If you want to use a specific browser, you can define it here
    browser = nil, ---@type string?
    throttle = 20, -- how frequently should the ui process render events
    custom_keys = {
      -- You can define custom key maps here. If present, the description will
      -- be shown in the help menu.
      -- To disable one of the defaults, set it to false.

      ["<localleader>l"] = {
        function(plugin)
          require("lazy.util").float_term({ "lazygit", "log" }, {
            cwd = plugin.dir,
          })
        end,
        desc = "Open lazygit log",
      },

      ["<localleader>t"] = {
        function(plugin)
          require("lazy.util").float_term(nil, {
            cwd = plugin.dir,
          })
        end,
        desc = "Open terminal in plugin dir",
      },
    },
  },
  diff = {
    -- diff command <d> can be one of:
    -- * browser: opens the github compare view. Note that this is always mapped to <K> as well,
    --   so you can have a different command for diff <d>
    -- * git: will run git diff and open a buffer with filetype git
    -- * terminal_git: will open a pseudo terminal with git diff
    -- * diffview.nvim: will open Diffview to show the diff
    cmd = "git",
  },
  checker = {
    -- automatically check for plugin updates
    enabled = false,
    concurrency = nil, ---@type number? set to 1 to check for updates very slowly
    notify = true, -- get a notification when new updates are found
    frequency = 3600, -- check for updates every hour
    check_pinned = false, -- check for pinned packages that can't be updated
  },
  change_detection = {
    -- automatically check for config file changes and reload the ui
    enabled = true,
    notify = true, -- get a notification when changes are found
  },
  performance = {
    cache = {
      enabled = true,
    },
    reset_packpath = true, -- reset the package path to improve startup time
    rtp = {
      reset = true, -- reset the runtime path to $VIMRUNTIME and your config directory
      ---@type string[]
      paths = {}, -- add any custom paths here that you want to includes in the rtp
      ---@type string[] list any plugins you want to disable here
      disabled_plugins = {
        -- "gzip",
        -- "matchit",
        -- "matchparen",
        -- "netrwPlugin",
        -- "tarPlugin",
        -- "tohtml",
        -- "tutor",
        -- "zipPlugin",
      },
    },
  },
  -- lazy can generate helptags from the headings in markdown readme files,
  -- so :help works even for plugins that don't have vim docs.
  -- when the readme opens with :help it will be correctly displayed as markdown
  readme = {
    enabled = true,
    root = vim.fn.stdpath("state") .. "/lazy/readme",
    files = { "README.md", "lua/**/README.md" },
    -- only generate markdown helptags for plugins that dont have docs
    skip_if_doc_exists = true,
  },
  state = vim.fn.stdpath("state") .. "/lazy/state.json", -- state info for checker and other things
  build = {
    -- Plugins can provide a `build.lua` file that will be executed when the plugin is installed
    -- or updated. When the plugin spec also has a `build` command, the plugin's `build.lua` not be
    -- executed. In this case, a warning message will be shown.
    warn_on_override = true,
  },
  -- Enable profiling of lazy.nvim. This will add some overhead,
  -- so only enable this when you are debugging lazy.nvim
  profiling = {
    -- Enables extra stats on the debug tab related to the loader cache.
    -- Additionally gathers stats about all package.loaders
    loader = false,
    -- Track each new require in the Lazy profiling tab
    require = false,
  },
}
If you don't want to use a Nerd Font, you can replace the icons with Unicode symbols.
{
  ui = {
    icons = {
      cmd = "โŒ˜",
      config = "๐Ÿ› ",
      event = "๐Ÿ“…",
      ft = "๐Ÿ“‚",
      init = "โš™",
      keys = "๐Ÿ—",
      plugin = "๐Ÿ”Œ",
      runtime = "๐Ÿ’ป",
      require = "๐ŸŒ™",
      source = "๐Ÿ“„",
      start = "๐Ÿš€",
      task = "๐Ÿ“Œ",
      lazy = "๐Ÿ’ค ",
    },
  },
}

๐Ÿš€ Usage

Plugins are managed with the :Lazy command. Open the help with <?> to see all the key mappings.

You can press <CR> on a plugin to show its details. Most properties can be hovered with <K> to open links, help files, readmes, git commits and git issues.

Lazy can automatically check for updates in the background. This feature can be enabled with config.checker.enabled = true.

Any operation can be started from the UI, with a sub command or an API function:

Command Lua Description
:Lazy build {plugins} require("lazy").build(opts) Rebuild a plugin
:Lazy check [plugins] require("lazy").check(opts?) Check for updates and show the log (git fetch)
:Lazy clean [plugins] require("lazy").clean(opts?) Clean plugins that are no longer needed
:Lazy clear require("lazy").clear() Clear finished tasks
:Lazy debug require("lazy").debug() Show debug information
:Lazy health require("lazy").health() Run :checkhealth lazy
:Lazy help require("lazy").help() Toggle this help page
:Lazy home require("lazy").home() Go back to plugin list
:Lazy install [plugins] require("lazy").install(opts?) Install missing plugins
:Lazy load {plugins} require("lazy").load(opts) Load a plugin that has not been loaded yet. Similar to :packadd. Like :Lazy load foo.nvim. Use :Lazy! load to skip cond checks.
:Lazy log [plugins] require("lazy").log(opts?) Show recent updates
:Lazy profile require("lazy").profile() Show detailed profiling
:Lazy reload {plugins} require("lazy").reload(opts) Reload a plugin (experimental!!)
:Lazy restore [plugins] require("lazy").restore(opts?) Updates all plugins to the state in the lockfile. For a single plugin: restore it to the state in the lockfile or to a given commit under the cursor
:Lazy sync [plugins] require("lazy").sync(opts?) Run install, clean and update
:Lazy update [plugins] require("lazy").update(opts?) Update plugins. This will also update the lockfile

Any command can have a bang to make the command wait till it finished. For example, if you want to sync lazy from the cmdline, you can use:

nvim --headless "+Lazy! sync" +qa

opts is a table with the following key-values:

  • wait: when true, then the call will wait till the operation completed
  • show: when false, the UI will not be shown
  • plugins: a list of plugin names to run the operation on
  • concurrency: limit the number of concurrently running tasks

Stats API (require("lazy").stats()):

{
  -- startuptime in milliseconds till UIEnter
  startuptime = 0,
  -- when true, startuptime is the accurate cputime for the Neovim process. (Linux & macOS)
  -- this is more accurate than `nvim --startuptime`, and as such will be slightly higher
  -- when false, startuptime is calculated based on a delta with a timestamp when lazy started.
  real_cputime = false,
  count = 0, -- total number of plugins
  loaded = 0, -- number of loaded plugins
  ---@type table<string, number>
  times = {},
}

lazy.nvim provides a statusline component that you can use to show the number of pending updates. Make sure to enable config.checker.enabled = true to make this work.

Example of configuring lualine.nvim
require("lualine").setup({
  sections = {
    lualine_x = {
      {
        require("lazy.status").updates,
        cond = require("lazy.status").has_updates,
        color = { fg = "#ff9e64" },
      },
    },
  },
})

๐Ÿ“† User Events

The following user events will be triggered:

  • LazyDone: when lazy has finished starting up and loaded your config
  • LazySync: after running sync
  • LazyInstall: after an install
  • LazyUpdate: after an update
  • LazyClean: after a clean
  • LazyCheck: after checking for updates
  • LazyLog: after running log
  • LazyLoad: after loading a plugin. The data attribute will contain the plugin name.
  • LazySyncPre: before running sync
  • LazyInstallPre: before an install
  • LazyUpdatePre: before an update
  • LazyCleanPre: before a clean
  • LazyCheckPre: before checking for updates
  • LazyLogPre: before running log
  • LazyReload: triggered by change detection after reloading plugin specs
  • VeryLazy: triggered after LazyDone and processing VimEnter auto commands
  • LazyVimStarted: triggered after UIEnter when require("lazy").stats().startuptime has been calculated. Useful to update the startuptime on your dashboard.

๐Ÿ”’ Lockfile lazy-lock.json

After every update, the local lockfile is updated with the installed revisions. It is recommended to have this file under version control.

If you use your Neovim config on multiple machines, using the lockfile, you can ensure that the same version of every plugin is installed.

If you are on another machine, you can do :Lazy restore, to update all your plugins to the version from the lockfile.

โšก Performance

Great care has been taken to make the startup code (lazy.core) as efficient as possible. During startup, all Lua files used before VimEnter or BufReadPre are byte-compiled and cached, similar to what impatient.nvim does.

My config for example loads in about 11ms with 93 plugins. I do a lot of lazy-loading though :)

lazy.nvim comes with an advanced profiler :Lazy profile to help you improve performance. The profiling view shows you why and how long it took to load your plugins.

image

๐Ÿ› Debug

See an overview of active lazy-loading handlers and what's in the module cache.

image

โ–ถ๏ธ Startup Sequence

lazy.nvim does NOT use Neovim packages and even disables plugin loading completely (vim.go.loadplugins = false). It takes over the complete startup sequence for more flexibility and better performance.

In practice this means that step 10 of Neovim Initialization is done by Lazy:

  1. All the plugins' init() functions are executed
  2. All plugins with lazy=false are loaded. This includes sourcing /plugin and /ftdetect files. (/after will not be sourced yet)
  3. All files from /plugin and /ftdetect directories in your rtp are sourced (excluding /after)
  4. All /after/plugin files are sourced (this includes /after from plugins)

Files from runtime directories are always sourced in alphabetical order.

๐Ÿ“‚ Structuring Your Plugins

Some users may want to split their plugin specs in multiple files. Instead of passing a spec table to setup(), you can use a Lua module. The specs from the module and any top-level sub-modules will be merged together in the final spec, so it is not needed to add require calls in your main plugin file to the other files.

The benefits of using this approach:

  • Simple to add new plugin specs. Just create a new file in your plugins module.
  • Allows for caching of all your plugin specs. This becomes important if you have a lot of smaller plugin specs.
  • Spec changes will automatically be reloaded when they're updated, so the :Lazy UI is always up to date.

Example:

  • ~/.config/nvim/init.lua
require("lazy").setup("plugins")
  • ~/.config/nvim/lua/plugins.lua or ~/.config/nvim/lua/plugins/init.lua (this file is optional)
return {
  "folke/neodev.nvim",
  "folke/which-key.nvim",
  { "folke/neoconf.nvim", cmd = "Neoconf" },
}
  • Any lua file in ~/.config/nvim/lua/plugins/*.lua will be automatically merged in the main plugin spec

For a real-life example, you can check LazyVim and more specifically:

โ†ฉ๏ธ Importing Specs, config & opts

As part of a spec, you can add import statements to import additional plugin modules. Both of the setup() calls are equivalent:

require("lazy").setup("plugins")

-- Same as:
require("lazy").setup({{import = "plugins"}})

To import multiple modules from a plugin, add additional specs for each import. For example, to import LazyVim core plugins and an optional plugin:

require("lazy").setup({
  spec = {
    { "LazyVim/LazyVim", import = "lazyvim.plugins" },
    { import = "lazyvim.plugins.extras.coding.copilot" },
  }
})

When you import specs, you can override them by simply adding a spec for the same plugin to your local specs, adding any keys you want to override / merge.

opts, dependencies, cmd, event, ft and keys are always merged with the parent spec. Any other property will override the property from the parent spec.

๐Ÿ“ฆ Migration Guide

  • setup โžก๏ธ init
  • requires โžก๏ธ dependencies
  • as โžก๏ธ name
  • opt โžก๏ธ lazy
  • run โžก๏ธ build
  • lock โžก๏ธ pin
  • disable=true โžก๏ธ enabled = false
  • tag='*' โžก๏ธ version="*"
  • after is not needed for most use-cases. Use dependencies otherwise.
  • wants is not needed for most use-cases. Use dependencies otherwise.
  • config don't support string type, use fun(LazyPlugin) instead.
  • module is auto-loaded. No need to specify
  • keys spec is different
  • rtp can be accomplished with:
config = function(plugin)
    vim.opt.rtp:append(plugin.dir .. "/custom-rtp")
end

With packer wants, requires and after can be used to manage dependencies. With lazy, this isn't needed for most of the Lua dependencies. They can be installed just like normal plugins (even with lazy=true) and will be loaded when other plugins need them. The dependencies key can be used to group those required plugins with the one that requires them. The plugins which are added as dependencies will always be lazy-loaded and loaded when the plugin is loaded.

  • as โžก๏ธ name
  • opt โžก๏ธ lazy
  • run โžก๏ธ build

โŒ Uninstalling

To uninstall lazy.nvim, you need to remove the following files and directories:

  • data: ~/.local/share/nvim/lazy
  • state: ~/.local/state/nvim/lazy
  • lockfile: ~/.config/nvim/lazy-lock.json

Paths can differ if you changed XDG environment variables.

๐ŸŒˆ Highlight Groups

Click to see all highlight groups
Highlight Group Default Group Description
LazyButton CursorLine
LazyButtonActive Visual
LazyComment Comment
LazyCommit @variable.builtin commit ref
LazyCommitIssue Number
LazyCommitScope Italic conventional commit scope
LazyCommitType Title conventional commit type
LazyDimmed Conceal property
LazyDir @markup.link directory
LazyH1 IncSearch home button
LazyH2 Bold titles
LazyLocal Constant
LazyNoCond DiagnosticWarn unloaded icon for a plugin where cond() was false
LazyNormal NormalFloat
LazyProgressDone Constant progress bar done
LazyProgressTodo LineNr progress bar todo
LazyProp Conceal property
LazyReasonCmd Operator
LazyReasonEvent Constant
LazyReasonFt Character
LazyReasonImport Identifier
LazyReasonKeys Statement
LazyReasonPlugin Special
LazyReasonRequire @variable.parameter
LazyReasonRuntime @macro
LazyReasonSource Character
LazyReasonStart @variable.member
LazySpecial @punctuation.special
LazyTaskError ErrorMsg task errors
LazyTaskOutput MsgArea task output
LazyUrl @markup.link url
LazyValue @string value of a property

๐Ÿ“š Plugin Authors

If your plugin needs a build step, you can create a file build.lua or build/init.lua in the root of your repo. This file will be loaded when the plugin is installed or updated.

This makes it easier for users, as they no longer need to specify a build command.

๐Ÿ“ฆ Other Neovim Plugin Managers in Lua

lazy.nvim's People

Contributors

0xadk avatar 3719e04 avatar abeldekat avatar acksld avatar artandreev avatar benelan avatar bkoropoff avatar bojanstipic avatar clason avatar craigmac avatar david-kunz avatar dependabot[bot] avatar dirn avatar distinctwind avatar dsully avatar dundargoc avatar folke avatar github-actions[bot] avatar indianboy42 avatar jemag avatar kdarkhan avatar kyoh86 avatar mariasolos avatar max397574 avatar muniftanjim avatar polyzen avatar ribru17 avatar tsakirist avatar tzachar avatar unrealapex avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

lazy.nvim's Issues

`Merging plugins is not supported for key `dir``

Describe the bug
I get this error on startup for all the local plugins (as new) in combination with always the same plugin as old.
If I remove the plugin then just another one is the old one.

Which version of Neovim are you using?
NVIM v0.9.0-dev-525+ga7332ba9b

Expected Behavior
No errors

Screenshots
image
image

Log
Please include any related errors from the Noice log file. (open with :Lazy log)

Lazy log

lazy.nvim (H) Install (I) Update (U) Sync (S) Clean (X) Check (C) Log (L) Restore (R) Profile (P) Debug (D) Help (?)

Total: 55 plugins

Breaking Changes (1)
โ— lazy.nvim 56170.32ms ๏„ก init.lua
3c3a711 chore(build): auto-generate vimdoc (67 minutes ago)
44f80a7 feat(plugin): allow plugin files only without a main plugin module. Fixes #53 (68 minutes ago)
f5734f5 chore(build): auto-generate vimdoc (2 hours ago)
3814883 fix(ui): set current win only when its valid (2 hours ago)
3a7b8c8 chore(main): release 5.1.0 (#30) (11 hours ago)
3606d62 fix: add after directories to rtp to make after/ftplugin and others work. Fixes #47 (11 hours ago)
b193f96 fix(spec): only process a spec once (11 hours ago)
7be46bc style: removed unused requires (12 hours ago)
897d6df fix: add filetype to window buffer. (#41) (13 hours ago)
14300b3 chore(build): auto-generate vimdoc (13 hours ago)
78e9d6c docs: add a note about mapleader (13 hours ago)
06ac8bd perf(ui): clear existing extmarks before rendering (13 hours ago)
ffcd0ab fix(loader): source filetype.lua before plugins. Fixes #35 (14 hours ago)
9d12cdc fix(git): don't run git log for submodules. Fixes #33 (14 hours ago)
06ffcf5 chore(build): auto-generate vimdoc (14 hours ago)
7fb0652 docs: added docs on update checker (14 hours ago)
1f86cb3 chore(build): auto-generate vimdoc (15 hours ago)
3cffb2a docs: added change detection to the readme (15 hours ago)
6c767a6 feat: added options to configure change detection. Fixes #32 (15 hours ago)
cd162f3 chore(build): auto-generate vimdoc (15 hours ago)
941df31 feat(ui): make the windoww size configurable. Fixes #34 (15 hours ago)
5298441 fix: use nvim_feekeys instead of nvim_input for keys handler. Fixes #28 (16 hours ago)
2927b05 docs: added lincense (16 hours ago)
4d78203 chore(main): release 5.0.1 (#17) (17 hours ago)
1371a14 fix(build): use the shell to execute build commands (17 hours ago)
ffabe91 fix(cache): if mod is loaded already in the loader, then return that (18 hours ago)
316503f fix: dont autoload cached modules when module=false (18 hours ago)
992c679 fix: always set Config.me regardless of reset rtp (18 hours ago)
df6c986 fix: add neovim libs to rtp for treesitter parsers etc (19 hours ago)
49b69b7 chore(build): auto-generate vimdoc (20 hours ago)
e9d3a73 fix: default logs are now since 3 days ago to be in line with the docs (20 hours ago)
4234322 chore(build): auto-generate vimdoc (20 hours ago)
6e32759 fix: deepcopy lazyspec before processing (20 hours ago)
ec0f8d0 docs: added config.dev.path to the example (20 hours ago)
6404d42 fix: move re-sourcing check to the top (20 hours ago)
ddf36d7 fix: checker should not error on non-existing dirs (20 hours ago)
50ba619 test: fix tests (21 hours ago)
f78d8bf fix: show error when merging, but continue (21 hours ago)
b8a0055 chore(build): auto-generate vimdoc (22 hours ago)
1754056 fix: use jobstart instead of system to open urls (22 hours ago)
5ecc988 docs: use https to bootstrap lazy (22 hours ago)
ae644a6 fix: only run updated checker for installed plugins. Fixes #16 (22 hours ago)
7225b05 chore(build): auto-generate vimdoc (23 hours ago)
17fd57a docs: added docs for statusline and count (23 hours ago)
48a596e chore(build): auto-generate vimdoc (23 hours ago)
dfe8a65 docs: removed extra performance section (23 hours ago)
1fa2d87 docs: moved my dots to structuring plugins (23 hours ago)
9916318 chore(build): auto-generate vimdoc (23 hours ago)
abe026a docs: added section on performance (23 hours ago)
82aea47 chore(build): auto-generate vimdoc (24 hours ago)
72d66cd docs: updated lua stuff (24 hours ago)
ca43018 chore(build): auto-generate vimdoc (24 hours ago)
36cb7ea docs: migration guide (24 hours ago)
2f59ead chore(main): release 5.0.0 (#12) (24 hours ago)
dbcf675 chore(build): auto-generate vimdoc (24 hours ago)
b906ad9 docs: added windows to supported platforms (24 hours ago)
cb87aa3 ci: run tests on linux only for nw (25 hours ago)
75a36f3 chore(build): auto-generate vimdoc (25 hours ago)
af87108 fix(util): fixed double slashes (25 hours ago)
62c1542 fix(cache): normalize paths (26 hours ago)
bb1c2f4 feat: added support for Windows (27 hours ago)
198963f feat: utility method to normalize a path (27 hours ago)
a189883 fix: check for installed plugins with plain find (27 hours ago)
833b387 chore(build): auto-generate vimdoc (2 days ago)
ff89319 docs: removed dots from features (2 days ago)
b7bf18a style: spelling (2 days ago)
66dad89 chore(build): auto-generate vimdoc (2 days ago)
0c0b8b7 docs: todo (2 days ago)
92fd0d4 docs: updated installation and structuring plugins (2 days ago)
1baa92f docs: added docs on <cr> and <K> (2 days ago)
d827d8a docs: collapse semver examples (2 days ago)
1e16363 chore(build): auto-generate vimdoc (2 days ago)
980cfa9 docs: added config example when not using a Nerd Font (2 days ago)
713dcb6 build: added markdownlint config (2 days ago)
706fe6f chore(build): auto-generate vimdoc (2 days ago)
5ed9855 feat: added completion for all lazy commands (2 days ago)
b462787 docs: added optional plugins to docs for commands and methods (2 days ago)
f29f3d2 chore(build): auto-generate vimdoc (2 days ago)
1efa710 feat: added module=false to skip auto-loading of plugins on require (2 days ago)
55d194c chore(build): auto-generate vimdoc (2 days ago)
bac34cc docs: added section on uninstalling (2 days ago)
c065ca2 chore(build): auto-generate vimdoc (2 days ago)
2dd6230 feat: added :Lazy load foobar.nvim to load a plugin (2 days ago)
8a0da3b config: move lazy cache to state/nvim/lazy/cache (2 days ago)
7eb6034 chore(build): auto-generate vimdoc (2 days ago)
6567580 chore: todo (2 days ago)
6f00cde docs: typos (2 days ago)
faac2dd perf(cache): cache loadfile and no find modpaths without package.loaders (2 days ago)
32f2b71 fix(cache): do a fast check to see if a cached modpath is still valid. find it again otherwise (2 days ago)
1fe43f3 fix(ui): focus Lazy window when auto-installing plugins in VimEnter (2 days ago)
d4aee27 feat!: removed the LazyUpdate etc commands. sub-commands only from now on (2 days ago)
b89e6bf perf: lazy-load the commands available on the lazy module (3 days ago)
48309dd chore(main): release 4.2.0 (#11) (3 days ago)
c87673c feat(ui): added help for on a plugin (3 days ago)
b88b7d7 chore(build): auto-generate vimdoc (3 days ago)
e42a180 docs: added line on :checkhealth (3 days ago)
2526a01 chore(build): auto-generate vimdoc (3 days ago)
968fa3f style: removed bold from home button (3 days ago)
5fc87f9 docs: updated screenshots (3 days ago)
cd3d87c chore(build): auto-generate vimdoc (3 days ago)
d0651e4 docs: added section about the lockfile (3 days ago)
39f629e chore(build): auto-generate vimdoc (3 days ago)
628d421 docs: added my dots to the examples (3 days ago)
c88ad91 docs: added section on versioning (3 days ago)
78b284c docs: added section on lazy loading (3 days ago)
c0d3617 feat: check if ffi is available and error if not (3 days ago)
0f62ec0 chore(build): auto-generate vimdoc (3 days ago)
b70bb19 docs: added more detailed requirements (3 days ago)
db469ed chore(build): auto-generate vimdoc (3 days ago)
671b163 docs: added more details on startup sequence (3 days ago)
1730661 docs: generate docs for commands (3 days ago)
f25f942 feat: expose all commands on main lazy module (3 days ago)

Log (11)
โ— LuaSnip 67.66ms ๏’‡ nvim-cmp
5570fd7 Auto generate docs (13 hours ago)
618b945 log: don't print a message on every start, provide log.ping() instead. (13 hours ago)

โ—‹ gitsigns.nvim
    2ab3bdf fix(blame): #697 (2 days ago)

โ— neodev.nvim 8.8ms ๏’‡  nvim-lspconfig
    c5f0a81 chore: auto-generated types for Neovim nightly (3 hours ago)
    f8b17d3 chore: auto-generated types for Neovim nightly (27 hours ago)

โ— noice.nvim 1.42ms ๎ฏ‡  LazyLoad
    e4a4290 chore(build): auto-generate vimdoc (2 days ago)
    29a2e05 feat: added `Filter.cond` to conditionally use a route (2 days ago)
    7dac8ce chore(build): auto-generate vimdoc (3 days ago)
    c9c1fbd fix: correctly apply padding based on four numbers (3 days ago)

โ— nui.nvim 0.1ms ๏’‡  noice.nvim
    b12db53 fix(layout): process split layout box change (4 hours ago)
    51721a4 fix(layout): process float layout box change (4 hours ago)
    96ef1cb feat(split): store id internally (4 hours ago)

โ— nvim-dap 4.04ms ๎ฏ‡  LazyLoad ๏’‡  rust-tools.nvim
    284c754 Stop resizing widgets if converted to non-float window (2 days ago)
    3971d9b Allow opening multiple frames or scopes widgets (2 days ago)

โ— nvim-lspconfig 20.69ms ๎ฏ‡  LazyLoad
    5292d60 docs: update server_configurations.md skip-checks: true (7 hours ago)
    f70a094 fix: rename ruff-lsp to ruff_lsp (#2337) (7 hours ago)
    80e81b1 docs: update server_configurations.md skip-checks: true (7 hours ago)
    d8a4493 chore: remove `languageFeatures`, `documentFeatures` (#2336) (7 hours ago)
    baab771 docs: update server_configurations.md skip-checks: true (8 hours ago)
    4e13145 feat: add ruff-lsp support (#2335) (8 hours ago)
    d597b0f fix: send the lsp method request after insert workspace folders (#2330) (27 hours ago)
    1ab2720 docs: update server_configurations.md skip-checks: true (27 hours ago)
    9c70f37 feat: add jq support (#2333) (27 hours ago)
    259729c docs: update server_configurations.md skip-checks: true (29 hours ago)
    aa22008 feat: add uvl support (#2331) (29 hours ago)
    dd9e7f9 fix(gdscript): support get the port from env variable (#2313) (31 hours ago)
    22c87d6 build(rockspec): fix rockspec package name (2 days ago)

โ— nvim-treesitter 10.2ms ๏’‡  nvim-treesitter-refactor
    eedb7b9 csharp: update query to parser change (26 hours ago)
    8498ebd Update parsers: c_sharp, jsonnet, query (26 hours ago)
    6e37050 Update parsers: swift (2 days ago)
    a75aded highlights(java): fix '!',param,global group (2 days ago)

โ— nvim-treesitter-textobjects 1.69ms ๎ฏ‡  LazyLoad
    e2ee8fd ci: bump stylua version (3 days ago)

โ— playground 0.98ms ๎ฏ‡  LazyLoad ๏’‡  nvim-treesitter
    3421bbb ci: bump action versions (3 days ago)

โ—‹ telescope.nvim
    d16581e fix: misidentification invert and files_with_matches (#2240) (#2262) (78 minutes ago)
    278c797 fix(builtin.live_grep): add spacer ":" even when coordinates disabled (#2275) (79 minutes ago)

Clean (6)
โ—‹
โ—‹ friendly-snippets
โ—‹ lense.nvim
โ— nvim-cmp 85.92ms ๎ช† CmdLineEnter
โ—‹ packer.nvim
โ— which-key.nvim 90.9ms ๎ฏ‡ LazyLoad

Loaded (9)
โ— neogen 0.64ms ๏’‡ nvim-cmp
โ— nvim-autopairs 1.85ms ๎ฏ‡ LazyLoad ๏’‡ nvim-cmp
โ— nvim-dap-ui 2.92ms ๎ฏ‡ LazyLoad ๏’‡ nvim-dap
โ— nvim-dap-virtual-text 0.18ms ๏’‡ nvim-dap
โ— nvim-notify 0.14ms ๏’‡ noice.nvim
โ— nvim-treesitter-refactor 11.24ms ๎ฏ‡ LazyLoad
โ— one-small-step-for-vimkind 0.12ms ๏’‡ nvim-dap
โ— plenary.nvim 1.21ms ๏’‡ nvim-cmp
โ— rust-tools.nvim 7.27ms ๏’‡ nvim-lspconfig

Installed (28)
โ—‹ Comment.nvim
โ—‹ bufferline.nvim
โ—‹ cmp-emoji
โ—‹ cmp-latex-symbols
โ—‹ cmp-nvim-lsp
โ—‹ cmp-nvim-lua
โ—‹ cmp-path
โ—‹ cmp_luasnip
โ—‹ dirbuf.nvim
โ—‹ formatter.nvim
โ—‹ gitlinker.nvim
โ—‹ heirline.nvim
โ—‹ indent-blankline.nvim
โ—‹ jeskape.nvim
โ—‹ lightspeed.nvim
โ—‹ luv-vimdocs
โ—‹ nabla.nvim
โ—‹ neorg
โ—‹ nvim-colorizer.lua
โ—‹ nvim-surround
โ—‹ nvim-treesitter-endwise
โ—‹ nvim-web-devicons
โ—‹ paperplanes.nvim
โ—‹ ssr.nvim
โ—‹ telescope-file-browser.nvim
โ—‹ telescope-fzf-native.nvim
โ—‹ toggleterm.nvim
โ—‹ trouble.nvim

Unable to update or sync

image

I am getting the above error everytime I open neovim, I've tried reinstalling everything, update, and sync.

Neovim Version

NVIM v0.8.1
Build type: Release
LuaJIT 2.1.0-beta3
Compiled by [email protected]

Features: +acl +iconv +tui
See ":help feature-compile"

   system vimrc file: "$VIM/sysinit.vim"
  fall-back for $VIM: "/opt/homebrew/Cellar/neovim/0.8.1/share/nvim"

Run :checkhealth for more info

To Reproduce
Steps to reproduce the behavior:

I haven't put much time in making a minimal reproducible config, but I believe it is because I have added plenary.nvim as a dependency for multiple plugins.

"Cannot make changes" when auto installing plugins on startup

Describe the bug
Whenever I add a new plugin, save and open to auto install I will get this weird error:

my settings file: https://github.com/MordechaiHadad/nvim/blob/master/lua/core/settings.lua

Which version of Neovim are you using?
Nightly: v0.9.0-dev-530+gde90a8bfe

To Reproduce
Steps to reproduce the behavior:

  1. Add new plugin
  2. Save plugins file
  3. Open neovim and after it auto installs I will get this error

Expected Behavior
not to error?

Log
Not seeing any errors

Better syntax for defining plugin tables

Currently a plugin definition looks like this :

 {
    "monaqa/dial.nvim",
    keys = { "<C-a>", "<C-x>" },
  },

I think it would look more readable if the

["monaqa/dial.nvim"] = {
   keys = { "<C-a>", "<C-x>" },
}

This might look trivial but when we have so many plugins, it looks more readable

example :

image

add option to add custom directories to runtime path

Is your feature request related to a problem? Please describe.
I use cheovim and it doesn't work because only my config folder but not ~/.config/nvim is added to runtime path.

Describe the solution you'd like
allow adding some directories manually to runtime path

Describe alternatives you've considered
don't use cheovim
(would be really sad)

Additional context
https://github.com/NTBBloodbath/cheovim

unclear description of `Lazy load`

for me it isn't clear whether the function can load multiple plugins at once (with a table or multiple arguments) or not
especially because it's written in plural and in singular form

image

(forgive me for opening this issue, I don't had yet the time to migrate so I couldn't test)

Allow setting a mode for a keymap

Is your feature request related to a problem? Please describe.

Since keys only works with normal mode, if you are in another mode it will not load the plugin when using the keymap.

Describe the solution you'd like

Allow mapping keys to a mode. Something like:

keys = {
  n = "<leader>fd"
}

or

keys = {
  { "n", "<leader>fd" },
}

[Question] What does "merge" mean?

In your README is:

any lua file in ~/.config/nvim/lua/plugins/*.lua will be automatically merged in the main plugin spec

does that mean that everything related in ~/.config/nvim/lua/plugins/*.lua will added to rtp?

question: performance of plugin structure

https://github.com/folke/lazy.nvim#-structuring-your-plugins

there is this part of the readme which say that you can basically have all your plugins in some files in the same folder.
I wonder how the performance of this is in comparison to just pass all the plugin specs directly to the function
since when you do the first one there are (depending on how many plugins you have) quite a few require calls to be made. Also all the stuff inside the files is loaded then.

colorscheme failing to load if set via vimscript

First of all thank you again for yet another great and solid work!

I am getting an exception while loading colorschemes if the instructions for it come from vimscript runtime paths (allegedly not if setting the option in init.lua). I have created a minimally reproducible neovim configuration as follows:

โ”œโ”€โ”€ lua
โ”‚  โ””โ”€โ”€ plugins.lua
โ”œโ”€โ”€ plugin <-- this is standard vim runtime path
โ”‚  โ””โ”€โ”€ settings.vim
โ””โ”€โ”€ init.lua

where init.lua contains, as per README

local lazypath = vim.fn.stdpath("data") .. "/lazy/lazy.nvim"
 if not vim.loop.fs_stat(lazypath) then
   vim.fn.system({
     "git",
     "clone",
     "--filter=blob:none",
     "--single-branch",
     "https://github.com/folke/lazy.nvim.git",
     lazypath,
   })
 end
 vim.opt.runtimepath:prepend(lazypath)

require("lazy").setup("plugins")

with the corresponding lua/plugins.lua file containing the list of plugins to load, as per your example

return {
    'folke/tokyonight.nvim'
 }

Now if I activate the colorscheme adding, in plugin/settings.vim

colorscheme tokyonight

I get an exception from this line and the colorscheme does not load (even if I manually set it within neovim with :colorscheme tokyonight). Viceversa, if I instead append vim.cmd[[colorscheme tokyonight]] to init.lua (after loading lazy.nvim) then all is good.

TL;DR colorschemes are only applied if instructed so in init.lua, not so if the instruction is given through standard vim runtime path plugin/<something>.vim

P. S. You may be asking why I still give the instruction via vimscript files: it is because I am currently using VimPlug and with it most settings are more easily set still via vimscript.

Which version of Neovim are you using?

nvim --version
NVIM v0.9.0-dev-531+gf04087d8b-dirty
Build type: Release
LuaJIT 2.1.0-beta3

plugin object must start with a string or lua error is produced

Describe the bug
When specifying the list of plugins, if the first entry isn't a string, it produces a lua LSP diagnostic error:

The following is fine:

require("lazy").setup({
    "path_to/plugin.nvim",
})

This produces an error:

require("lazy").setup({
    { "path_to/plugin.nvim", dependencies = { ... }},
})

The LSP diagnostic error:

Cannot assign `table` to `string`-`table` cannot match `string`- Type `table` cannot match `string`

Full configuration I'm using:

require("lazy").setup({
	-- LSP Core
	{
		"VonHeikemen/lsp-zero.nvim",
		dependencies = {
			-- LSP
			"neovim/nvim-lspconfig",
			"williamboman/mason.nvim",
			"williamboman/mason-lspconfig.nvim",

			-- Installer
			"WhoIsSethDaniel/mason-tool-installer.nvim",

			-- Completion
			"hrsh7th/nvim-cmp",
			"hrsh7th/cmp-buffer",
			"hrsh7th/cmp-path",
			"saadparwaiz1/cmp_luasnip",
			"hrsh7th/cmp-nvim-lsp",
			"hrsh7th/cmp-nvim-lua",

			-- Snippets
			"L3MON4D3/LuaSnip",
			"rafamadriz/friendly-snippets",
		},
	},
	-- LSP Diagnostics
	{ "folke/trouble.nvim", dependencies = { "kyazdani42/nvim-web-devicons" } },

	-- LSP Formattting
	{ "jose-elias-alvarez/null-ls.nvim", dependencies = { "nvim-lua/plenary.nvim" } },

	-- Debugging
	{ "rcarriga/nvim-dap-ui", dependencies = { "mfussenegger/nvim-dap" } },
	{ "leoluz/nvim-dap-go", depdencies = { "mfussenegger/nvim-dap" } },
	{ "mfussenegger/nvim-dap-python", dependencies = { "mfussenegger/nvim-dap" } },

	{ "chriskempson/base16-vim" },
	{ "nvim-telescope/telescope.nvim", dependencies = { "nvim-lua/plenary.nvim" } },
	{
		"nvim-telescope/telescope-fzf-native.nvim",
		dependencies = { "nvim-telescope/telescope.nvim" },
		build = "make",
	},
	{ "nvim-telescope/telescope-file-browser.nvim", dependencies = { "nvim-telescope/telescope.nvim" } },
	{ "nvim-telescope/telescope-packer.nvim", dependencies = { "nvim-telescope/telescope.nvim" } },
	{ "nvim-treesitter/nvim-treesitter" },
	{
		"nvim-neo-tree/neo-tree.nvim",
		branch = "v2.x",
		dependencies = { "nvim-lua/plenary.nvim", "kyazdani42/nvim-web-devicons", "MunifTanjim/nui.nvim" },
	},
	{ "lewis6991/gitsigns.nvim" },
	{ "feline-nvim/feline.nvim", dependencies = { "kyazdani42/nvim-web-devicons" } },
	{ "DaikyXendo/nvim-material-icon" },

	-- Visual
	{ "mbbill/undotree" },

	-- Window Management
	{ "anuvyklack/windows.nvim", dependencies = { "anuvyklack/middleclass", "anuvyklack/animation.nvim" } },

	-- Help
	{ "folke/which-key.nvim" },
}, { ui = { border = "single" } })

Which version of Neovim are you using?
Latest stable 0.8.1

To Reproduce
Steps to reproduce the behavior:

  1. Call plugin setup and use an object as the first entry.

Expected Behavior
No LUA or LSP errors indicating the value being passed to setup is wrong.

Screenshots
If applicable, add screenshots to help explain your problem.

Log
Please include any related errors from the Noice log file. (open with :Lazy log)

Generates invalid helptags for README

Describe the bug
After installing mason-null-ls.nvim, I tried using Lazy's feature of generating help tags when no are present in a plugin. While :help mason-null-ls<tab> shows plenty, which correlate perfectly with the headers in its README, one can't open them: "Tag not found: mason-null-ls.nvim-setup@en". Notably, that "@en" isn't present in the completions.

Which version of Neovim are you using?

โฏ nvim --version 
NVIM v0.8.1
Build type: Release
LuaJIT 2.1.0-beta3
Compiled by [email protected]

Features: +acl +iconv +tui

To Reproduce
Steps to reproduce the behavior:

  1. Use repro.lua below
  2. Wait for Lazy to install
  3. :h mason-null-ls.nvim-setup
  4. E426: tag not found: mason-null-ls.nvim-setup@en

Expected Behavior
Opens Readme at Nvim Setup heading.

Details

Lazy log

lazy.nvim (H) Install (I) Update (U) Sync (S) Clean (X) Check (C) Log (L) Restore (R) Profile (P) Debug (D) Help (?)

Total: 5 plugins

Breaking Changes (1)
โ— lazy.nvim 2.56ms ๏„ก init.lua
b7c489b fix(loader): lua modules can be links instead of files. Fixes #66 (16 minutes ago)
7a57ea2 chore(build): auto-generate vimdoc (36 minutes ago)
c228908 fix(health): don't show warning on module=false (37 minutes ago)
b68f94b ci: Update issue templates (65 minutes ago)
bbebb67 ci: Update issue templates (67 minutes ago)
95fc814 chore(build): auto-generate vimdoc (84 minutes ago)
876f7bd feat(loader): allow to add extra paths to rtp reset. Fixes #64 (85 minutes ago)
a345649 fix(cache): if we can't load from the cache modpath, find path again instead of erroring right away (2 hours ago)
bbace14 fix(git): only mark a plugin as dirty if an update changed the commit HEAD. Fixes #62 (2 hours ago)
a939243 fix(checker): allow git checks only for non-pinned plugins (#61) (2 hours ago)
57bea32 chore(build): auto-generate vimdoc (2 hours ago)
ff24f49 fix(loader): source rtp /plugin files after loading start plugins. Fixes (2 hours ago)
b802729 chore(build): auto-generate vimdoc (5 hours ago)
9dfefac docs: fixed indentation of auto-generated code blocks (5 hours ago)
71b2e2f docs: lazy works on all OSs now (5 hours ago)
232232d fix(ui): install command can have plugins as a parameter (5 hours ago)
4ca3039 feat(loader): warn when mapleader is changed after init (6 hours ago)
540847b fix: strip / from dirs. Fixes #60 (6 hours ago)
86eaa11 fix(git): dereference tag refs. Fixes #54 (7 hours ago)
e95da35 feat(util): utility method to get sync process output (7 hours ago)
3c3a711 chore(build): auto-generate vimdoc (8 hours ago)
44f80a7 feat(plugin): allow plugin files only without a main plugin module. Fixes #53 (8 hours ago)
f5734f5 chore(build): auto-generate vimdoc (8 hours ago)
3814883 fix(ui): set current win only when its valid (8 hours ago)
3a7b8c8 chore(main): release 5.1.0 (#30) (17 hours ago)
3606d62 fix: add after directories to rtp to make after/ftplugin and others work. Fixes #47 (17 hours ago)
b193f96 fix(spec): only process a spec once (18 hours ago)
7be46bc style: removed unused requires (18 hours ago)
897d6df fix: add filetype to window buffer. (#41) (19 hours ago)
14300b3 chore(build): auto-generate vimdoc (19 hours ago)
78e9d6c docs: add a note about mapleader (19 hours ago)
06ac8bd perf(ui): clear existing extmarks before rendering (20 hours ago)
ffcd0ab fix(loader): source filetype.lua before plugins. Fixes #35 (20 hours ago)
9d12cdc fix(git): don't run git log for submodules. Fixes #33 (21 hours ago)
06ffcf5 chore(build): auto-generate vimdoc (21 hours ago)
7fb0652 docs: added docs on update checker (21 hours ago)
1f86cb3 chore(build): auto-generate vimdoc (21 hours ago)
3cffb2a docs: added change detection to the readme (21 hours ago)
6c767a6 feat: added options to configure change detection. Fixes #32 (21 hours ago)
cd162f3 chore(build): auto-generate vimdoc (21 hours ago)
941df31 feat(ui): make the windoww size configurable. Fixes #34 (21 hours ago)
5298441 fix: use nvim_feekeys instead of nvim_input for keys handler. Fixes #28 (22 hours ago)
2927b05 docs: added lincense (23 hours ago)
4d78203 chore(main): release 5.0.1 (#17) (24 hours ago)
1371a14 fix(build): use the shell to execute build commands (24 hours ago)
ffabe91 fix(cache): if mod is loaded already in the loader, then return that (24 hours ago)
316503f fix: dont autoload cached modules when module=false (25 hours ago)
992c679 fix: always set Config.me regardless of reset rtp (25 hours ago)
df6c986 fix: add neovim libs to rtp for treesitter parsers etc (26 hours ago)
49b69b7 chore(build): auto-generate vimdoc (27 hours ago)
e9d3a73 fix: default logs are now since 3 days ago to be in line with the docs (27 hours ago)
4234322 chore(build): auto-generate vimdoc (27 hours ago)
6e32759 fix: deepcopy lazyspec before processing (27 hours ago)
ec0f8d0 docs: added config.dev.path to the example (27 hours ago)
6404d42 fix: move re-sourcing check to the top (27 hours ago)
ddf36d7 fix: checker should not error on non-existing dirs (27 hours ago)
50ba619 test: fix tests (27 hours ago)
f78d8bf fix: show error when merging, but continue (27 hours ago)
b8a0055 chore(build): auto-generate vimdoc (28 hours ago)
1754056 fix: use jobstart instead of system to open urls (28 hours ago)
5ecc988 docs: use https to bootstrap lazy (28 hours ago)
ae644a6 fix: only run updated checker for installed plugins. Fixes #16 (29 hours ago)
7225b05 chore(build): auto-generate vimdoc (29 hours ago)
17fd57a docs: added docs for statusline and count (29 hours ago)
48a596e chore(build): auto-generate vimdoc (30 hours ago)
dfe8a65 docs: removed extra performance section (30 hours ago)
1fa2d87 docs: moved my dots to structuring plugins (30 hours ago)
9916318 chore(build): auto-generate vimdoc (30 hours ago)
abe026a docs: added section on performance (30 hours ago)
82aea47 chore(build): auto-generate vimdoc (30 hours ago)
72d66cd docs: updated lua stuff (30 hours ago)
ca43018 chore(build): auto-generate vimdoc (30 hours ago)
36cb7ea docs: migration guide (30 hours ago)
2f59ead chore(main): release 5.0.0 (#12) (30 hours ago)
dbcf675 chore(build): auto-generate vimdoc (30 hours ago)
b906ad9 docs: added windows to supported platforms (30 hours ago)
cb87aa3 ci: run tests on linux only for nw (32 hours ago)
75a36f3 chore(build): auto-generate vimdoc (32 hours ago)
af87108 fix(util): fixed double slashes (32 hours ago)
62c1542 fix(cache): normalize paths (32 hours ago)
bb1c2f4 feat: added support for Windows (33 hours ago)
198963f feat: utility method to normalize a path (33 hours ago)
a189883 fix: check for installed plugins with plain find (33 hours ago)
833b387 chore(build): auto-generate vimdoc (2 days ago)
ff89319 docs: removed dots from features (2 days ago)
b7bf18a style: spelling (2 days ago)
66dad89 chore(build): auto-generate vimdoc (2 days ago)
0c0b8b7 docs: todo (2 days ago)
92fd0d4 docs: updated installation and structuring plugins (2 days ago)
1baa92f docs: added docs on <cr> and <K> (2 days ago)
d827d8a docs: collapse semver examples (2 days ago)
1e16363 chore(build): auto-generate vimdoc (2 days ago)
980cfa9 docs: added config example when not using a Nerd Font (2 days ago)
713dcb6 build: added markdownlint config (2 days ago)
706fe6f chore(build): auto-generate vimdoc (2 days ago)
5ed9855 feat: added completion for all lazy commands (2 days ago)
b462787 docs: added optional plugins to docs for commands and methods (2 days ago)
f29f3d2 chore(build): auto-generate vimdoc (2 days ago)
1efa710 feat: added module=false to skip auto-loading of plugins on require (2 days ago)
55d194c chore(build): auto-generate vimdoc (2 days ago)
bac34cc docs: added section on uninstalling (2 days ago)
c065ca2 chore(build): auto-generate vimdoc (2 days ago)
2dd6230 feat: added :Lazy load foobar.nvim to load a plugin (2 days ago)
8a0da3b config: move lazy cache to state/nvim/lazy/cache (2 days ago)
7eb6034 chore(build): auto-generate vimdoc (2 days ago)
6567580 chore: todo (2 days ago)
6f00cde docs: typos (2 days ago)
faac2dd perf(cache): cache loadfile and no find modpaths without package.loaders (2 days ago)
32f2b71 fix(cache): do a fast check to see if a cached modpath is still valid. find it again otherwise (2 days ago)
1fe43f3 fix(ui): focus Lazy window when auto-installing plugins in VimEnter (2 days ago)
d4aee27 feat!: removed the LazyUpdate etc commands. sub-commands only from now on (2 days ago)
b89e6bf perf: lazy-load the commands available on the lazy module (3 days ago)

Log (2)
โ— mason.nvim 0.02ms ๎ซ“ start
28408c8 Revert "fix(spawn): always expand cmd if PATH is not modified (#773)" (#783) (3 hours ago)
8240d7d fix(powershell): use pwsh if available (#782) (5 hours ago)
dd04b41 fix(spawn): always expand cmd if PATH is not modified (#773) (26 hours ago)
f21b829 chore: update generated code (#780) (30 hours ago)
d265534 feat(expr): use same context for value & filter evaluation (#778) (32 hours ago)
2531376 feat(functional): add trim_start and assoc (#779) (32 hours ago)
ca77c84 feat: add expr module (#775) (2 days ago)
3ccd16b feat(registry): add nil (#774) (2 days ago)
582fe9e feat(functional): add list.reduce (#772) (2 days ago)
2db93f7 fix(functional): spread function args in _.apply (#770) (2 days ago)
e1556b8 Revert "chore: use pwsh instead of powershell (#706)" (#769) (2 days ago)
20eedd7 chore: update generated code (#768) (2 days ago)

โ— null-ls.nvim 0.1ms ๎ซ“ start
    db1c7cb chore: autogen metadata and docs (2 days ago)
    6c80a53 feat: add `standardts` builtin formatting (#1303) (2 days ago)
    52fe59b chore: autogen metadata and docs (2 days ago)
    45cdd7c feat(builtins): add gomodifytags support in code actions (#1294) (2 days ago)
    f1182c2 refactor: use native neovim 0.8 fs utils (#1166) (3 days ago)

Clean (1)
โ—‹ lazy.nvim

Loaded (1)
โ— mason-null-ls.nvim 0.03ms ๎ซ“ start

repro.lua
local root = vim.fn.fnamemodify("./.repro", ":p")

-- set stdpaths to use .repro
for _, name in ipairs({ "config", "data", "state", "cache" }) do
	vim.env[("XDG_%s_HOME"):format(name:upper())] = root .. "/" .. name
end

-- bootstrap lazy
local lazypath = root .. "/plugins/lazy.nvim"
if not vim.loop.fs_stat(lazypath) then
	vim.fn.system({
		"git",
		"clone",
		"--filter=blob:none",
		"--single-branch",
		"https://github.com/folke/lazy.nvim.git",
		lazypath,
	})
end
vim.opt.runtimepath:prepend(lazypath)

-- install plugins
local plugins = {
	"williamboman/mason.nvim",
	"jose-elias-alvarez/null-ls.nvim",
	"jayp0521/mason-null-ls.nvim",
}
require("lazy").setup(plugins, {
	root = root .. "/plugins",
})

-- add anything else here
vim.opt.termguicolors = true
state/nvim/lazy/readme/doc/mason-null-ls.nvim.md
`mason-null-ls` bridges `mason.nvim` with the `null-ls` plugin - making it easier to use both plugins together.


# Introduction

`mason-null-ls.nvim` closes some gaps that exist between `mason.nvim` and `null-ls`. Its main responsibilities are:

-   provide extra convenience APIs such as the `:NullLsInstall` command
-   allow you to (i) automatically install, and (ii) automatically set up a predefined list of sources
-   translate between `null-ls` source names and `mason.nvim` package names (e.g. `haml_lint` <-> `haml-lint`)

It is recommended to use this extension if you use `mason.nvim` and `null-ls`.
Please read the whole README.md before jumping to [Setup](#setup).

**Note: this plugin uses the `null-ls` source names in the APIs it exposes - not `mason.nvim` package names.


# Requirements

-   neovim `>= 0.7.0`
-   [`mason.nvim`](https://github.com/williamboman/mason.nvim)
-   [`null-ls.nvim`](https://github.com/jose-elias-alvarez/null-ls.nvim)


# Installation

## [Packer](https://github.com/wbthomason/packer.nvim)

```lua
use {
    "williamboman/mason.nvim",
    "jose-elias-alvarez/null-ls.nvim",
    "jayp0521/mason-null-ls.nvim",
}
```

## vim-plug

```vim
Plug 'williamboman/mason.nvim'
Plug 'jose-elias-alvarez/null-ls.nvim'
Plug 'jayp0521/mason-null-ls.nvim'
```

# Commands

Available after calling `setup`.

-   `:NullInstall [...]` - installs the provided sources
-   `:NullUninstall  ...` - uninstalls the provided sources


# Configuration

You may optionally configure certain behavior of `mason-null-ls.nvim` when calling the `.setup()` function. Refer to
the [default configuration](#default-configuration) for a list of all available settings.

Example:

```lua
require("mason-null-ls").setup({
    ensure_installed = { "stylua", "jq" }
})
```

## Default configuration

```lua
local DEFAULT_SETTINGS = {
    -- A list of sources to install if they're not already installed.
    -- This setting has no relation with the `automatic_installation` setting.
    ensure_installed = {},
    -- Run `require("null-ls").setup`.
    -- Will automatically install masons tools based on selected sources in `null-ls`.
    -- Can also be an exclusion list.
    -- Example: `automatic_installation = { exclude = { "rust_analyzer", "solargraph" } }`
    automatic_installation = false,

	-- Whether sources that are installed in mason should be automatically set up in null-ls.
	-- Removes the need to set up null-ls manually.
	-- Can either be:
	-- 	- false: Null-ls is not automatically registered.
	-- 	- true: Null-ls is automatically registered.
	-- 	- { types = { SOURCE_NAME = {TYPES} } }. Allows overriding default configuration.
	-- 	Ex: { types = { eslint_d = {'formatting'} } }
	automatic_setup = false,
}
```

# Automatic Setup Usage

Automatic Setup is a need feature that removes the need to configure `null-ls` for supported sources.
Sources found installed in `mason` will automatically be setup for null-ls.

## Example Config

```lua
require("mason").setup()
require("mason-null-ls").setup({
    automatic_setup = true,
})
```

See the Default Configuration section to understand how the default dap configs can be overriden.


# Setup handlers usage

The `setup_handlers()` function provides a dynamic way of setting up sources and any other needed logic, It can also do that during runtime.

**NOTE:** When setting `automatic_setup = true`, the handler function needs to be called at a minimum like:
`require 'mason-null-ls'.setup_handlers()`. When passing in a custom handler function for the the default or a source,
then the automatic_setup function one won't be invoked. See below to keep original functionality inside the custom handler.

```lua
local null_ls = require 'null-ls'

require ('mason-null-ls').setup({
    ensure_installed = {'stylua', 'jq'}
})

require 'mason-null-ls'.setup_handlers {
    function(source_name, methods)
      -- all sources with no handler get passed here
    end,
    stylua = function(source_name, methods)
      null_ls.register(null_ls.builtins.formatting.stylua)
    end,
}

-- will setup any installed and configured sources above
null_ls.setup()
```

# Setup

There are primarily 2 paths to setup.

## Primary Source of Truth is `mason-null-ls`

This involves making sure tools are installed through `mason-null-ls` when available.

```lua
require("mason").setup()
require("mason-null-ls").setup({
    ensure_installed = {
        -- Opt to list sources here, when available in mason.
    },
    automatic_installation = false,
    automatic_setup = true, -- Recommended, but optional
})
require("null-ls").setup(
    sources = {
        -- Anything not supported by mason.
    }
)

require 'mason-null-ls'.setup_handlers() -- If `automatic_setup` is true.
```


## Primary Source of Truth is `null-ls`.
```lua
require("mason").setup()
require("null-ls").setup(
    sources = {
        -- all sources go here.
    }
)
require("mason-null-ls").setup({
    ensure_installed = nil,
    automatic_installation = true,
    automatic_setup = false,
})
```

Note: This is my personal preference.


# Available Null-ls sources


| Filetype                                                                                                                              | Source name            |
|---------------------------------------------------------------------------------------------------------------------------------------|------------------------|
| blade                                                                                                                                 | `blade_formatter`      |
| bzl                                                                                                                                   | `buildifier`           |
| c cpp                                                                                                                                 | `cpplint`              |
| c cpp cs java cuda                                                                                                                    | `clang_format`         |
| clj                                                                                                                                   | `joker`                |
| cs                                                                                                                                    | `csharpier`            |
| django jinja.html htmldjango                                                                                                          | `djlint`               |
| dockerfile                                                                                                                            | `hadolint`             |
| elm                                                                                                                                   | `elm_format`           |
| eruby                                                                                                                                 | `erb_lint`             |
| gitcommit                                                                                                                             | `gitlint`              |
| go                                                                                                                                    | `gofumpt`              |
| go                                                                                                                                    | `goimports`            |
| go                                                                                                                                    | `goimports_reviser`    |
| go                                                                                                                                    | `golangci_lint`        |
| go                                                                                                                                    | `golines`              |
| go                                                                                                                                    | `revive`               |
| go                                                                                                                                    | `staticcheck`          |
| haml                                                                                                                                  | `haml_lint`            |
| javascript typescript                                                                                                                 | `rome`                 |
| javascript javascriptreact typescript typescriptreact                                                                                 | `xo`                   |
| javascript javascriptreact typescript typescriptreact vue                                                                             | `eslint_d`             |
| javascript javascriptreact typescript typescriptreact vue css scss less html json jsonc yaml markdown markdown.mdx graphql handlebars | `prettier`             |
| javascript javascriptreact typescript typescriptreact vue css scss less html json jsonc yaml markdown markdown.mdx graphql handlebars | `prettierd`            |
| jinja.html htmldjango                                                                                                                 | `curlylint`            |
| json                                                                                                                                  | `fixjson`              |
| json                                                                                                                                  | `jq`                   |
| kotlin                                                                                                                                | `ktlint`               |
| lua                                                                                                                                   | `luacheck`             |
| lua                                                                                                                                   | `selene`               |
| lua                                                                                                                                   | `stylua`               |
| markdown                                                                                                                              | `alex`                 |
| markdown                                                                                                                              | `markdownlint`         |
| markdown                                                                                                                              | `write_good`           |
| markdown org                                                                                                                          | `cbfmt`                |
| markdown tex                                                                                                                          | `proselint`            |
| markdown tex asciidoc                                                                                                                 | `vale`                 |
| php                                                                                                                                   | `phpcbf`               |
| php                                                                                                                                   | `psalm`                |
| proto                                                                                                                                 | `buf`                  |
| proto                                                                                                                                 | `protolint`            |
| python                                                                                                                                | `autopep8`             |
| python                                                                                                                                | `black`                |
| python                                                                                                                                | `blue`                 |
| python                                                                                                                                | `flake8`               |
| python                                                                                                                                | `isort`                |
| python                                                                                                                                | `mypy`                 |
| python                                                                                                                                | `pylint`               |
| python                                                                                                                                | `vulture`              |
| python                                                                                                                                | `yapf`                 |
| ruby                                                                                                                                  | `rubocop`              |
| ruby                                                                                                                                  | `standardrb`           |
| sh                                                                                                                                    | `shellcheck`           |
| sh                                                                                                                                    | `shellharden`          |
| sh                                                                                                                                    | `shfmt`                |
| solidity                                                                                                                              | `solhint`              |
| sql                                                                                                                                   | `sqlfluff`             |
| sql                                                                                                                                   | `sql_formatter`        |
| toml                                                                                                                                  | `taplo`                |
| vim                                                                                                                                   | `vint`                 |
| yaml                                                                                                                                  | `actionlint`           |
| yaml                                                                                                                                  | `yamlfmt`              |
| yaml                                                                                                                                  | `yamllint`             |
| yaml json                                                                                                                             | `cfn_lint`             |
|                                                                                                                                       | `codespell`            |
|                                                                                                                                       | `cspell`               |
|                                                                                                                                       | `editorconfig_checker` |
|                                                                                                                                       | `misspell`             |
|                                                                                                                                       | `textlint`             |


state/nvim/lazy/readme/doc/tags
!_TAG_FILE_ENCODING	utf-8	//
mason-null-ls.nvim-introduction	mason-null-ls.nvim.md	/# Introduction
mason-null-ls.nvim-requirements	mason-null-ls.nvim.md	/# Requirements
mason-null-ls.nvim-installation	mason-null-ls.nvim.md	/# Installation
mason-null-ls.nvim-packer-https-github-com-wbthomason-packer-nvim	mason-null-ls.nvim.md	/## [Packer](https://github.com/wbthomason/packer.nvim)
mason-null-ls.nvim-vim-plug	mason-null-ls.nvim.md	/## vim-plug
mason-null-ls.nvim-commands	mason-null-ls.nvim.md	/# Commands
mason-null-ls.nvim-configuration	mason-null-ls.nvim.md	/# Configuration
mason-null-ls.nvim-default-configuration	mason-null-ls.nvim.md	/## Default configuration
mason-null-ls.nvim-automatic-setup-usage	mason-null-ls.nvim.md	/# Automatic Setup Usage
mason-null-ls.nvim-example-config	mason-null-ls.nvim.md	/## Example Config
mason-null-ls.nvim-setup-handlers-usage	mason-null-ls.nvim.md	/# Setup handlers usage
mason-null-ls.nvim-setup	mason-null-ls.nvim.md	/# Setup
mason-null-ls.nvim-primary-source-of-truth-is-mason-null-ls	mason-null-ls.nvim.md	/## Primary Source of Truth is `mason-null-ls`
mason-null-ls.nvim-primary-source-of-truth-is-null-ls	mason-null-ls.nvim.md	/## Primary Source of Truth is `null-ls`.
mason-null-ls.nvim-available-null-ls-sources	mason-null-ls.nvim.md	/# Available Null-ls sources

Way to check the introduced changes of a commit (after plugin update)?

Is there any way to check the code that was introduced by a plugin's update?
Something equivalent to packer's d ?

For instance, I tried now to check what code was introduced after the latest commit that fixed the other issue, but the only thing I could find in the docs was the gl command which only shows the commit details but not the code (i.e. git diff).

Would be really nice to have some kind of a floating window to show the git diff command.

vim-bqf is not working?

Describe the bug
this plugin:
https://github.com/kevinhwang91/nvim-bqf
does not work when installed from lazy.
from packer it works as expected.
I would love to help debug it, I created 2 minimal configs, where with the packer one the plugin is working

Which version of Neovim are you using?
Gui(specify which GUI client you are using)? Nightly? Version?

NVIM v0.9.0-dev-530+gde90a8bfe

Packer

packer-minimal-init.lua
local on_windows = vim.loop.os_uname().version:match("Windows")

local function join_paths(...)
local path_sep = on_windows and "\" or "/"
local result = table.concat({ ... }, path_sep)
return result
end

local temp_dir = vim.loop.os_getenv("TEMP") or "/tmp"
vim.opt.grepprg = "rg --vimgrep"

vim.cmd("set packpath=" .. join_paths(temp_dir, "nvim", "site"))

local package_root = join_paths(temp_dir, "nvim", "site", "pack")
local install_path = join_paths(package_root, "packer", "start", "packer.nvim")
local compile_path = join_paths(install_path, "plugin", "packer_compiled.lua")

local function load_plugins()
require("packer").startup({
{
"wbthomason/packer.nvim",
"kevinhwang91/nvim-bqf",
},
config = {
package_root = package_root,
compile_path = compile_path,
},
})
end

if vim.fn.isdirectory(install_path) == 0 then
vim.fn.system({ "git", "clone", "https://github.com/wbthomason/packer.nvim", install_path })
load_plugins()
require("packer").sync()
vim.cmd([[autocmd User PackerComplete ++once lua load_config()]])
else
load_plugins()
require("packer").sync()
end

Lazy

lazy-minimal-init.lua
local on_windows = vim.loop.os_uname().version:match 'Windows'

local function join_paths(...)
local path_sep = on_windows and '\' or '/'
local result = table.concat({ ... }, path_sep)
return result
end

vim.cmd [[set runtimepath=$VIMRUNTIME]]

local temp_dir = vim.loop.os_getenv 'TEMP' or '/tmp'
vim.opt.grepprg = 'rg --vimgrep'

vim.cmd('set packpath=' .. join_paths(temp_dir, 'nvim', 'site'))

local package_root = join_paths(temp_dir, 'nvim', 'site', 'pack')

local lazypath = join_paths(temp_dir, 'nvim', 'site') .. '/lazy/lazy.nvim'
if not vim.loop.fs_stat(lazypath) then
vim.fn.system {
'git',
'clone',
'--filter=blob:none',
'--single-branch',
'https://github.com/folke/lazy.nvim.git',
lazypath,
}
end
vim.opt.runtimepath:prepend(lazypath)

require('lazy').setup({
'kevinhwang91/nvim-bqf',
}, {
root = package_root,
})

To reproduce

  1. Download the config, run nvim with it nvim -nu /path/to/config
  2. search for something in the CWD using vimgrep: vimgrep something *
  3. open quickfix window copen

Expected Behavior
When opening a quickfix window, it should show a preview of the buffer of the quickfix item, like this:

Screenshots
image

Log
Please include any related errors from the Noice log file. (open with :Lazy log)

Lazy log
paste log here

Customizable keymaps for `Lazy` floating window

Is your feature request related to a problem? Please describe.
I have a bad habit of mapping K to 10gk, but I am too deep down the rabbit hole to go back. It is a bit painful that K is mapped by default in the lazy popup window overwriting my mapping of K.

Describe the solution you'd like
Customisable keymaps in the lazy popup window. For me, only being able to map K to something else would be great, but I think it would be awesome to customise all keymaps in the popup window.

Describe alternatives you've considered
I don't really know of another way to map the behaviour of K to another key while still having my original mapping of K. I want to maybe map it to gd for example instead of K.

A command to remove cache

Is your feature request related to a problem? Please describe.

Maybe because I do not delete packages packer downloaded,
lazy always loads plugins from the wrong path.

Describe the solution you'd like

If the cache was wrongly generated, It's hard to debug and find out what's wrong.
Maybe a command with the cache cleaning functionality is necessary.

High RAM consumption during initialization

Is your feature request related to a problem? Please describe.
lazy.nvim can cause the nvim process to use up 1-2 GB of RAM during the first initialization.
This caused my dusty old PC to lock up for a few minutes. I've set concurrency to 5, so I don't think git is the cause.
After closing the Lazy popup window, the memory is instantly freed. Memory usage of the syncs afterwards is normal (so far).
I've never had this problem with packer. What is causing this high memory consumption?

Describe the solution you'd like
A more efficient RAM usage during the first startup.

Support non-normal keybinds

Is your feature request related to a problem? Please describe.
The ability to lazy load a plugin using non-normal keybinds would be pretty useful.

Describe the solution you'd like
Something similar to: wbthomason/packer.nvim#1063

{
  "a" -- normal mode
  { "i", "b" } -- insert mode
  v = "c" -- visual mode
  x = { "d", "e" } -- select mode
}

Describe alternatives you've considered
I think this can be somewhat achieved using manual mappings in init = ..., but something more declarative would be nice.

plugin configs (/after/plugin) not loaded

Describe the bug
I have an issue that my configs in /after/plugin/* are not loaded.

Which version of Neovim are you using?

VIM v0.8.1
Build type: Release
LuaJIT 2.1.0-beta3
Compiled by brew@Ventura

Features: +acl +iconv +tui
See ":help feature-compile"

   system vimrc file: "$VIM/sysinit.vim"
  fall-back for $VIM: "/usr/local/Cellar/neovim/0.8.1/share/nvim"

Run :checkhealth for more info

To Reproduce
Steps to reproduce the behavior:

  1. Clone github.com/rgruyters/nvim.git
  2. checkout branch feature/lazy
  3. start Neovim (nvim)

Expected Behavior
For example, bufferline should be working, Telescope keymaps (ff) should be working, etc.

Screenshots
If applicable, add screenshots to help explain your problem.

Log
No errors found

First impressions

  • I think the installation section, specifically the loading part, could use an
    extra sentence or two. I was confused on what config.plugins was initially.
    Maybe a quick, "for example, if you have a lua file
    ~/.config/nvim/lua/config/plugins.lua that returns a table" or something it'd
    remove most question marks I think.
  • When autoinstalling the plugins the cursor isn't focused on the floating
    window, but on the non-floating window in the background.
  • Doing :Lazy clean doesn't show which plugins were removed.
  • Shouldn't the "Versioning" section be in the "Lockfile" chapter?
  • Why are personal dotfiles used as examples? Dotfiles change all the time,
    there's no guarantee this will be relevant or even exist in two years.
  • What's the difference between lazy-loading and verylazy-loading?
  • Most emojis in "Configuration" aren't shown for me.
  • add section on how to uninstall
  • add :Packadd command or something similar

Typos:

  • automcatilly check for plugin updates
  • A custom name for the plugin used for the local plugin directory and as the dispay name
  • local plugins need to be explicitely configured with dir

Nitpicks:

  • Bootstrap code is unevenly indented.
  • "Works on Linux, MacOS and Windows" lol just remove this line, it's not needed anymore.

Luarocks support

Hey folke, hope you're doing well!

I'm really excited to try lazy.nvim, it seems to be what I've been looking for and it saved me the trouble of doing it myself!

I was wondering if you thought about adding support for using rocks at some point. From what I understand some Neovim core maintainers were looking to make a standard using luarocks to host the plugins and their specs (dependencies, etc) to make everything easier to maintain for the end users, and I'm also working on a full incremental rewrite of rest.nvim which will need a rock in order to work.

If it's not in the plans, do you know of a way to do it on my own?

Cheers!

key lazyloading with which-key.nvim needs to be used twice

Describe the bug
I need to press <space>cc twice to actually make it work
the first time it isn't mapped

Which version of Neovim are you using?
NVIM v0.9.0-dev-525+ga7332ba9b

To Reproduce

Steps to reproduce the behavior:

  1. `nvim -u repro.lua repro.lua
  2. <space>cc
  3. <space>cc

Expected Behavior
line gets commented out on 2.

Log
Please include any related errors from the Noice log file. (open with :Lazy log)

Lazy log

lazy.nvim (H) Install (I) Update (U) Sync (S) Clean (X) Check (C) Log (L) Restore (R) Profile (P) Debug (D) Help (?)

Total: 60 plugins

Breaking Changes (1)
โ— lazy.nvim 18.74ms ๏„ก init.lua
b7c489b fix(loader): lua modules can be links instead of files. Fixes #66 (55 minutes ago)
7a57ea2 chore(build): auto-generate vimdoc (74 minutes ago)
c228908 fix(health): don't show warning on module=false (75 minutes ago)
b68f94b ci: Update issue templates (2 hours ago)
bbebb67 ci: Update issue templates (2 hours ago)
95fc814 chore(build): auto-generate vimdoc (2 hours ago)
876f7bd feat(loader): allow to add extra paths to rtp reset. Fixes #64 (2 hours ago)
a345649 fix(cache): if we can't load from the cache modpath, find path again instead of erroring right away (2 hours ago)
bbace14 fix(git): only mark a plugin as dirty if an update changed the commit HEAD. Fixes #62 (3 hours ago)
a939243 fix(checker): allow git checks only for non-pinned plugins (#61) (3 hours ago)
57bea32 chore(build): auto-generate vimdoc (3 hours ago)
ff24f49 fix(loader): source rtp /plugin files after loading start plugins. Fixes (3 hours ago)
b802729 chore(build): auto-generate vimdoc (6 hours ago)
9dfefac docs: fixed indentation of auto-generated code blocks (6 hours ago)
71b2e2f docs: lazy works on all OSs now (6 hours ago)
232232d fix(ui): install command can have plugins as a parameter (6 hours ago)
4ca3039 feat(loader): warn when mapleader is changed after init (7 hours ago)
540847b fix: strip / from dirs. Fixes #60 (7 hours ago)
86eaa11 fix(git): dereference tag refs. Fixes #54 (7 hours ago)
e95da35 feat(util): utility method to get sync process output (7 hours ago)
3c3a711 chore(build): auto-generate vimdoc (8 hours ago)
44f80a7 feat(plugin): allow plugin files only without a main plugin module. Fixes #53 (8 hours ago)
f5734f5 chore(build): auto-generate vimdoc (9 hours ago)
3814883 fix(ui): set current win only when its valid (9 hours ago)
3a7b8c8 chore(main): release 5.1.0 (#30) (18 hours ago)
3606d62 fix: add after directories to rtp to make after/ftplugin and others work. Fixes #47 (18 hours ago)
b193f96 fix(spec): only process a spec once (18 hours ago)
7be46bc style: removed unused requires (19 hours ago)
897d6df fix: add filetype to window buffer. (#41) (20 hours ago)
14300b3 chore(build): auto-generate vimdoc (20 hours ago)
78e9d6c docs: add a note about mapleader (20 hours ago)
06ac8bd perf(ui): clear existing extmarks before rendering (21 hours ago)
ffcd0ab fix(loader): source filetype.lua before plugins. Fixes #35 (21 hours ago)
9d12cdc fix(git): don't run git log for submodules. Fixes #33 (21 hours ago)
06ffcf5 chore(build): auto-generate vimdoc (22 hours ago)
7fb0652 docs: added docs on update checker (22 hours ago)
1f86cb3 chore(build): auto-generate vimdoc (22 hours ago)
3cffb2a docs: added change detection to the readme (22 hours ago)
6c767a6 feat: added options to configure change detection. Fixes #32 (22 hours ago)
cd162f3 chore(build): auto-generate vimdoc (22 hours ago)
941df31 feat(ui): make the windoww size configurable. Fixes #34 (22 hours ago)
5298441 fix: use nvim_feekeys instead of nvim_input for keys handler. Fixes #28 (23 hours ago)
2927b05 docs: added lincense (23 hours ago)
4d78203 chore(main): release 5.0.1 (#17) (24 hours ago)
1371a14 fix(build): use the shell to execute build commands (24 hours ago)
ffabe91 fix(cache): if mod is loaded already in the loader, then return that (25 hours ago)
316503f fix: dont autoload cached modules when module=false (25 hours ago)
992c679 fix: always set Config.me regardless of reset rtp (25 hours ago)
df6c986 fix: add neovim libs to rtp for treesitter parsers etc (26 hours ago)
49b69b7 chore(build): auto-generate vimdoc (27 hours ago)
e9d3a73 fix: default logs are now since 3 days ago to be in line with the docs (27 hours ago)
4234322 chore(build): auto-generate vimdoc (27 hours ago)
6e32759 fix: deepcopy lazyspec before processing (27 hours ago)
ec0f8d0 docs: added config.dev.path to the example (28 hours ago)
6404d42 fix: move re-sourcing check to the top (28 hours ago)
ddf36d7 fix: checker should not error on non-existing dirs (28 hours ago)
50ba619 test: fix tests (28 hours ago)
f78d8bf fix: show error when merging, but continue (28 hours ago)
b8a0055 chore(build): auto-generate vimdoc (29 hours ago)
1754056 fix: use jobstart instead of system to open urls (29 hours ago)
5ecc988 docs: use https to bootstrap lazy (29 hours ago)
ae644a6 fix: only run updated checker for installed plugins. Fixes #16 (29 hours ago)
7225b05 chore(build): auto-generate vimdoc (30 hours ago)
17fd57a docs: added docs for statusline and count (30 hours ago)
48a596e chore(build): auto-generate vimdoc (30 hours ago)
dfe8a65 docs: removed extra performance section (30 hours ago)
1fa2d87 docs: moved my dots to structuring plugins (30 hours ago)
9916318 chore(build): auto-generate vimdoc (30 hours ago)
abe026a docs: added section on performance (30 hours ago)
82aea47 chore(build): auto-generate vimdoc (31 hours ago)
72d66cd docs: updated lua stuff (31 hours ago)
ca43018 chore(build): auto-generate vimdoc (31 hours ago)
36cb7ea docs: migration guide (31 hours ago)
2f59ead chore(main): release 5.0.0 (#12) (31 hours ago)
dbcf675 chore(build): auto-generate vimdoc (31 hours ago)
b906ad9 docs: added windows to supported platforms (31 hours ago)
cb87aa3 ci: run tests on linux only for nw (32 hours ago)
75a36f3 chore(build): auto-generate vimdoc (33 hours ago)
af87108 fix(util): fixed double slashes (33 hours ago)
62c1542 fix(cache): normalize paths (33 hours ago)
bb1c2f4 feat: added support for Windows (34 hours ago)
198963f feat: utility method to normalize a path (34 hours ago)
a189883 fix: check for installed plugins with plain find (34 hours ago)
833b387 chore(build): auto-generate vimdoc (2 days ago)
ff89319 docs: removed dots from features (2 days ago)
b7bf18a style: spelling (2 days ago)
66dad89 chore(build): auto-generate vimdoc (2 days ago)
0c0b8b7 docs: todo (2 days ago)
92fd0d4 docs: updated installation and structuring plugins (2 days ago)
1baa92f docs: added docs on <cr> and <K> (2 days ago)
d827d8a docs: collapse semver examples (2 days ago)
1e16363 chore(build): auto-generate vimdoc (2 days ago)
980cfa9 docs: added config example when not using a Nerd Font (2 days ago)
713dcb6 build: added markdownlint config (2 days ago)
706fe6f chore(build): auto-generate vimdoc (2 days ago)
5ed9855 feat: added completion for all lazy commands (2 days ago)
b462787 docs: added optional plugins to docs for commands and methods (2 days ago)
f29f3d2 chore(build): auto-generate vimdoc (2 days ago)
1efa710 feat: added module=false to skip auto-loading of plugins on require (2 days ago)
55d194c chore(build): auto-generate vimdoc (2 days ago)
bac34cc docs: added section on uninstalling (2 days ago)
c065ca2 chore(build): auto-generate vimdoc (2 days ago)
2dd6230 feat: added :Lazy load foobar.nvim to load a plugin (2 days ago)
8a0da3b config: move lazy cache to state/nvim/lazy/cache (2 days ago)
7eb6034 chore(build): auto-generate vimdoc (2 days ago)
6567580 chore: todo (2 days ago)
6f00cde docs: typos (2 days ago)
faac2dd perf(cache): cache loadfile and no find modpaths without package.loaders (2 days ago)
32f2b71 fix(cache): do a fast check to see if a cached modpath is still valid. find it again otherwise (2 days ago)
1fe43f3 fix(ui): focus Lazy window when auto-installing plugins in VimEnter (2 days ago)
d4aee27 feat!: removed the LazyUpdate etc commands. sub-commands only from now on (2 days ago)
b89e6bf perf: lazy-load the commands available on the lazy module (3 days ago)

Log (10)
โ—‹ LuaSnip
5570fd7 Auto generate docs (21 hours ago)
618b945 log: don't print a message on every start, provide log.ping() instead. (21 hours ago)

โ—‹ formatter.nvim
    8a4c961 Add configuration for standardrb (#212) (31 minutes ago)
    31a0ee7 Fix lua-format args (#214) (31 minutes ago)
    9aaf855 feat: add support for PHP-CS-Fixer (#216) (32 minutes ago)
    c7d7d90 feat: add nix formatting support (#217) (33 minutes ago)
    369e35b Use `--stderr` flag for rubocop rather than parsing output (#210) (33 minutes ago)

โ—‹ gitsigns.nvim
    2ab3bdf fix(blame): #697 (2 days ago)

โ—‹ neodev.nvim
    c5f0a81 chore: auto-generated types for Neovim nightly (10 hours ago)
    f8b17d3 chore: auto-generated types for Neovim nightly (34 hours ago)

โ— noice.nvim 10.51ms ๎ช† VeryLazy
    585d24e fix(health): dont use nvim-treesitter to check if a lang exists (80 minutes ago)
    81269c5 ci: added .repro to .gitignore (2 hours ago)
    044767a fix: dont error in checkhealth if nvim-treesitter is not installed (2 hours ago)
    4e03e16 chore(main): release 1.5.0 (#269) (2 hours ago)
    d833d5e chore(build): auto-generate vimdoc (2 hours ago)
    aa68eb6 feat(format): allow `config.format.level.icons` to be false. Fixes #274 (2 hours ago)
    e4a4290 chore(build): auto-generate vimdoc (2 days ago)
    29a2e05 feat: added `Filter.cond` to conditionally use a route (2 days ago)

โ— nui.nvim 0.33ms ๏’‡  noice.nvim
    b12db53 fix(layout): process split layout box change (11 hours ago)
    51721a4 fix(layout): process float layout box change (11 hours ago)
    96ef1cb feat(split): store id internally (11 hours ago)

โ—‹ nvim-dap
    284c754 Stop resizing widgets if converted to non-float window (2 days ago)
    3971d9b Allow opening multiple frames or scopes widgets (2 days ago)

โ—‹ nvim-lspconfig
    5292d60 docs: update server_configurations.md skip-checks: true (14 hours ago)
    f70a094 fix: rename ruff-lsp to ruff_lsp (#2337) (14 hours ago)
    80e81b1 docs: update server_configurations.md skip-checks: true (14 hours ago)
    d8a4493 chore: remove `languageFeatures`, `documentFeatures` (#2336) (14 hours ago)
    baab771 docs: update server_configurations.md skip-checks: true (15 hours ago)
    4e13145 feat: add ruff-lsp support (#2335) (15 hours ago)
    d597b0f fix: send the lsp method request after insert workspace folders (#2330) (34 hours ago)
    1ab2720 docs: update server_configurations.md skip-checks: true (34 hours ago)
    9c70f37 feat: add jq support (#2333) (34 hours ago)
    259729c docs: update server_configurations.md skip-checks: true (2 days ago)
    aa22008 feat: add uvl support (#2331) (2 days ago)
    dd9e7f9 fix(gdscript): support get the port from env variable (#2313) (2 days ago)
    22c87d6 build(rockspec): fix rockspec package name (2 days ago)

โ— nvim-treesitter 52.02ms ๏’‡  nvim-treesitter-refactor
    770c66d Update parsers: v (4 hours ago)
    87dd482 fix(health): align the list of parsers when doing checkhealth (4 hours ago)
    ca09752 Update parsers: c_sharp, gdscript, sql (8 hours ago)
    eedb7b9 csharp: update query to parser change (33 hours ago)
    8498ebd Update parsers: c_sharp, jsonnet, query (33 hours ago)
    6e37050 Update parsers: swift (2 days ago)
    a75aded highlights(java): fix '!',param,global group (3 days ago)

โ—‹ telescope.nvim
    e960efa fix: jumplist picker indexing the line after (#2273) (5 hours ago)
    d16581e fix: misidentification invert and files_with_matches (#2240) (#2262) (8 hours ago)
    278c797 fix(builtin.live_grep): add spacer ":" even when coordinates disabled (#2275) (8 hours ago)

Clean (11)
โ—‹ colorscheme_switcher
โ—‹ friendly-snippets
โ—‹ lense.nvim
โ—‹ neocomplete.nvim
โ—‹ neorg-context
โ—‹ neorg-kanban
โ—‹ neorg-telescope
โ—‹ neorg-zettelkasten
โ—‹ nvim-cmp
โ—‹ nvim-treehopper
โ— which-key.nvim 90.63ms ๎ฏ‡ LazyLoad

Loaded (6)
โ— heirline.nvim 5.26ms ๎ซ“ start
โ— nvim-notify 0.2ms ๏’‡ noice.nvim
โ— nvim-treesitter-endwise 1.76ms ๏’‡ nvim-treesitter
โ— nvim-treesitter-refactor 57.96ms ๎ฏ‡ LazyLoad
โ— nvim-treesitter-textobjects 21.98ms ๏’‡ nvim-treesitter
โ— playground 1.67ms ๏’‡ nvim-treesitter

Installed (32)
โ—‹ Comment.nvim
โ—‹ bufferline.nvim
โ—‹ cmp-emoji
โ—‹ cmp-latex-symbols
โ—‹ cmp-nvim-lsp
โ—‹ cmp-nvim-lua
โ—‹ cmp-path
โ—‹ cmp_luasnip
โ—‹ dirbuf.nvim
โ—‹ gitlinker.nvim
โ—‹ indent-blankline.nvim
โ—‹ jeskape.nvim
โ—‹ lightspeed.nvim
โ—‹ luv-vimdocs
โ—‹ nabla.nvim
โ—‹ neogen
โ—‹ neorg
โ—‹ nvim-autopairs
โ—‹ nvim-colorizer.lua
โ—‹ nvim-dap-ui
โ—‹ nvim-dap-virtual-text
โ—‹ nvim-surround
โ—‹ nvim-web-devicons
โ—‹ one-small-step-for-vimkind
โ—‹ paperplanes.nvim
โ—‹ plenary.nvim
โ—‹ rust-tools.nvim
โ—‹ ssr.nvim
โ—‹ telescope-file-browser.nvim
โ—‹ telescope-fzf-native.nvim
โ—‹ toggleterm.nvim
โ—‹ trouble.nvim

repro.lua
local root = vim.fn.fnamemodify("./.repro", ":p")

-- set stdpaths to use .repro
for _, name in ipairs({ "config", "data", "state", "cache" }) do
    vim.env[("XDG_%s_HOME"):format(name:upper())] = root .. "/" .. name
end
vim.g.mapleader = " "

-- bootstrap lazy
local lazypath = root .. "/plugins/lazy.nvim"
if not vim.loop.fs_stat(lazypath) then
    vim.fn.system({
        "git",
        "clone",
        "--filter=blob:none",
        "--single-branch",
        "https://github.com/folke/lazy.nvim.git",
        lazypath,
    })
end
vim.opt.runtimepath:prepend(lazypath)

-- install plugins
local plugins = {
    "folke/tokyonight.nvim",
    {
        "folke/which-key.nvim",
        config = function()
            require("which-key").register({

                c = {
                    name = "๏‰ป Comment",
                    c = { "Toggle Line" },
                },
            }, {
                prefix = "<leader>",
                mode = "n",
            })
        end,
    },
    {
        "numToStr/Comment.nvim",
        keys = { "<leader>c", "gb" },
        config = function()
            require("comment").setup({
                toggler = {
                    ---line-comment keymap
                    line = "<leader>cc",
                    ---block-comment keymap
                    block = "gbc",
                },

                ---LHS of operator-pending mappings in NORMAL + VISUAL mode
                opleader = {
                    ---line-comment keymap
                    line = "<leader>c",
                    ---block-comment keymap
                    block = "gb",
                },
                mappings = {
                    -- extended = true,
                },
            })
        end,
    },
    -- add any other pugins here
}
require("lazy").setup(plugins, {
    root = root .. "/plugins",
})

-- add anything else here
vim.opt.termguicolors = true
vim.cmd.colorscheme("tokyonight")

two other things:

  1. add the repro.lua fold thing like I did to this issue template
  2. perhaps rethink the root in repro. because people don't expect the plugins to be cloned into their current directory (at least I didn't)

Setting keymaps in init function not working

neovim 0.8.1

In lua/plugins/telescope.lua I have the following.

defining the keymaps in the init function is not working (no errors).

When I type :Telescope find_files the telescope window opens.
Why are the keymaps not working?

local M = {
  'nvim-telescope/telescope.nvim',
  cmd = { "Telescope" },
  dependencies = {
    'nvim-lua/plenary.nvim',
  },
}
function M.config()
  -- enable delete of buffers
  require("telescope").setup {
    pickers = {
      buffers = {
        mappings = {
          i = {
            ["<c-d>"] = "delete_buffer",
          }
        }
      }
    }
  }

end

function M.init()
  vim.keymap.set('n', '<leader>o', '<cmd>Telescope find_files<cr>')
end

return M

Wildcards in tag seems broken.

Describe the bug
When I try to use bufferline.nvim with tag = "v3.*" or tag = "v3.*.*" it can't find the tag. If I use tag = "v3.1.0" it works.

Which version of Neovim are you using?

:version
NVIM v0.8.1
Build type: Release
LuaJIT 2.1.0-beta3
Compiled by [email protected]

image

Accepting a string for the `config` property to load a module

Is your feature request related to a problem? Please describe.
Currently, config must be a function to configure the plugin:

{
  "nvim-treesitter/nvim-treesitter",
  build = ":TSUpdate",
  config = function()
    require("plugins.treesitter")
  end,
}

Describe the solution you'd like
Would you consider supporting a string instead of a function, i.e. config = "plugins.treesitter"? This would just be syntactic sugar for the code above.

{
  "nvim-treesitter/nvim-treesitter",
  build = ":TSUpdate",
  config = "plugins.treesitter",
}

This is similar to the setup function which allows both a table and a module name that gets loaded instead. And imo it looks cleaner when you move a lot of your config to other files.

Describe alternatives you've considered
None

Additional context
Great work, I'm really enjoying the new features and love the way the config looks with lazy.nvim!

Plugins lazily loaded on keys with an identical mapping in config won't show on first request

Describe the bug

For nvim-tree to show up for example, I have to type leaderk once for it to be internally loaded by lazy.nvim it seems, only then, typing again leaderk will bring the nvim-tree window up.

I have the same behavior replicated for most other plugins I load by keys.

Which version of Neovim are you using?

NVIM v0.8.1 on ArchLinux

To Reproduce
Steps to reproduce the behavior:

  1.  {
         'kyazdani42/nvim-tree.lua', keys = '<leader>k',
         dependencies = 'kyazdani42/nvim-web-devicons',
         config = function()
             vim.cmd [[nnoremap <silent> <leader>k :NvimTreeToggle<cr>]]
         end
     }
    
  2. leaderk (won't show anything)
  3. leaderk (shows nvim-tree)

Expected Behavior

It should be displayed on first request.

Adding `include` for sub-modules.

Is your feature request related to a problem? Please describe.
nvim-tressitter (and other extendible plugins) has tons of modules
and each module has basically the following form, if you want to add it to your
plugin-list:

{
    <module-name>,
    dependencies = {
        "nvim-treesitter/nvim-treesitter",
    },
    init = function()
        -- stuff
    end,
}

so if you have more than one module, your config file looks as follows:

{
    <module-name>,
    dependencies = {
        "nvim-treesitter/nvim-treesitter",
    },
    init = function()
        -- stuff
    end,
},
{
    <module-name>,
    dependencies = {
        "nvim-treesitter/nvim-treesitter",
    },
    init = function()
        -- stuff
    end,
},
{
    <module-name>,
    dependencies = {
        "nvim-treesitter/nvim-treesitter",
    },
    init = function()
        -- stuff
    end,
},
-- and so on

which... repeats a lot...

Describe the solution you'd like
Something like dependencies (for example: include) which should look like
this:

{
    "nvim-treesittter/nvim-treesitter",
    includes = {
        { <module1>, ...},
        <module2>,
        <module3>,
        -- ..
    },
    init = function()
        -- stuff
    end,
}

include (or any other name) should install the given list of plugins if and
only if the plugin above is installed as well!
This removes the requirement to add the same dependency again and again for each
module.

Describe alternatives you've considered

  1. Write each plugin with "dependencies" as above.
  2. Write everything down and assume that treesitter is always installed:
{
    "nvim-treesitter/nvim-treesitter",
    -- ...
}
<module1>,
<module2>,
-- ...

Additional context
Hi!

Add `manual` option

The current lazy option is not exactly analogous to packer's opt, which (if not implied by other lazy-loading options like cmd or module1) does not put the plugin in runtimepath unless explicitly packadded.

This is useful for me for keeping nvim-treesitter around for testing but preventing it to be pulled in by other plugins who are eager to use it if available, which currently doesn't seem to be possible with Lazy.

So my suggestion is to add a new option manual for plugins that are not lazy-loaded and only explicitly via, e.g., :Lazy load.


1which as far as I can tell is the closer analogue to `lazy`, in fact

Packer "after" alternative

In packer we have 2 options to define sequencing. First is require which analogous to dependencies in lazy.nvim.
Another is after, which looks like
use { "pluginA" }

use {
"pluginB",
after = "pluginA"
}

Is there any alternative to for "after" option ?

I tried to used dependencies, and it gave some merging plugins not supported error.

Also, dependencies will load "pluginA", but after will load only after "pluginB" is loaded, so pluginA loading takes a preference here

snapshots

it would be cool if you could have named snapshots to which you can "revert" your plugins

this would basically just be an extension to the lockfiles I guess.
You'd be able to have multiple lockfiles and can restore the state from one of them

Question: Why nvim-qt commands aren't showing?

Describe the bug

  • Neovim-qt commands aren't showing
  • When I'm not using lazy.nvim the nvim-qt commands are showing.
  • Here's my ginit.vim and lazy.lua.

Which version of Neovim are you using?
0.9.0-dev-525+ga7332ba9b

To Reproduce
Steps to reproduce the behavior:

  1. Open nvim-qt.
  2. Try to run nvim-qt commands.

Expected Behavior

  • nvim-qt commands should show up and run.

Screenshots.
Screenshot (1175)

Implicit lazyness by init functions is quite different behavior than packer lazyness on setup functions

Is your feature request related to a problem? Please describe.

I'm unsure whether it can be stated as a bug or feature request, or just docs clarification. packer.nvim also have implicit lazy loading when there's a setup function in a plugin spec, BUT, the plugin still loads despite having a setup function.

The trade-off there seems to lean towards more at setting up the plugin than complying with an strict implicit lazy loading rule. I think that's why there opt verb may be more on point than lazy, because a plugin spec with a setup function is still lazily loaded, it's installed on opt/, BUT, still loaded, BECAUSE opt = true has not been set, it's lazy, but not opt. You have to set opt = true for something to actually not be loaded.

Describe the solution you'd like

๐Ÿค”

Describe alternatives you've considered

I had a bunch of plugins with setup functions which I expected to load, the setup was just for that, setting up, not implicitly causing opt = true. Migrating to lazy.nvim it seems I have to set lazy = false to achieve the same bare "setting up" behavior when setting up init functions. I hope it's all fine doing that.

Is it possible to setup some plugins in the setup and then load module and submodules of plugins?

Is your feature request related to a problem? Please describe.
Hello!

I am thinking about migrating my Neovim configuration to this package manager but my Neovim configuration uses Fennel with hotpot.nvim. That means that I have some plugins that I must have installed before the plugins module can be compiled.

My idea is to do something like...

-- init.lua
require("lazy").setup({
  "rktjmp/hotpot.nvim",
  "conf.plugins",
})

...which would always install hotpot.nvim for me and then would use the compiled conf.plugins module.

Describe the solution you'd like
It would be ideal to be able to specify some plugins inside the init.lua file and a module containing plugins to load.

Describe alternatives you've considered
I have considered bootstrapping hotpot.nvim but I am not sure of what the best practice for this would be.

If I am able to do that I could load lazy.nvim inside fnl/conf/init.fnl.

Additional context
I have already setup a Lua demo configuration and I am loving this plugin. ๐Ÿ˜„

Question/bug (?) regarding structuring plugins and the plugins directory

Describe the bug
Quoting the README:

Example:

  • ~/.config/nvim/init.lua
require("lazy").setup("plugins")
  • ~/.config/nvim/lua/plugins.lua or ~/.config/nvim/lua/plugins/init.lua
return {
  "folke/neodev.nvim",
    "folke/which-key.nvim",
    { "folke/neoconf.nvim", cmd = "Neoconf" },
}
  • any lua file in ~/.config/nvim/lua/plugins/*.lua will be automatically merged in the main plugin spec

My question is: is step 2 (having plugins.lua or plugins/init.lua) necessary for step 3 (so that every plugins/*.lua file loads automatically)?

That seems to be the case because lazy is complaining that it cannot read .../plugins/init.lua.

Was wondering if this is a bug or intended behavior.

Which version of Neovim are you using?
Version 0.8.1

To Reproduce

  1. Create ~/.config/nvim/init.lua:
local lazypath = vim.fn.stdpath('data') .. '/lazy/lazy.nvim'

if not vim.loop.fs_stat(lazypath) then
  vim.fn.system({
    'git',
    'clone',
    '--filter=blob:none',
    '--single-branch',
    'https://github.com/folke/lazy.nvim.git',
    lazypath,
  })
end
vim.opt.runtimepath:prepend(lazypath)

local lazy = require('lazy')

lazy.setup('plugins')
  1. And create ~/.config/nvim/lua/plugins/my.lua:
return {
  'nvim-tree/nvim-web-devicons',
  url = 'https://github.com/nvim-tree/nvim-web-devicons',
}
  1. Open nvim, and there will be an error saying:
Failed to load **plugins**
....local/share/nvim/lazy/lazy.nvim/lua/lazy/core/cache.lua:105: cannot open /Users/farzadmf/.config/nvim/l
ua/plugins/init.lua: No such file or directory

Expected Behavior
Since I'm using those individual files to separate my plugins, it doesn't make much sense to me to have the init.lua file in there

Screenshots
If applicable, add screenshots to help explain your problem.

Log
:Lazy log shows:

Lazy log
Failed to load **plugins**
....local/share/nvim/lazy/lazy.nvim/lua/lazy/core/cache.lua:105: cannot open /Users/farzadmf/.config/nvim/l
ua/plugins/init.lua: No such file or directory

plugin using version always marked with "updates available"

I'm installing bufferline:

  {
    'akinsho/bufferline.nvim',
    version = '^3',
    config = function()
      require 'user.plugins.bufferline'
    end,
  },

but for some reason, even though the tag doesn't change (v.3.1.0 as of writing this post), every check says that there are updates to this plugin.

reproduced with minimal configurations:

minimal.lua
local function join_paths(...)
  local result = table.concat({ ... }, '/')
  return result
end

local temp_dir = vim.loop.os_getenv 'TEMP' or '/tmp'
local package_root = join_paths(temp_dir, 'nvim', 'site', 'lazy')
local lazypath = join_paths(temp_dir, 'nvim', 'site') .. '/lazy/lazy.nvim'
if not vim.loop.fs_stat(lazypath) then
vim.fn.system {
'git',
'clone',
'--filter=blob:none',
'--single-branch',
'https://github.com/folke/lazy.nvim.git',
lazypath,
}
end
vim.opt.runtimepath:prepend(lazypath)

require('lazy').setup({
{
'akinsho/bufferline.nvim',
version = '^3',
config = function()
require 'user.plugins.bufferline'
end,
},
}, {
root = package_root,
})

git submodules don't work

This plugin (mine) https://github.com/ilAYAli/scMRU.nvim works with Packer et al. but not with Lazy.
I followed this guide when I wrote it.
The mentioned sqlite3 lua rocks module is fairly old so I should probably just replace it. Regardless, other plugins might use a similar pattern, so the issue might be of interest.

Which version of Neovim are you using?
NVIM v0.8.0-1210-gd367ed9b2

Steps to reproduce the behavior:

Lazy fails during installation with a minimal config file.

local root = vim.fn.fnamemodify("./.repro", ":p")

-- set stdpaths to use .repro
for _, name in ipairs({ "config", "data", "state", "cache" }) do
  vim.env[("XDG_%s_HOME"):format(name:upper())] = root .. "/" .. name
end

-- bootstrap lazy
local lazypath = root .. "/plugins/lazy.nvim"
if not vim.loop.fs_stat(lazypath) then
  vim.fn.system({
    "git",
    "clone",
    "--filter=blob:none",
    "--single-branch",
    "https://github.com/folke/lazy.nvim.git",
    lazypath,
  })
end
vim.opt.runtimepath:prepend(lazypath)

-- install plugins
local plugins = {
  'ilAYAli/scMRU.nvim',
}
require("lazy").setup(plugins, {
  root = root .. "/plugins",
})

:checkhealth and Lazy log does not contain any errors, but the following is printed to :messages

Failed to source `/Users/username/.local/share/nvim/lazy/scMRU.nvim/plugin/mru.vim`

...local/share/nvim/lazy/lazy.nvim/lua/lazy/core/loader.lua:185: Vim(lua):E5108: Error executing lua ...er/.local/share/nvim/lazy/scMRU.nvim/lua/mru/display.lua:1: module 'ljsqlite3' not found:
^Ino field package.preload['ljsqlite3']not found in lazy cache
^Ino file './ljsqlite3.lua'
^Ino file '/Users/runner/work/neovim/neovim/.deps/usr/share/luajit-2.1.0-beta3/ljsqlite3.lua'
^Ino file '/usr/local/share/lua/5.1/ljsqlite3.lua'
^Ino file '/usr/local/share/lua/5.1/ljsqlite3/init.lua'
^Ino file '/Users/runner/work/neovim/neovim/.deps/usr/share/lua/5.1/ljsqlite3.lua'
^Ino file '/Users/runner/work/neovim/neovim/.deps/usr/share/lua/5.1/ljsqlite3/init.lua'
^Ino file '/Users/username/.local/share/nvim/lazy/scMRU.nvim/plugin/../lua/mru/deps/lua-ljsqlite3/init.lua'
^Ino file './ljsqlite3.so'
^Ino file '/usr/local/lib/lua/5.1/ljsqlite3.so'
^Ino file '/Users/runner/work/neovim/neovim/.deps/usr/lib/lua/5.1/ljsqlite3.so'
^Ino file '/usr/local/lib/lua/5.1/loadall.so'ljsqlite3 not found in lazy plugins
stack traceback:
^I[C]: in function 'require'
^I...er/.local/share/nvim/lazy/scMRU.nvim/lua/mru/display.lua:1: in main chunk
^I[C]: in function 'require'
^I...etter/.local/share/nvim/lazy/scMRU.nvim/lua/mru/init.lua:1: in main chunk
^I[C]: in function 'require'
^I[string ":lua"]:1: in main chunk
^I[C]: in function 'cmd'
^I...local/share/nvim/lazy/lazy.nvim/lua/lazy/core/loader.lua:185: in function <...local/share/nvim/lazy/lazy.nvim/lua/lazy/core/loader.lua:184>
^I[C]: in function 'xpcall'
^I.../.local/share/nvim/lazy/lazy.nvim/lua/lazy/core/util.lua:77: in function 'try'
^I...local/share/nvim/lazy/lazy.nvim/lua/lazy/core/loader.lua:184: in function 'source'
^I...local/share/nvim/lazy/lazy.nvim/lua/lazy/core/loader.lua:178: in function 'source_runtime'
^I...local/share/nvim/lazy/lazy.nvim/lua/lazy/core/loader.lua:149: in function 'packadd'
^I...local/share/nvim/lazy/lazy.nvim/lua/lazy/core/loader.lua:133: in function 'load'
^I...local/share/nvim/lazy/lazy.nvim/lua/lazy/core/loader.lua:64: in function 'startup'
^I...etter/.local/share/nvim/lazy/lazy.nvim/lua/lazy/init.lua:58: in function 'setup'
^I/Users/username/sync/config/nvim/init.lua:19: in main chunk

stacktrace:

Doesn't work with rhysd/committia.vim

Describe the bug
I'm not sure if this should be opened in https://github.com/rhysd/committia.vim or in here.
After moving 99% of my plugins only this one is left which doesn't seem to be working, whether it's lazy-loaded or not.

Which version of Neovim are you using?
Neovim nightly latest

To Reproduce
Steps to reproduce the behavior:

  1. Install Lazy
  2. Add https://github.com/rhysd/committia.vim to plugins
  3. Open git commit view (git commit some staged files)

Expected Behavior
committia should be loaded and enabled in the git-commit buffer. (With packer it works)

add some patterns for lazy loading

just some things (I just write those here because I think they don't exist yet and are quite nice)
you can consider which (if any) are worth implementing

groups for keys wbthomason/packer.nvim#1063

patterns for commands like NvimTree* or NvimTree{Toggle,Open,Close}

ig for autocommands this should work anyway (haven't looked at the code yet though)

Color Scheme needs to be loaded *twice* to fully take effect.

Describe the bug
The Color Scheme needs to be loaded twice to fully take effect. This issue only occurred after switching to lazy, it did not occur with packer. It occurs with all color schemes I have tested.

Which version of Neovim are you using?

macOS 13.0.1 (M1)
neovim 0.8.1 (homebrew)
Neovide 0.10.3 (homebrew)

To Reproduce
see the video below.

  • starting state: no color scheme set.
  • first restart: start without color scheme set.
  • second restart: color scheme is set once.
  • third restart: color scheme is set two times.

When the color scheme is set once, the blue dots (listchars) and the color column to the right are off. Setting the color scheme two times fixes this. (sorry for the sound, forgot to turn off audio during recording)

Screen.Recording.2022-12-20.at.21.06.12.mov

Log
No errors

Error detected while processing VimEnter Autocommands for "*" Invalid window id: 1001

Describe the bug
Even with minimal setup and basically empty nvim folder (minus init.lua), I get an error thrown on fresh start after the lazy window open for a second or so.

Which version of Neovim are you using?
NVIM v0.9.0-dev-528+g3283f4ebd
Build type: Release
LuaJIT 2.1.0-beta3

To Reproduce
Steps to reproduce the behavior:

  1. cd ~/.config/ && mv nvim nvim.bak to remove any rtp stuff and have clean nvim folder
  2. rm -rf ~/.config/local/share/nvim/lazy to remove any previous lazy stuff
  3. rm -rf ~/.config/local/state/nvim/lazy to remove any previous lazy stuff
  4. mkdir ~/.config/nvim && cd ~/.config/nvim to create fresh nvim folder
  5. nvim init.lua to create brand new init.lua

Add:

vim.g.mapleader = " "

local lazypath = vim.fn.stdpath('data') .. '/lazy/lazy.nvim'
if not vim.loop.fs_stat(lazypath) then
  vim.fn.system({
    'git',
    'clone',
    '--filter=blob:none',
    '--single-branch',
    'https://github.com/folke/lazy.nvim.git',
    lazypath,
  })
end
vim.opt.runtimepath:prepend(lazypath)

require("lazy").setup({
  "nvim-lua/plenary.nvim",
  'tpope/vim-commentary',
  'tpope/vim-repeat',
  'tpope/vim-unimpaired',
  'tpope/vim-surround',
  'tpope/vim-markdown',
  'gpanders/editorconfig.nvim',
})

vim.keymap.set('n', '<Leader>l', '<cmd>Lazy<CR>')
  1. :wq
  2. nvim
  3. lazy.nvim window opens on restart, and then this error occurs:
Error detected while processing VimEnter Autocommands for "*":
Error executing lua callback: ...g/local/share/nvim/lazy/lazy.nvim/lua/lazy/view/init.lua:84: Invalid window id: 1001
stack traceback:
        [C]: in function 'nvim_set_current_win'
        ...g/local/share/nvim/lazy/lazy.nvim/lua/lazy/view/init.lua:84: in function <...g/local/share/nvim/lazy/lazy.nvim/lua/lazy/view/init.lua:83>

Expected Behavior
On startup lazy.nvim is installed and plugins are installed.

Screenshots
Nothing really to see, just an empty buffer with that error in the messages area.

:checkhealth lazy output:

lazy: require("lazy.health").check()

lazy.nvim ~
- OK no existing packages found by other package managers
- OK packer_compiled.lua not found

local plugins have "log failed" error msg

Describe the bug
The four plugins load and work as expected, but in the Lazy window, they get some error message where I cannot figure out what the issue is

Pasted image 2022-12-20 19 05 49

Which version of Neovim are you using?

macOS 13.0.1 (M1)
neovim 0.8.1 (homebrew)
Neovide 0.10.3 (homebrew)

To Reproduce

require("lazy").setup("config/plugin-list", {
       ...
	dev = {
		path = vim.fn.stdpath("config") .. "/my-plugins/",
	},
})
--  config/plugin-list.lua
return {
      {"chrisgrieser/nvim-recorder", dev = true},
     -- the same for the other plugins
}

Log
The log only lists lazy.nvim breaking changes, nothing related to the problem above.

Sub modules not loading

Hey, I tried migrating from packer to lazy. My current plugin structure is this.

In my init.lua i specify:

require("lazy").setup("plugins", { defaults = { version = "*" } })

The readme tells me:

any lua file in ~/.config/nvim/lua/plugins/*.lua will be automatically merged in the main plugin spec

But currently only the ~/.config/nvim/lua/plugins/init.lua file gets sourced and plugins installed from it. For example my fuzzy finder is neither loaded nor installed:
:lua require('fzf-lua').files():

E5108: Error executing lua [string ":lua"]:1: module 'fzf-lua' not found:
        no field package.preload['fzf-lua']
        no file '/nix/store/w08dyn0iamcixgc6cgv9ma8sq165vlvq-luajit-2.1.0-2022-10-04-env/share/lua/5.1/fzf-lua.lua'
        no file '/nix/store/w08dyn0iamcixgc6cgv9ma8sq165vlvq-luajit-2.1.0-2022-10-04-env/share/lua/5.1/fzf-lua/init.lua'
        no file '/nix/store/w08dyn0iamcixgc6cgv9ma8sq165vlvq-luajit-2.1.0-2022-10-04-env/lib/lua/5.1/fzf-lua.so'fzf-lua not found in lazy plugin
s
stack traceback:
        [C]: in function 'require'
        [string ":lua"]:1: in main chunk

What am I missing?

Error when removing a plugin

Describe the bug
Pressing x to remove an installed plugin throws an error, but the operation succeeds.

Which version of Neovim are you using?
NVIM v0.9.0-dev-519+g2d8bbe468 nightly

To Reproduce
Steps to reproduce the behavior:

  1. Install a plugin
  2. Open :Lazy
  3. Find the plugin move cursor on top of the plugin's name and press x

Expected Behavior
The plugin should be just deleted, no errors.

Screenshots
Screenshot from 2022-12-20 12-52-57

FR: bigger window (accessibility)

Is your feature request related to a problem? Please describe.
The window for lazy.nvim is smaller than it has to be. I have a small screen and bigger font size (bad eyes...), and lazy.nvim only takes up a smaller portion of the available space, making everything very crowded.

Pasted image 2022-12-20 19 13 19

Describe the solution you'd like
Either a bigger window by default, or a ui-config to enlarge the window

Describe alternatives you've considered
Zooming out, but that decreases font size.

[Question] Trying to migrate from `packer.nvim`

I'm trying to migrate from packer.nvim. I split all my plugins configuration into separate files and load them with:

vim.api.nvim_command("packadd packer.nvim")
function plugin_config(name)
    return string.format('require("plugins/%s")', name)
end

Let's say I want to load navarasu/onedark.nvim with the config file at ~/.config/nvim/lua/plugins/onedark.lua. I use:

return require("packer").startup({
    function(use)
        use({ "navarasu/onedark.nvim", config = plugin_config("onedark") })
})

I'm trying to achieve the same thing with lazy.nvim but I can't figure how to. Without:

vim.api.nvim_command("packadd packer.nvim")

I'm getting the following error:

    Failed to run `config` for onedark.nvim
    attempt to call a string value
    # stacktrace:
    - .config/nvim/lua/plugins.lua:23
    - .config/nvim/init.lua:1

Thanks in advance!

Question: Does this plugin manager make impatient.nvim obsolete?

From your README.md:

Great care has been taken to make the startup code (lazy.core) as efficient as possible. During startup, all lua files used before VimEnter or BufReadPre are byte-compiled and cached, similar to what impatient.nvim does.

I am just wondering if impatient.nvim is still doing anything if I'm using lazy.nvim? If I remove impatient.nvim I still get performance 2-3 times better than with packer.nvim + impatient.nvim.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.