8000 feat: simply re-issue the event for event cond load plugins by epheien · Pull Request #29 · lewis6991/pckr.nvim · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

feat: simply re-issue the event for event cond load plugins #29

New issue

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

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

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Jul 17, 2024

Conversation

epheien
Copy link
Contributor
@epheien epheien commented Jul 17, 2024

I referred to lazy.nvim's event based lazy loading implementation (https://github.com/folke/lazy.nvim/blob/main/lua/lazy/core/handler/event.lua#L161) and implemented event re-issue in pckr.

Without this feature, many plugins based on event loading will encounter problems (eg. InsertEnter).

For example:

      {
        --'hrsh7th/nvim-cmp',
        'epheien/nvim-cmp',
        requires = {
          'hrsh7th/cmp-nvim-lsp',
          'onsails/lspkind.nvim',
          'hrsh7th/cmp-buffer',
          'hrsh7th/cmp-path',
          'epheien/cmp-cmdline',
          'L3MON4D3/LuaSnip',
          'saadparwaiz1/cmp_luasnip',
          'rafamadriz/friendly-snippets',
        },
        cond = {event({'InsertEnter'}), keys('n', ';', ':'), keys('n', '/'), keys('n', '?'), cmd('CmpDisable')},
        config = function()
          require('config/nvim-cmp')
        end,
      };

@lewis6991 lewis6991 merged commit b02d02c into lewis6991:main Jul 17, 2024
3 checks passed
@epheien epheien deleted the fix-cond-event branch July 18, 2024 02:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants
0