[Suggestion] Setup by default #1709
Slotos
started this conversation in
API suggestions
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Looking at what Mason's
.setup
does, it looks likeplugin/mason.lua
file could eagerly set the plugin up with no extra cost to the users:enhance the Neovim session's PATH environment
The only case where this could maybe be postponed is until
FileType
event sets a known filetype. Even then, if LSP initialization attempt happens before PATH enhancement, Mason won't do what people install it for.register commands
This is exactly what
plugin/
folder is for. Setups like lazy.nvim basically replicate what a well-designed plugin can do on its own out of the box.With this in mind, what do you think about making
setup
call optional? Custom settings can then be provided via asetup
function. Plugin can evne offer lazy setup by emitting a "MasonBeforeInit" custom event during initialrequire("mason")
call, which users would be able to use to set up custom configuration without performing early require.Beta Was this translation helpful? Give feedback.
All reactions