feat: automatic lazy loading + health check + support configuration with vim.g#7
Open
mrcjkb wants to merge 3 commits intorefractalize:mainfrom
Open
feat: automatic lazy loading + health check + support configuration with vim.g#7mrcjkb wants to merge 3 commits intorefractalize:mainfrom
vim.g#7mrcjkb wants to merge 3 commits intorefractalize:mainfrom
Conversation
Author
|
Oh, by the way: I noticed there's no license? |
|
@mrcjkb Hi |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Hey 👋
Nice plugin!
I would love to use it, but the need to call a
setupfunction to enable this plugin's functionality has some caveats:setupfunction, even without using oil.nvim.This PR uses Neovim's built-in
ftpluginfeature (see:h runtimepath) to make sure this plugin initialises itself lazily, when opening aoilfiletype.As a nice side-effect, this also means that users (or plugin managers) don't have to worry about the order in which oil.nvim and this plugin are configured (oil.nvim must be loaded in order for Neovim to know about the
oilfiletype).The
setupfunction only sets the config, but doesn't load anything.I've also added a small health check.
And, since
setupnow only overrides the default configuration, I have added support for configuring this plugin with avim.g.oil_git_statustable.This has two benefits over a
setupfunction:requirecall (allowing users to disable the plugin without deleting the config).g:oil_git_status = { "show_ignored": 1 }