Shatur / neovim-cmake

CMake integration for Neovim
GNU General Public License v3.0
87 stars 19 forks source link

Support lazy loading with vim-plug #23

Open lbiaggi opened 2 years ago

lbiaggi commented 2 years ago

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

Shatur commented 2 years ago

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 commented 2 years ago

I can't lazy load it, need to let be enable with other filetypes e.g.: rust

On Sun, Feb 13, 2022, 18:34 Hennadii Chernyshchyk @.***> wrote:

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.

— Reply to this email directly, view it on GitHub https://github.com/Shatur/neovim-cmake/issues/23#issuecomment-1038442067, or unsubscribe https://github.com/notifications/unsubscribe-auth/ABJGX4AK7FHYGMC4XRN5PWDU3APWXANCNFSM5OJV24WQ . You are receiving this because you authored the thread.Message ID: @.***>

Shatur commented 2 years ago

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

lbiaggi commented 2 years ago

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 commented 2 years ago

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.