Skip to content
This repository has been archived by the owner on Sep 10, 2022. It is now read-only.

Support lazy loading with vim-plug #23

Open
lbiaggi opened this issue Feb 13, 2022 · 5 comments
Open

Support lazy loading with vim-plug #23

lbiaggi opened this issue Feb 13, 2022 · 5 comments
Labels
bug Something isn't working

Comments

@lbiaggi
Copy link

lbiaggi commented Feb 13, 2022

Bug description
Hi, when trying to load it (using lazy load from vim-plug) with c/cpp/(c)make/qml files, it fails

Steps to reproduce
Plug 'Shatur/neovim-cmake', {'for' : ['cpp', 'c', 'make', 'cmake', 'qml']}

Expected behavior
Behaves nicely and only in the wanted files, now I have it everywhere :(

Screenshots

Environment

  • OS: Arch
  • Desktop environment: I3wm
  • Plugins commit hash: 86c7467
    Additional context
@lbiaggi lbiaggi added the bug Something isn't working label Feb 13, 2022
@Shatur
Copy link
Owner

Shatur commented Feb 13, 2022

What do you mean under "it fails"? It should be loaded once you open any of the specified files. You can't unload it later.

@lbiaggi
Copy link
Author

lbiaggi commented Feb 14, 2022 via email

@Shatur
Copy link
Owner

Shatur commented Feb 14, 2022

I don't understand the problem. Please, explain it more.

@lbiaggi
Copy link
Author

lbiaggi commented Feb 14, 2022

I prefer not to have :CMake available to all possible file types, only the associated with C/C++, usually I do this with lazy loading (where I specify which file type would it be allowed).

@Shatur
Copy link
Owner

Shatur commented Feb 14, 2022

It's not possible. Commands can't be relative to the filetype. You can lazy load the plugin by filetype, but once it loaded by the specified filetype, :CMake command will be available anywhere.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants