feat(plugin): support running all init functions #1801
+30
−6
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.
Description
I have taken to structuring my configuration per language similar to LazyVim's extras. Sometimes for a particular plugin I want to specify initialization logic within the spec for the language. I use the
init
function for this but currently only the last one of these is ran.For example I'll have a top level
conform.nvim
config:Then for each language I'll update the options using
opts
and do some environment setup related to the formatter in theinit
function. For example mytypescript
extra looks like:The issue comes up if I want to have initialization logic related to a formatter for another language. I can create a toy example if you would like.
This is a niche issue so if you prefer to leave it out totally understandable. There are also workarounds like putting this logic in the
opts
function, I just prefer having the environment stuff and the options to be separate but its a very minor gripe.Related Issue(s)
I was unable to find any similar requests.
Screenshots
N/A