Hi all,
As a follow up to a recent thread ("Plugins exposing events to other
plugins": https://groups.google.com/d/msg/vim_dev/uiw6gHft-0g/i8qdfT8YBQAJ)
I'd like to ask whether there is an existing pattern of configuration
functions that plugin developers follow?
Some background.
I'm not really a fan of global config variables in .vimrc files, e.g.:
let g:govim_quickfix_auto_diagnotics_disable=1
especially when it comes to channel-based plugins, because they (the
channel-based plugins) end up having to make a roundtrip call to check
a global variable value; if this is on a "hot" path it becomes
expensive. But also because it's too easy to mis-type/set an invalid
value.
So I'd like to explore a pattern by which the end user calls a config
function from their .vimrc or whenever they want to change a config
value. This will have the benefit of pushing the config value to the
channel-based plugin, but also allowing tighter validation at the time
of the value being set.
The main problem (aside from my complete lack of real understanding of
the .vimrc load sequence) is that plugins have not loaded at the time
.vimrc is processed, and hence it's not possible to call a
plugin-defined config function directly... so we'd need to handle this
somehow.
Does anyone have any thoughts on/experience of the above?
Thanks in advance,
Paul
--
--
You received this message from the "vim_dev" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php
---
You received this message because you are subscribed to the Google Groups
"vim_dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/vim_dev/CACoUkn7J3admeOFkNMA5D1b6mPvZ-VBLSYY3MFybtEDdW-TnrA%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.